Skip to content

Commit

Permalink
tools: ffs-aio-example: fix header values endianess
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Robert Baldyga <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
  • Loading branch information
Robert Baldyga authored and Felipe Balbi committed Jun 30, 2014
1 parent 2eeb001 commit d2999e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
4 changes: 2 additions & 2 deletions tools/usb/ffs-aio-example/simple/device_app/aio_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit d2999e1

Please sign in to comment.