Explorar o código

tools: ffs-aio-example: fix header values endianess

We wrap numeric values of fs_count and hs_count fields in htole32,
because they should be in little-endian format.

Acked-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Robert Baldyga %!s(int64=11) %!d(string=hai) anos
pai
achega
d2999e1b10

+ 2 - 2
tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c

@@ -37,8 +37,8 @@ static const struct {
 	.header = {
 		.magic = htole32(FUNCTIONFS_DESCRIPTORS_MAGIC),
 		.length = htole32(sizeof(descriptors)),
-		.fs_count = 3,
-		.hs_count = 3,
+		.fs_count = htole32(3),
+		.hs_count = htole32(3),
 	},
 	.fs_descs = {
 		.intf = {

+ 2 - 2
tools/usb/ffs-aio-example/simple/device_app/aio_simple.c

@@ -35,8 +35,8 @@ static const struct {
 	.header = {
 		.magic = htole32(FUNCTIONFS_DESCRIPTORS_MAGIC),
 		.length = htole32(sizeof(descriptors)),
-		.fs_count = 3,
-		.hs_count = 3,
+		.fs_count = htole32(3),
+		.hs_count = htole32(3),
 	},
 	.fs_descs = {
 		.intf = {