# libudev
# ------------------------------------------------------------------------------
LIBUDEV_CURRENT=8
-LIBUDEV_REVISION=0
+LIBUDEV_REVISION=1
LIBUDEV_AGE=8
SUBDIRS += libudev/docs
return 0;
}
- f = fopen(filename, "r");
+ f = fopen(filename, "re");
if (f == NULL) {
dbg(udev_device->udev, "error reading db file %s: %m\n", filename);
return -1;
return 0;
util_strscpyl(filename, sizeof(filename), udev_device->syspath, "/uevent", NULL);
- f = fopen(filename, "r");
+ f = fopen(filename, "re");
if (f == NULL)
return -1;
udev_device->uevent_loaded = true;
goto out;
/* read attribute value */
- fd = open(path, O_RDONLY);
+ fd = open(path, O_RDONLY|O_CLOEXEC);
if (fd < 0) {
dbg(udev_device->udev, "attribute '%s' can not be opened\n", path);
goto out;
ssize_t len;
util_strscpyl(filename, sizeof(filename), udev_get_sys_path(udev), "/kernel/uevent_seqnum", NULL);
- fd = open(filename, O_RDONLY);
+ fd = open(filename, O_RDONLY|O_CLOEXEC);
if (fd < 0)
return 0;
len = read(fd, buf, sizeof(buf));
FILE *queue_file;
util_strscpyl(filename, sizeof(filename), udev_get_dev_path(udev_queue->udev), "/.udev/queue.bin", NULL);
- queue_file = fopen(filename, "r");
+ queue_file = fopen(filename, "re");
if (queue_file == NULL)
return NULL;
}
if (config_file == NULL)
goto err;
- f = fopen(config_file, "r");
+ f = fopen(config_file, "re");
if (f != NULL) {
char line[UTIL_LINE_SIZE];
int line_nr = 0;