Skip to content

Commit d2999e1

Browse files
Robert BaldygaFelipe Balbi
authored andcommitted
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>
1 parent 2eeb001 commit d2999e1

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ static const struct {
3737
.header = {
3838
.magic = htole32(FUNCTIONFS_DESCRIPTORS_MAGIC),
3939
.length = htole32(sizeof(descriptors)),
40-
.fs_count = 3,
41-
.hs_count = 3,
40+
.fs_count = htole32(3),
41+
.hs_count = htole32(3),
4242
},
4343
.fs_descs = {
4444
.intf = {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ static const struct {
3535
.header = {
3636
.magic = htole32(FUNCTIONFS_DESCRIPTORS_MAGIC),
3737
.length = htole32(sizeof(descriptors)),
38-
.fs_count = 3,
39-
.hs_count = 3,
38+
.fs_count = htole32(3),
39+
.hs_count = htole32(3),
4040
},
4141
.fs_descs = {
4242
.intf = {

0 commit comments

Comments
 (0)