summaryrefslogtreecommitdiffstats
path: root/libfdisk/src/fdiskP.h
diff options
context:
space:
mode:
authorKarel Zak2019-06-18 13:30:42 +0200
committerKarel Zak2019-06-18 13:30:42 +0200
commit7571ec08a15d54ad05e4b619ccef5a6f10ce30bc (patch)
treee719f705734ae8f7f5744808f7265a22bb7aa6b3 /libfdisk/src/fdiskP.h
parentMerge branch 'su_err_msg' of https://github.com/jhrozek/util-linux (diff)
downloadkernel-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/fdiskP.h')
-rw-r--r--libfdisk/src/fdiskP.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/libfdisk/src/fdiskP.h b/libfdisk/src/fdiskP.h
index 19c1c7953..fefebae2a 100644
--- a/libfdisk/src/fdiskP.h
+++ b/libfdisk/src/fdiskP.h
@@ -389,6 +389,7 @@ struct fdisk_context {
pt_collision : 1, /* another PT detected by libblkid */
no_disalogs : 1, /* disable dialog-driven partititoning */
dev_model_probed : 1, /* tried to read from sys */
+ private_fd : 1, /* open by libfdisk */
listonly : 1; /* list partition, nothing else */
char *collision; /* name of already existing FS/PT */