summaryrefslogtreecommitdiff
path: root/repo/bluez/005-hostname-Use-phone-class-for-handhelds.patch
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-04 15:08:04 +0100
committerdavidovski <david@davidovski.xyz>2022-06-04 15:08:04 +0100
commit873665024ebfaa761ee49b508a79db7178aeb778 (patch)
tree6cd3b4ce3a9f4b0586ffa48e73a6ba4c8da2db43 /repo/bluez/005-hostname-Use-phone-class-for-handhelds.patch
parent4445f6e15185f58dc599390ab74df3ca19b437b7 (diff)
added gnupg
Diffstat (limited to 'repo/bluez/005-hostname-Use-phone-class-for-handhelds.patch')
-rw-r--r--repo/bluez/005-hostname-Use-phone-class-for-handhelds.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/repo/bluez/005-hostname-Use-phone-class-for-handhelds.patch b/repo/bluez/005-hostname-Use-phone-class-for-handhelds.patch
new file mode 100644
index 0000000..c5ad4bf
--- /dev/null
+++ b/repo/bluez/005-hostname-Use-phone-class-for-handhelds.patch
@@ -0,0 +1,51 @@
+From 7960816020bbd94b1c2f0ff75f73b25927717875 Mon Sep 17 00:00:00 2001
+From: Dylan Van Assche <me@dylanvanassche.be>
+Date: Fri, 11 Jun 2021 20:18:44 +0200
+Subject: [PATCH] hostname: Use phone class for handhelds
+
+Advertise devices with chassis type 'handheld'
+as phone instead of computer.
+---
+ plugins/hostname.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/plugins/hostname.c b/plugins/hostname.c
+index 1a9513adb..85c342d36 100644
+--- a/plugins/hostname.c
++++ b/plugins/hostname.c
+@@ -31,6 +31,7 @@
+
+ #define MAJOR_CLASS_MISCELLANEOUS 0x00
+ #define MAJOR_CLASS_COMPUTER 0x01
++#define MAJOR_CLASS_PHONE 0x02
+
+ #define MINOR_CLASS_UNCATEGORIZED 0x00
+ #define MINOR_CLASS_DESKTOP 0x01
+@@ -40,6 +41,7 @@
+ #define MINOR_CLASS_PALM_SIZED 0x05
+ #define MINOR_CLASS_WEARABLE 0x06
+ #define MINOR_CLASS_TABLET 0x07
++#define MINOR_CLASS_SMARTPHONE 0x03
+
+ static uint8_t major_class = MAJOR_CLASS_MISCELLANEOUS;
+ static uint8_t minor_class = MINOR_CLASS_UNCATEGORIZED;
+@@ -106,11 +108,11 @@ static const struct {
+ uint8_t major_class;
+ uint8_t minor_class;
+ } chassis_table[] = {
+- { "desktop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_DESKTOP },
+- { "server", MAJOR_CLASS_COMPUTER, MINOR_CLASS_SERVER },
+- { "laptop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_LAPTOP },
+- { "handset", MAJOR_CLASS_COMPUTER, MINOR_CLASS_HANDHELD },
+- { "tablet", MAJOR_CLASS_COMPUTER, MINOR_CLASS_TABLET },
++ { "desktop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_DESKTOP },
++ { "server", MAJOR_CLASS_COMPUTER, MINOR_CLASS_SERVER },
++ { "laptop", MAJOR_CLASS_COMPUTER, MINOR_CLASS_LAPTOP },
++ { "handset", MAJOR_CLASS_PHONE, MINOR_CLASS_SMARTPHONE },
++ { "tablet", MAJOR_CLASS_COMPUTER, MINOR_CLASS_TABLET },
+ { }
+ };
+
+--
+2.31.1
+