diff options
author | Krzysztof Opasiak <k.opasiak@samsung.com> | 2016-12-13 22:00:26 +0100 |
---|---|---|
committer | Krzysztof Opasiak <k.opasiak@samsung.com> | 2016-12-13 22:00:26 +0100 |
commit | d9c5a1bc4994e29144fd2a5b1fbde75b1671bfa0 (patch) | |
tree | 37419fa9c3d495b3068f9045fd7547009c587c90 | |
parent | 9be0405ed1a3304154062e2f0c4bdf8cd8dcf6f8 (diff) | |
download | libusbg-d9c5a1bc4994e29144fd2a5b1fbde75b1671bfa0.tar.gz libusbg-d9c5a1bc4994e29144fd2a5b1fbde75b1671bfa0.tar.bz2 libusbg-d9c5a1bc4994e29144fd2a5b1fbde75b1671bfa0.zip |
libusbgx: Use suitable prefix for usbg_gadget_str enum
Let's use USBG_ prefix for usbg_gadget_str enum values
to avoid users confusion.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
-rw-r--r-- | include/usbg/usbg.h | 6 | ||||
-rw-r--r-- | tests/test.c | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/include/usbg/usbg.h b/include/usbg/usbg.h index 68a71b5..359192a 100644 --- a/include/usbg/usbg.h +++ b/include/usbg/usbg.h @@ -137,9 +137,9 @@ typedef struct typedef enum { USBG_GADGET_STR_MIN = 0, - STR_PRODUCT = USBG_GADGET_STR_MIN, - STR_MANUFACTURER, - STR_SERIAL_NUMBER, + USBG_STR_PRODUCT = USBG_GADGET_STR_MIN, + USBG_STR_MANUFACTURER, + USBG_STR_SERIAL_NUMBER, USBG_GADGET_STR_MAX, } usbg_gadget_str; diff --git a/tests/test.c b/tests/test.c index 1a4d766..a4d7fc7 100644 --- a/tests/test.c +++ b/tests/test.c @@ -837,9 +837,9 @@ static struct { usbg_gadget_str code; const char *name; } gadget_str_names[] = { - {STR_PRODUCT, "product"}, - {STR_MANUFACTURER, "manufacturer"}, - {STR_SERIAL_NUMBER, "serialnumber"}, + {USBG_STR_PRODUCT, "product"}, + {USBG_STR_MANUFACTURER, "manufacturer"}, + {USBG_STR_SERIAL_NUMBER, "serialnumber"}, }; /** @@ -1431,13 +1431,13 @@ static void test_set_gadget_strs(void **data) pull_gadget_string(tg, LANG_US_ENG, i, get_gadget_str(ts->strs, i)); - ret = usbg_set_gadget_str(g, STR_SERIAL_NUMBER, LANG_US_ENG, ts->strs->str_ser); + ret = usbg_set_gadget_str(g, USBG_STR_SERIAL_NUMBER, LANG_US_ENG, ts->strs->str_ser); assert_int_equal(ret, 0); - ret = usbg_set_gadget_str(g, STR_MANUFACTURER, LANG_US_ENG, ts->strs->str_mnf); + ret = usbg_set_gadget_str(g, USBG_STR_MANUFACTURER, LANG_US_ENG, ts->strs->str_mnf); assert_int_equal(ret, 0); - ret = usbg_set_gadget_str(g, STR_PRODUCT, LANG_US_ENG, ts->strs->str_prd); + ret = usbg_set_gadget_str(g, USBG_STR_PRODUCT, LANG_US_ENG, ts->strs->str_prd); assert_int_equal(ret, 0); } } |