From: Heitor Ricardo Alves de Siqueira Date: Fri, 22 Apr 2016 19:21:33 +0000 (-0300) Subject: fix data_size and metadata_size types X-Git-Tag: v0.7~9^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=01d1ae33883e4e2538654efd41bf8fe3ceb2d76b;p=users%2Fsagi%2Fnvme-cli.git fix data_size and metadata_size types The data_size and metadata_size fields in the config struct are declared as __u32, but should actually be __u64. The current types cause issues in the argument parsing functions depending on machine architecture and endianness. In ppc64, using __u32 causes "data size not provided" errors due to the way writes are being done by argconfig_parse() at src/argconfig.c. Changing the types to __u64 should fix this behaviour and is in accordance to the CFG_LONG_SUFFIX flag. Signed-off-by: Heitor Ricardo Alves de Siqueira --- diff --git a/nvme.c b/nvme.c index cdfc9744..17c65055 100644 --- a/nvme.c +++ b/nvme.c @@ -2042,8 +2042,8 @@ static int submit_io(int opcode, char *command, const char *desc, struct config { __u64 start_block; __u16 block_count; - __u32 data_size; - __u32 metadata_size; + __u64 data_size; + __u64 metadata_size; __u32 ref_tag; char *data; char *metadata;