mirror of
https://github.com/versity/scoutfs.git
synced 2026-09-19 14:34:16 +00:00
Remove valid_bytes from stat _more ioctls
The idea here was that we'd expand the size of the struct and valid_bytes would tell the kernel which fields were present in userspace's struct. That doesn't combine well with the ioctl convention of having the size of the type baked into the ioctl number. We'll remove this to make the world less surprising. If we expand the interface we'd add additional ioctls and types. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -48,7 +48,6 @@ static int do_df(struct df_args *args)
|
||||
if (fd < 0)
|
||||
return fd;
|
||||
|
||||
sfm.valid_bytes = sizeof(struct scoutfs_ioctl_statfs_more);
|
||||
ret = ioctl(fd, SCOUTFS_IOC_STATFS_MORE, &sfm);
|
||||
if (ret < 0) {
|
||||
fprintf(stderr, "statfs_more returned %d: error %s (%d)\n",
|
||||
|
||||
@@ -131,12 +131,10 @@ static int do_stat(struct stat_args *args)
|
||||
if (args->is_inode) {
|
||||
cmd = SCOUTFS_IOC_STAT_MORE;
|
||||
fields = inode_fields;
|
||||
st.stm.valid_bytes = sizeof(struct scoutfs_ioctl_stat_more);
|
||||
pr = print_inode_field;
|
||||
} else {
|
||||
cmd = SCOUTFS_IOC_STATFS_MORE;
|
||||
fields = fs_fields;
|
||||
st.sfm.valid_bytes = sizeof(struct scoutfs_ioctl_statfs_more);
|
||||
pr = print_fs_field;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user