]> git.karo-electronics.de Git - karo-tx-linux.git/commit
tools: ffs-test: add compatibility code for old kernels
authorMichal Nazarewicz <mina86@mina86.com>
Wed, 27 Aug 2014 20:58:47 +0000 (22:58 +0200)
committerFelipe Balbi <balbi@ti.com>
Tue, 2 Sep 2014 14:16:46 +0000 (09:16 -0500)
commitb9a4274699c6973f62979d664cbe7c9aca4f6a9a
tree30fe4bf98ef97f9884cebfe35df467e32ba12faf
parent51c208c746e800dba37d1a54d3c5e601630266c4
tools: ffs-test: add compatibility code for old kernels

If ffs-test is used with a kernel prior to 3.14, which do not
support the new descriptors format, it will fail when trying to
write the descriptors.  Add a function that converts the new
descriptors to the legacy ones and use it to retry writing the
descriptors using the legacy format.

Also add ā€œ-lā€ flag to ffs-test which will cause the tool to
never try the new format and instead immediatelly try the
legacy one.  This should be useful to test whether parsing
of the old format still works on given 3.14+ kernel.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
tools/usb/ffs-test.c