summaryrefslogtreecommitdiff
path: root/src/udev/scsi_id
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-13 14:59:56 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-13 14:59:56 +0100
commitc8a202b7d47f9d6bba3100a208abdadfc383499e (patch)
treed19560cf0723f8e2305170881eb442b5ecb12b0d /src/udev/scsi_id
parent955d98c9c1104d469c2989dbfb58f58ee6fe9bdc (diff)
everywhere: always use O_CLOEXEC where it makes sense
Diffstat (limited to 'src/udev/scsi_id')
-rw-r--r--src/udev/scsi_id/scsi_serial.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/scsi_id/scsi_serial.c b/src/udev/scsi_id/scsi_serial.c
index 2f2afcee6e..378a73d863 100644
--- a/src/udev/scsi_id/scsi_serial.c
+++ b/src/udev/scsi_id/scsi_serial.c
@@ -818,7 +818,7 @@ int scsi_std_inquiry(struct udev *udev,
struct stat statbuf;
int err = 0;
- fd = open(devname, O_RDONLY | O_NONBLOCK);
+ fd = open(devname, O_RDONLY | O_NONBLOCK | O_CLOEXEC);
if (fd < 0) {
log_debug("scsi_id: cannot open %s: %m", devname);
return 1;
@@ -866,7 +866,7 @@ int scsi_get_serial(struct udev *udev,
for (cnt = 20; cnt > 0; cnt--) {
struct timespec duration;
- fd = open(devname, O_RDONLY | O_NONBLOCK);
+ fd = open(devname, O_RDONLY | O_NONBLOCK | O_CLOEXEC);
if (fd >= 0 || errno != EBUSY)
break;
duration.tv_sec = 0;