diff options
author | Karel Zak | 2019-06-18 13:30:42 +0200 |
---|---|---|
committer | Karel Zak | 2019-06-18 13:30:42 +0200 |
commit | 7571ec08a15d54ad05e4b619ccef5a6f10ce30bc (patch) | |
tree | e719f705734ae8f7f5744808f7265a22bb7aa6b3 /libfdisk/src/libfdisk.h.in | |
parent | Merge branch 'su_err_msg' of https://github.com/jhrozek/util-linux (diff) | |
download | kernel-qcow2-util-linux-7571ec08a15d54ad05e4b619ccef5a6f10ce30bc.tar.gz kernel-qcow2-util-linux-7571ec08a15d54ad05e4b619ccef5a6f10ce30bc.tar.xz kernel-qcow2-util-linux-7571ec08a15d54ad05e4b619ccef5a6f10ce30bc.zip |
libfdisk: add fdisk_assign_device_by_fd()
It's possible that caller has the device already opened for some
other task, so let's reuse the file descriptor.
Requested-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libfdisk/src/libfdisk.h.in')
-rw-r--r-- | libfdisk/src/libfdisk.h.in | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libfdisk/src/libfdisk.h.in b/libfdisk/src/libfdisk.h.in index 69c6fd820..0669c0a7c 100644 --- a/libfdisk/src/libfdisk.h.in +++ b/libfdisk/src/libfdisk.h.in @@ -195,6 +195,8 @@ int fdisk_is_labeltype(struct fdisk_context *cxt, enum fdisk_labeltype id); int fdisk_assign_device(struct fdisk_context *cxt, const char *fname, int readonly); +int fdisk_assign_device_by_fd(struct fdisk_context *cxt, int fd, + const char *fname, int readonly); int fdisk_deassign_device(struct fdisk_context *cxt, int nosync); int fdisk_reassign_device(struct fdisk_context *cxt); |