memset(&args, 0, sizeof(args));
args.cmd = BTRFS_QUOTA_CTL_ENABLE;
- if (ioctl(fd, BTRFS_IOC_QUOTA_CTL, &args) < 0)
+ if (ioctl(fd, BTRFS_IOC_QUOTA_CTL, &args) != 0)
throw runtime_error_with_errno("ioctl(BTRFS_IOC_QUOTA_CTL) failed", errno);
}
memset(&args, 0, sizeof(args));
args.cmd = BTRFS_QUOTA_CTL_DISABLE;
- if (ioctl(fd, BTRFS_IOC_QUOTA_CTL, &args) < 0)
+ if (ioctl(fd, BTRFS_IOC_QUOTA_CTL, &args) != 0)
throw runtime_error_with_errno("ioctl(BTRFS_IOC_QUOTA_CTL) failed", errno);
}
struct btrfs_ioctl_quota_rescan_args args;
memset(&args, 0, sizeof(args));
- if (ioctl(fd, BTRFS_IOC_QUOTA_RESCAN, &args) < 0)
+ if (ioctl(fd, BTRFS_IOC_QUOTA_RESCAN, &args) != 0)
throw runtime_error_with_errno("ioctl(BTRFS_IOC_QUOTA_RESCAN) failed", errno);
while (true)
memset(&args, 0, sizeof(args));
- if (ioctl(fd, BTRFS_IOC_QUOTA_RESCAN_STATUS, &args) < 0)
- throw runtime_error_with_errno("ioctl(BTRFS_IOC_QUOTA_STATUS) failed", errno);
+ if (ioctl(fd, BTRFS_IOC_QUOTA_RESCAN_STATUS, &args) != 0)
+ throw runtime_error_with_errno("ioctl(BTRFS_IOC_QUOTA_RESCAN_STATUS) failed", errno);
if (!args.flags)
break;
while (true)
{
- if (ioctl(fd, BTRFS_IOC_TREE_SEARCH, &args) < 0)
+ if (ioctl(fd, BTRFS_IOC_TREE_SEARCH, &args) != 0)
throw runtime_error_with_errno("ioctl(BTRFS_IOC_TREE_SEARCH) failed", errno);
if (sk->nr_items == 0)
sk->max_type = BTRFS_QGROUP_INFO_KEY;
sk->nr_items = 16;
- if (ioctl(fd, BTRFS_IOC_TREE_SEARCH, &args) < 0)
+ if (ioctl(fd, BTRFS_IOC_TREE_SEARCH, &args) != 0)
throw runtime_error_with_errno("ioctl(BTRFS_IOC_TREE_SEARCH) failed", errno);
if (sk->nr_items != 1)