1
0
Fork 0
mirror of https://github.com/linux-usb-gadgets/libusbgx.git synced 2025-07-25 14:35:06 +03:00

libusbgx: Separate config attrs and strs form configuration.

Configuration, its attributes and strings are all logically
independent so should be placed in separate structures.

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
[Port from libusbg and update description]
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
This commit is contained in:
Krzysztof Opasiak 2014-02-19 14:39:35 +01:00
parent 4b935e55cd
commit 7c85291a51
3 changed files with 54 additions and 23 deletions

View file

@ -80,9 +80,9 @@ void show_config(struct config *c)
struct binding *b;
fprintf(stdout, " Configuration '%s'\n", c->name);
fprintf(stdout, " MaxPower\t\t%d\n", c->maxpower);
fprintf(stdout, " bmAttributes\t0x%02x\n", c->bmattrs);
fprintf(stdout, " configuration\t%s\n", c->str_cfg);
fprintf(stdout, " MaxPower\t\t%d\n", c->attrs.bMaxPower);
fprintf(stdout, " bmAttributes\t0x%02x\n", c->attrs.bmAttributes);
fprintf(stdout, " configuration\t%s\n", c->strs.configuration);
usbg_for_each_binding(b, c)
fprintf(stdout, " %s -> %s\n", b->name,b->target->name);
}