summaryrefslogtreecommitdiffstats
path: root/libblkid/src/probe.c
diff options
context:
space:
mode:
authorKarel Zak2012-08-29 19:49:19 +0200
committerKarel Zak2012-09-04 16:49:28 +0200
commit49a8f58e48a5b7f5d4852700ecdd317c7b547a74 (patch)
tree18299f00849243a74d3b65b52ec24427f86c24b7 /libblkid/src/probe.c
parentbuild-sys: release++ (v2.22) (diff)
downloadkernel-qcow2-util-linux-49a8f58e48a5b7f5d4852700ecdd317c7b547a74.tar.gz
kernel-qcow2-util-linux-49a8f58e48a5b7f5d4852700ecdd317c7b547a74.tar.xz
kernel-qcow2-util-linux-49a8f58e48a5b7f5d4852700ecdd317c7b547a74.zip
libblkid: use O_CLOEXEC
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src/probe.c')
-rw-r--r--libblkid/src/probe.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c
index 467b1fda8..c371656a4 100644
--- a/libblkid/src/probe.c
+++ b/libblkid/src/probe.c
@@ -209,7 +209,7 @@ blkid_probe blkid_new_probe_from_filename(const char *filename)
if (!filename)
return NULL;
- fd = open(filename, O_RDONLY);
+ fd = open(filename, O_RDONLY|O_CLOEXEC);
if (fd < 0)
return NULL;
@@ -934,7 +934,7 @@ int blkid_do_probe(blkid_probe pr)
* <example>
* <title>wipe all filesystems or raids from the device</title>
* <programlisting>
- * fd = open(devname, O_RDWR);
+ * fd = open(devname, O_RDWR|O_CLOEXEC);
* blkid_probe_set_device(pr, fd, 0, 0);
*
* blkid_probe_enable_superblocks(pr, 1);