Use module options to enforce expected device attributes 37/88037/2
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Mon, 12 Sep 2016 19:26:25 +0000 (21:26 +0200)
committerKrzysztof Opasiak <k.opasiak@samsung.com>
Tue, 13 Sep 2016 08:12:33 +0000 (10:12 +0200)
g_ffs provides a set of standard module parameters which
allows to set device indentity. As usb host tests expects
a predefined identity of test device let's use those module
params to set it.

Change-Id: I32782d61f756e6cd4fb13cbcccc2b5ef3bd0a91e
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
src/usb-host-test/usb-host-test.c

index 92dfc0b..d6764ab 100644 (file)
@@ -349,7 +349,13 @@ int start()
        }
 
        /* If you need to setup vid, pid or other data use module parameters */
-       ret = load_module("g_ffs", "idVendor=0x1D6B idProduct=0x104");
+       ret = load_module("g_ffs",
+                         "idVendor=0x1D6B"
+                         " idProduct=0x104"
+                         " bcdDevice=0x0001"
+                         " iManufacturer=\"Foo Inc.\""
+                         " iProduct=\"Bar Gadget\""
+                         " iSerialNumber=\"0123456789\"");
        if (ret < 0) {
                using_legacy = 0;
                _I("Legacy gadget g_ffs not found. Using ConfigFS.");