I'm going to use struct
solaris_x86_slice from linux kernel header in user space. Struct is defined as:
struct solaris_x86_slice {
__le16 s_tag; /* ID tag of partition */
__le16 s_flag; /* permission flags */
__le32 s_start; /* start sector no of partition */
__le32 s_size; /* # of blocks in partition */
};
Should I use as byte order fixed types these kernel space specific types __le16
, __le32
(via <linux/types.h>
) or is there anything user space specific which major libc implementations (glibc, uclibc, musl) implement?
I don't see any type in <endian.h>
, there are only conversion functions, so I incline to use __le16
, __le32
.