1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-25 11:37:56 +00:00

Use string literals in string descriptors for marginally

better readability.

Submitted by:	Christoph Mallon
This commit is contained in:
Hans Petter Selasky 2013-01-30 16:05:54 +00:00
parent 01923b399d
commit b51875c9f6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=246125
13 changed files with 42 additions and 126 deletions

View File

@ -1741,12 +1741,10 @@ static const struct usb_hub_descriptor_min at91dci_hubd = {
};
#define STRING_VENDOR \
'A', 0, 'T', 0, 'M', 0, 'E', 0, 'L', 0
"A\0T\0M\0E\0L"
#define STRING_PRODUCT \
'D', 0, 'C', 0, 'I', 0, ' ', 0, 'R', 0, \
'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \
'U', 0, 'B', 0,
"D\0C\0I\0 \0R\0o\0o\0t\0 \0H\0U\0B"
USB_MAKE_STRING_DESC(STRING_VENDOR, at91dci_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, at91dci_product);

View File

@ -1566,12 +1566,10 @@ static const struct usb_hub_descriptor_min atmegadci_hubd = {
};
#define STRING_VENDOR \
'A', 0, 'T', 0, 'M', 0, 'E', 0, 'G', 0, 'A', 0
"A\0T\0M\0E\0G\0A"
#define STRING_PRODUCT \
'D', 0, 'C', 0, 'I', 0, ' ', 0, 'R', 0, \
'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \
'U', 0, 'B', 0,
"D\0C\0I\0 \0R\0o\0o\0t\0 \0H\0U\0B"
USB_MAKE_STRING_DESC(STRING_VENDOR, atmegadci_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, atmegadci_product);

View File

@ -1506,12 +1506,10 @@ static const struct usb_hub_descriptor_min avr32dci_hubd = {
};
#define STRING_VENDOR \
'A', 0, 'V', 0, 'R', 0, '3', 0, '2', 0
"A\0V\0R\0003\0002"
#define STRING_PRODUCT \
'D', 0, 'C', 0, 'I', 0, ' ', 0, 'R', 0, \
'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \
'U', 0, 'B', 0,
"D\0C\0I\0 \0R\0o\0o\0t\0 \0H\0U\0B"
USB_MAKE_STRING_DESC(STRING_VENDOR, avr32dci_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, avr32dci_product);

View File

@ -3492,12 +3492,10 @@ static const struct usb_hub_descriptor_min dwc_otg_hubd = {
};
#define STRING_VENDOR \
'D', 0, 'W', 0, 'C', 0, 'O', 0, 'T', 0, 'G', 0
"D\0W\0C\0O\0T\0G"
#define STRING_PRODUCT \
'O', 0, 'T', 0, 'G', 0, ' ', 0, 'R', 0, \
'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \
'U', 0, 'B', 0,
"O\0T\0G\0 \0R\0o\0o\0t\0 \0H\0U\0B"
USB_MAKE_STRING_DESC(STRING_VENDOR, dwc_otg_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, dwc_otg_product);

View File

@ -2212,13 +2212,10 @@ static const struct usb_hub_descriptor_min musbotg_hubd = {
};
#define STRING_VENDOR \
'M', 0, 'e', 0, 'n', 0, 't', 0, 'o', 0, 'r', 0, ' ', 0, \
'G', 0, 'r', 0, 'a', 0, 'p', 0, 'h', 0, 'i', 0, 'c', 0, 's', 0
"M\0e\0n\0t\0o\0r\0 \0G\0r\0a\0p\0h\0i\0c\0s"
#define STRING_PRODUCT \
'O', 0, 'T', 0, 'G', 0, ' ', 0, 'R', 0, \
'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \
'U', 0, 'B', 0,
"O\0T\0G\0 \0R\0o\0o\0t\0 \0H\0U\0B"
USB_MAKE_STRING_DESC(STRING_VENDOR, musbotg_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, musbotg_product);

View File

@ -1809,12 +1809,10 @@ static const struct usb_hub_descriptor_min uss820dci_hubd = {
};
#define STRING_VENDOR \
'A', 0, 'G', 0, 'E', 0, 'R', 0, 'E', 0
"A\0G\0E\0R\0E"
#define STRING_PRODUCT \
'D', 0, 'C', 0, 'I', 0, ' ', 0, 'R', 0, \
'o', 0, 'o', 0, 't', 0, ' ', 0, 'H', 0, \
'U', 0, 'B', 0,
"D\0C\0I\0 \0R\0o\0o\0t\0 \0H\0U\0B"
USB_MAKE_STRING_DESC(STRING_VENDOR, uss820dci_vendor);
USB_MAKE_STRING_DESC(STRING_PRODUCT, uss820dci_product);

View File

@ -68,21 +68,16 @@ enum {
};
#define STRING_AUDIO_PRODUCT \
'A', 0, 'u', 0, 'd', 0, 'i', 0, 'o', 0, ' ', 0, \
'T', 0, 'e', 0, 's', 0, 't', 0, ' ', 0, \
'D', 0, 'e', 0, 'v', 0, 'i', 0, 'c', 0, 'e', 0,
"A\0u\0d\0i\0o\0 \0T\0e\0s\0t\0 \0D\0e\0v\0i\0c\0e"
#define STRING_AUDIO_MIXER \
'M', 0, 'i', 0, 'x', 0, 'e', 0, 'r', 0, ' ', 0, \
'i', 0, 'n', 0, 't', 0, 'e', 0, 'r', 0, 'f', 0, 'a', 0, 'c', 0, 'e', 0,
"M\0i\0x\0e\0r\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e"
#define STRING_AUDIO_RECORD \
'R', 0, 'e', 0, 'c', 0, 'o', 0, 'r', 0, 'd', 0, ' ', 0, \
'i', 0, 'n', 0, 't', 0, 'e', 0, 'r', 0, 'f', 0, 'a', 0, 'c', 0, 'e', 0,
"R\0e\0c\0o\0r\0d\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e"
#define STRING_AUDIO_PLAYBACK \
'P', 0, 'l', 0, 'a', 0, 'y', 0, 'b', 0, 'a', 0, 'c', 0, 'k', 0, ' ', 0, \
'i', 0, 'n', 0, 't', 0, 'e', 0, 'r', 0, 'f', 0, 'a', 0, 'c', 0, 'e', 0,
"P\0l\0a\0y\0b\0a\0c\0k\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e"
/* make the real string descriptors */

View File

@ -72,53 +72,27 @@ enum {
};
#define STRING_MAC \
'2', 0, 'A', 0, '2', 0, '3', 0, \
'4', 0, '5', 0, '6', 0, '7', 0, \
'8', 0, '9', 0, 'A', 0, 'B', 0,
"2\0A\0002\0003\0004\0005\0006\0007\08\09\0A\0B"
#define STRING_ETH_CONTROL \
'U', 0, 'S', 0, 'B', 0, ' ', 0, \
'E', 0, 't', 0, 'h', 0, 'e', 0, \
'r', 0, 'n', 0, 'e', 0, 't', 0, \
' ', 0, 'C', 0, 'o', 0, 'm', 0, \
'm', 0, ' ', 0, 'i', 0, 'n', 0, \
't', 0, 'e', 0, 'r', 0, 'f', 0, \
'a', 0, 'c', 0, 'e', 0,
"U\0S\0B\0 \0E\0t\0h\0e\0r\0n\0e\0t\0 " \
"\0C\0o\0m\0m\0 \0I\0n\0t\0e\0r\0f\0a\0c\0e"
#define STRING_ETH_DATA \
'U', 0, 'S', 0, 'B', 0, ' ', 0, \
'E', 0, 't', 0, 'h', 0, 'e', 0, \
'r', 0, 'n', 0, 'e', 0, 't', 0, \
' ', 0, 'D', 0, 'a', 0, 't', 0, \
'a', 0, ' ', 0, 'i', 0, 'n', 0, \
't', 0, 'e', 0, 'r', 0, 'f', 0, \
'a', 0, 'c', 0, 'e', 0,
"U\0S\0B\0 \0E\0t\0h\0e\0r\0n\0e\0t\0 \0D\0a\0t\0a\0 " \
"\0I\0n\0t\0e\0r\0f\0a\0c\0e"
#define STRING_ETH_CONFIG \
'D', 0, 'e', 0, 'f', 0, 'a', 0, \
'u', 0, 'l', 0, 't', 0, ' ', 0, \
'c', 0, 'o', 0, 'n', 0, 'f', 0, \
'i', 0, 'g', 0,
"D\0e\0f\0a\0u\0l\0t\0 \0c\0o\0n\0f\0i\0g"
#define STRING_ETH_VENDOR \
'F', 0, 'r', 0, 'e', 0, 'e', 0, \
'B', 0, 'S', 0, 'D', 0, ' ', 0, \
'f', 0, 'o', 0, 'u', 0, 'n', 0, \
'd', 0, 'a', 0, 't', 0, 'i', 0, \
'o', 0, 'n', 0,
"F\0r\0e\0e\0B\0S\0D\0 \0f\0o\0u\0n\0d\0a\0t\0i\0o\0n"
#define STRING_ETH_PRODUCT \
'U', 0, 'S', 0, 'B', 0, ' ', 0, \
'E', 0, 't', 0, 'h', 0, 'e', 0, \
'r', 0, 'n', 0, 'e', 0, 't', 0, \
' ', 0, 'A', 0, 'd', 0, 'a', 0, \
'p', 0, 't', 0, 'e', 0, 'r', 0,
"U\0S\0B\0 \0E\0t\0h\0e\0r\0n\0e\0t\0 \0A\0d\0a\0p\0t\0e\0r"
#define STRING_ETH_SERIAL \
'D', 0, 'e', 0, 'c', 0, 'e', 0, \
'm', 0, 'b', 0, 'e', 0, 'r', 0, \
' ', 0, '2', 0, '0', 0, '0', 0, \
'7', 0,
"D\0e\0c\0e\0m\0b\0e\0r\0 \0002\0000\0000\0007"
/* make the real string descriptors */

View File

@ -66,13 +66,10 @@ enum {
};
#define STRING_PRODUCT \
'K', 0, 'e', 0, 'y', 0, 'b', 0, 'o', 0, 'a', 0, 'r', 0, 'd', 0, ' ', 0, \
'T', 0, 'e', 0, 's', 0, 't', 0, ' ', 0, \
'D', 0, 'e', 0, 'v', 0, 'i', 0, 'c', 0, 'e', 0,
"K\0e\0y\0b\0o\0a\0r\0d\0 \0T\0e\0s\0t\0 \0D\0e\0v\0i\0c\0e"
#define STRING_KEYBOARD \
'K', 0, 'e', 0, 'y', 0, 'b', 0, 'o', 0, 'a', 0, 'r', 0, 'd', 0, ' ', 0, \
'i', 0, 'n', 0, 't', 0, 'e', 0, 'r', 0, 'f', 0, 'a', 0, 'c', 0, 'e', 0,
"K\0e\0y\0b\0o\0a\0r\0d\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e"
/* make the real string descriptors */

View File

@ -66,13 +66,10 @@ enum {
};
#define STRING_PRODUCT \
'M', 0, 'o', 0, 'd', 0, 'e', 0, 'm', 0, ' ', 0, \
'T', 0, 'e', 0, 's', 0, 't', 0, ' ', 0, \
'D', 0, 'e', 0, 'v', 0, 'i', 0, 'c', 0, 'e', 0,
"M\0o\0d\0e\0m\0 \0T\0e\0s\0t\0 \0D\0e\0v\0i\0c\0e"
#define STRING_MODEM \
'M', 0, 'o', 0, 'd', 0, 'e', 0, 'm', 0, ' ', 0, \
'i', 0, 'n', 0, 't', 0, 'e', 0, 'r', 0, 'f', 0, 'a', 0, 'c', 0, 'e', 0,
"M\0o\0d\0e\0m\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e"
/* make the real string descriptors */

View File

@ -66,13 +66,10 @@ enum {
};
#define STRING_PRODUCT \
'M', 0, 'o', 0, 'u', 0, 's', 0, 'e', 0, ' ', 0, \
'T', 0, 'e', 0, 's', 0, 't', 0, ' ', 0, \
'D', 0, 'e', 0, 'v', 0, 'i', 0, 'c', 0, 'e', 0,
"M\0o\0u\0s\0e\0 \0T\0e\0s\0t\0 \0D\0e\0v\0i\0c\0e"
#define STRING_MOUSE \
'M', 0, 'o', 0, 'u', 0, 's', 0, 'e', 0, ' ', 0, \
'i', 0, 'n', 0, 't', 0, 'e', 0, 'r', 0, 'f', 0, 'a', 0, 'c', 0, 'e', 0,
"M\0o\0u\0s\0e\0 \0i\0n\0t\0e\0r\0f\0a\0c\0e"
/* make the real string descriptors */

View File

@ -69,37 +69,20 @@ enum {
};
#define STRING_MSC_DATA \
'U', 0, 'S', 0, 'B', 0, ' ', 0, \
'M', 0, 'a', 0, 's', 0, 's', 0, \
' ', 0, 'S', 0, 't', 0, 'o', 0, \
'r', 0, 'a', 0, 'g', 0, 'e', 0, \
' ', 0, 'I', 0, 'n', 0, 't', 0, \
'e', 0, 'r', 0, 'f', 0, 'a', 0, \
'c', 0, 'e', 0,
"U\0S\0B\0 \0M\0a\0s\0s\0 \0S\0t\0o\0r\0a\0g\0e\0 " \
"\0I\0n\0t\0e\0r\0f\0a\0c\0e"
#define STRING_MSC_CONFIG \
'D', 0, 'e', 0, 'f', 0, 'a', 0, \
'u', 0, 'l', 0, 't', 0, ' ', 0, \
'c', 0, 'o', 0, 'n', 0, 'f', 0, \
'i', 0, 'g', 0,
"D\0e\0f\0a\0u\0l\0t\0 \0c\0o\0n\0f\0i\0g"
#define STRING_MSC_VENDOR \
'F', 0, 'r', 0, 'e', 0, 'e', 0, \
'B', 0, 'S', 0, 'D', 0, ' ', 0, \
'f', 0, 'o', 0, 'u', 0, 'n', 0, \
'd', 0, 'a', 0, 't', 0, 'i', 0, \
'o', 0, 'n', 0,
"F\0r\0e\0e\0B\0S\0D\0 \0f\0o\0u\0n\0d\0a\0t\0i\0o\0n"
#define STRING_MSC_PRODUCT \
'U', 0, 'S', 0, 'B', 0, ' ', 0, \
'M', 0, 'e', 0, 'm', 0, 'o', 0, \
'r', 0, 'y', 0, ' ', 0, 'S', 0, \
't', 0, 'i', 0, 'c', 0, 'k', 0
"U\0S\0B\0 \0M\0e\0m\0o\0r\0y\0 \0S\0t\0i\0c\0k"
#define STRING_MSC_SERIAL \
'M', 0, 'a', 0, 'r', 0, 'c', 0, \
'h', 0, ' ', 0, '2', 0, '0', 0, \
'0', 0, '8', 0,
"M\0a\0r\0c\0h\0 \0002\0000\0000\08"
/* make the real string descriptors */

View File

@ -78,33 +78,19 @@ enum {
};
#define STRING_MTP_DATA \
'U', 0, 'S', 0, 'B', 0, ' ', 0, \
'M', 0, 'T', 0, 'P', 0, \
' ', 0, 'I', 0, 'n', 0, 't', 0, \
'e', 0, 'r', 0, 'f', 0, 'a', 0, \
'c', 0, 'e', 0,
"U\0S\0B\0 \0M\0T\0P\0 \0I\0n\0t\0e\0r\0f\0a\0c\0e"
#define STRING_MTP_CONFIG \
'D', 0, 'e', 0, 'f', 0, 'a', 0, \
'u', 0, 'l', 0, 't', 0, ' ', 0, \
'c', 0, 'o', 0, 'n', 0, 'f', 0, \
'i', 0, 'g', 0,
"D\0e\0f\0a\0u\0l\0t\0 \0c\0o\0n\0f\0i\0g"
#define STRING_MTP_VENDOR \
'F', 0, 'r', 0, 'e', 0, 'e', 0, \
'B', 0, 'S', 0, 'D', 0, ' ', 0, \
'f', 0, 'o', 0, 'u', 0, 'n', 0, \
'd', 0, 'a', 0, 't', 0, 'i', 0, \
'o', 0, 'n', 0,
"F\0r\0e\0e\0B\0S\0D\0 \0f\0o\0u\0n\0d\0a\0t\0i\0o\0n"
#define STRING_MTP_PRODUCT \
'U', 0, 'S', 0, 'B', 0, ' ', 0, \
'M', 0, 'T', 0, 'P', 0,
"U\0S\0B\0 \0M\0T\0P"
#define STRING_MTP_SERIAL \
'J', 0, 'u', 0, 'n', 0, 'e', 0, \
' ', 0, '2', 0, '0', 0, '0', 0, \
'8', 0,
"J\0u\0n\0e\0 \0002\0000\0000\08"
/* make the real string descriptors */