]> www.infradead.org Git - users/sagi/libnvme.git/commit
ioctl: Rearrange members in nvme_lockdown_args
authorDaniel Wagner <dwagner@suse.de>
Thu, 13 Jan 2022 14:49:10 +0000 (15:49 +0100)
committerDaniel Wagner <dwagner@suse.de>
Thu, 13 Jan 2022 17:44:03 +0000 (18:44 +0100)
commit65d2d83a7b4fdcfc30fd0c3bb92e84d433544627
tree9bcf0f0fa3ea7be101badb92718aa267c1d41c8e
parent301c99ee6cbafe65a0b024d3f97cb6fef1fd842e
ioctl: Rearrange members in nvme_lockdown_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_lockdown_args {
        int                        args_size;            /*     0     4 */
        int                        fd;                   /*     4     4 */
        __u32 *                    result;               /*     8     8 */
        __u32                      timeout;              /*    16     4 */
        __u8                       scp;                  /*    20     1 */
        __u8                       prhbt;                /*    21     1 */
        __u8                       ifc;                  /*    22     1 */
        __u8                       ofi;                  /*    23     1 */
        __u8                       uuidx;                /*    24     1 */

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

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