diff options
author | Karel Zak | 2019-01-22 11:12:42 +0100 |
---|---|---|
committer | Karel Zak | 2019-01-22 11:12:42 +0100 |
commit | 9fcc893624dc4c9f2617fbf6827d7df3537d5452 (patch) | |
tree | 9cb73708cb5bf2c19c86865e0e1fc661d7a53df2 /lib | |
parent | swapon: be more explicit about BTRFS (diff) | |
download | kernel-qcow2-util-linux-9fcc893624dc4c9f2617fbf6827d7df3537d5452.tar.gz kernel-qcow2-util-linux-9fcc893624dc4c9f2617fbf6827d7df3537d5452.tar.xz kernel-qcow2-util-linux-9fcc893624dc4c9f2617fbf6827d7df3537d5452.zip |
lib/loopdev: differentiate between setter()s and ioctl calls
Now the internal API uses loopcxt_set_...() to set context variables
as well as to call ioctls. This patch introduces loopcxt_ioctl_...()
to makes things more obvious to readers.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/loopdev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/loopdev.c b/lib/loopdev.c index de0d50ba2..556c4df26 100644 --- a/lib/loopdev.c +++ b/lib/loopdev.c @@ -1216,7 +1216,7 @@ static int loopcxt_check_size(struct loopdev_cxt *lc, int file_fd) "size mismatch (%ju/%ju)", size, expected_size)); - if (loopcxt_set_capacity(lc)) { + if (loopcxt_ioctl_capacity(lc)) { /* ioctl not available */ if (errno == ENOTTY || errno == EINVAL) errno = ERANGE; @@ -1374,7 +1374,7 @@ err: * * Returns: <0 on error, 0 on success. */ -int loopcxt_set_status(struct loopdev_cxt *lc) +int loopcxt_ioctl_status(struct loopdev_cxt *lc) { int dev_fd, rc = -1; @@ -1397,7 +1397,7 @@ int loopcxt_set_status(struct loopdev_cxt *lc) return 0; } -int loopcxt_set_capacity(struct loopdev_cxt *lc) +int loopcxt_ioctl_capacity(struct loopdev_cxt *lc) { int fd = loopcxt_get_fd(lc); @@ -1415,7 +1415,7 @@ int loopcxt_set_capacity(struct loopdev_cxt *lc) return 0; } -int loopcxt_set_dio(struct loopdev_cxt *lc, unsigned long use_dio) +int loopcxt_ioctl_dio(struct loopdev_cxt *lc, unsigned long use_dio) { int fd = loopcxt_get_fd(lc); @@ -1437,7 +1437,7 @@ int loopcxt_set_dio(struct loopdev_cxt *lc, unsigned long use_dio) * Kernel uses "unsigned long" as ioctl arg, but we use u64 for all sizes to * keep loopdev internal API simple. */ -int loopcxt_set_blocksize(struct loopdev_cxt *lc, uint64_t blocksize) +int loopcxt_ioctl_blocksize(struct loopdev_cxt *lc, uint64_t blocksize) { int fd = loopcxt_get_fd(lc); |