diff mbox series

[Bluez,05/62] core: Inclusive language for rfcomm

Message ID 20210813201256.Bluez.5.I598f2d795e09d5ffb1ba6cb16c2baef2ac595e8e@changeid (mailing list archive)
State Superseded
Headers show
Series Inclusive language changes | expand

Commit Message

Archie Pusaka Aug. 13, 2021, 12:17 p.m. UTC
From: Archie Pusaka <apusaka@chromium.org>

"central" is preferred, as reflected in the BT core spec 5.3.
---

 btio/btio.c    | 10 +++++-----
 lib/rfcomm.h   |  2 +-
 tools/rctest.c |  4 ++--
 tools/rfcomm.c |  2 +-
 4 files changed, 9 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/btio/btio.c b/btio/btio.c
index 9c4601e6f8..ce958bdd09 100644
--- a/btio/btio.c
+++ b/btio/btio.c
@@ -394,13 +394,13 @@  static int rfcomm_set_master(int sock, int master)
 		return -errno;
 
 	if (master) {
-		if (flags & RFCOMM_LM_MASTER)
+		if (flags & RFCOMM_LM_CENTRAL)
 			return 0;
-		flags |= RFCOMM_LM_MASTER;
+		flags |= RFCOMM_LM_CENTRAL;
 	} else {
-		if (!(flags & RFCOMM_LM_MASTER))
+		if (!(flags & RFCOMM_LM_CENTRAL))
 			return 0;
-		flags &= ~RFCOMM_LM_MASTER;
+		flags &= ~RFCOMM_LM_CENTRAL;
 	}
 
 	if (setsockopt(sock, SOL_RFCOMM, RFCOMM_LM, &flags, sizeof(flags)) < 0)
@@ -1345,7 +1345,7 @@  static gboolean rfcomm_get(int sock, GError **err, BtIOOption opt1,
 				return FALSE;
 			}
 			*(va_arg(args, gboolean *)) =
-				(flags & RFCOMM_LM_MASTER) ? TRUE : FALSE;
+				(flags & RFCOMM_LM_CENTRAL) ? TRUE : FALSE;
 			break;
 		case BT_IO_OPT_HANDLE:
 			if (rfcomm_get_info(sock, &handle, dev_class) < 0) {
diff --git a/lib/rfcomm.h b/lib/rfcomm.h
index 0347ddc367..ab1df888c2 100644
--- a/lib/rfcomm.h
+++ b/lib/rfcomm.h
@@ -38,7 +38,7 @@  struct rfcomm_conninfo {
 };
 
 #define RFCOMM_LM	0x03
-#define RFCOMM_LM_MASTER	0x0001
+#define RFCOMM_LM_CENTRAL	0x0001
 #define RFCOMM_LM_AUTH		0x0002
 #define RFCOMM_LM_ENCRYPT	0x0004
 #define RFCOMM_LM_TRUSTED	0x0008
diff --git a/tools/rctest.c b/tools/rctest.c
index 7d688691c4..034ae167b2 100644
--- a/tools/rctest.c
+++ b/tools/rctest.c
@@ -203,7 +203,7 @@  static int do_connect(const char *svr)
 	/* Set link mode */
 	opt = 0;
 	if (master)
-		opt |= RFCOMM_LM_MASTER;
+		opt |= RFCOMM_LM_CENTRAL;
 	if (auth)
 		opt |= RFCOMM_LM_AUTH;
 	if (encr)
@@ -294,7 +294,7 @@  static void do_listen(void (*handler)(int sk))
 	/* Set link mode */
 	opt = 0;
 	if (master)
-		opt |= RFCOMM_LM_MASTER;
+		opt |= RFCOMM_LM_CENTRAL;
 	if (auth)
 		opt |= RFCOMM_LM_AUTH;
 	if (encr)
diff --git a/tools/rfcomm.c b/tools/rfcomm.c
index 8e1db8ebaa..7ad7ca5ad6 100644
--- a/tools/rfcomm.c
+++ b/tools/rfcomm.c
@@ -435,7 +435,7 @@  static void cmd_listen(int ctl, int dev, bdaddr_t *bdaddr, int argc, char **argv
 
 	lm = 0;
 	if (master)
-		lm |= RFCOMM_LM_MASTER;
+		lm |= RFCOMM_LM_CENTRAL;
 	if (auth)
 		lm |= RFCOMM_LM_AUTH;
 	if (encryption)