chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix various syntax errors in rules
[elogind.git]
/
libudev
/
libudev-device.c
diff --git
a/libudev/libudev-device.c
b/libudev/libudev-device.c
index 7e6b7f1ce72c6a2bb4c4e58a538a2fba115c1b6e..5811490a34599cbfdb4078938bda213a33c405fa 100644
(file)
--- a/
libudev/libudev-device.c
+++ b/
libudev/libudev-device.c
@@
-279,7
+279,7
@@
int udev_device_read_db(struct udev_device *udev_device)
return 0;
}
return 0;
}
- f = fopen(filename, "r");
+ f = fopen(filename, "r
e
");
if (f == NULL) {
dbg(udev_device->udev, "error reading db file %s: %m\n", filename);
return -1;
if (f == NULL) {
dbg(udev_device->udev, "error reading db file %s: %m\n", filename);
return -1;
@@
-339,7
+339,7
@@
int udev_device_read_uevent_file(struct udev_device *udev_device)
return 0;
util_strscpyl(filename, sizeof(filename), udev_device->syspath, "/uevent", NULL);
return 0;
util_strscpyl(filename, sizeof(filename), udev_device->syspath, "/uevent", NULL);
- f = fopen(filename, "r");
+ f = fopen(filename, "r
e
");
if (f == NULL)
return -1;
udev_device->uevent_loaded = true;
if (f == NULL)
return -1;
udev_device->uevent_loaded = true;
@@
-1164,7
+1164,7
@@
const char *udev_device_get_sysattr_value(struct udev_device *udev_device, const
goto out;
/* read attribute value */
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;
if (fd < 0) {
dbg(udev_device->udev, "attribute '%s' can not be opened\n", path);
goto out;