diff options
Diffstat (limited to 'src/udev/scsi_id/scsi_serial.c')
-rw-r--r-- | src/udev/scsi_id/scsi_serial.c | 4 |
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; |