]> www.infradead.org Git - users/sagi/libnvme.git/commit
ioctl: Rearrange members in nvme_get_property_args
authorDaniel Wagner <dwagner@suse.de>
Thu, 13 Jan 2022 16:47:10 +0000 (17:47 +0100)
committerDaniel Wagner <dwagner@suse.de>
Thu, 13 Jan 2022 17:44:03 +0000 (18:44 +0100)
commit425b9ceeb2d15a3c9cf24b3275035e15047a8389
tree62c88d6047fe928d6cfb43efa36bc3903abee6cb
parent3bca40d5402d7b41458328ef457058298d24cf4a
ioctl: Rearrange members in nvme_get_property_args

Avoid any holes in the struct by rearranging the members. Also add the
attribute packed to struct definition to reduce ABI breakage.

struct nvme_get_property_args {
        int                        args_size;            /*     0     4 */
        int                        fd;                   /*     4     4 */
        __u64 *                    value;                /*     8     8 */
        __u32                      timeout;              /*    16     4 */
        int                        offset;               /*    20     4 */

       /* size: 24, cachelines: 1, members: 5 */
        /* last cacheline: 24 bytes */
} __attribute__((__aligned__(8)));

Signed-off-by: Daniel Wagner <dwagner@suse.de>
src/nvme/ioctl.h