projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
029f4f2
)
udev: check return value of symlink
author
Václav Pavlín
<vpavlin@redhat.com>
Fri, 21 Sep 2012 10:52:08 +0000
(12:52 +0200)
committer
Kay Sievers
<kay@vrfy.org>
Sun, 23 Sep 2012 12:24:43 +0000
(14:24 +0200)
src/udev/udev-watch.c
patch
|
blob
|
history
diff --git
a/src/udev/udev-watch.c
b/src/udev/udev-watch.c
index
c27a280
..
eebcee6
100644
(file)
--- a/
src/udev/udev-watch.c
+++ b/
src/udev/udev-watch.c
@@
-98,6
+98,7
@@
void udev_watch_begin(struct udev *udev, struct udev_device *dev)
{
char filename[UTIL_PATH_SIZE];
int wd;
+ int r;
if (inotify_fd < 0)
return;
@@
-113,7
+114,9
@@
void udev_watch_begin(struct udev *udev, struct udev_device *dev)
snprintf(filename, sizeof(filename), "/run/udev/watch/%d", wd);
mkdir_parents(filename, 0755);
unlink(filename);
- symlink(udev_device_get_id_filename(dev), filename);
+ r = symlink(udev_device_get_id_filename(dev), filename);
+ if (r < 0)
+ log_error("Failed to create symlink: %m");
udev_device_set_watch_handle(dev, wd);
}