chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
polkit: as we dropped support for the polkit bus transport, also drop its polkit...
[elogind.git]
/
src
/
udev
/
udevd.c
diff --git
a/src/udev/udevd.c
b/src/udev/udevd.c
index 95c646802918ee8da6083069a6881da2f8acfc5c..29ccb518e6f1c274c23c4377f2362e7b5aac0b79 100644
(file)
--- a/
src/udev/udevd.c
+++ b/
src/udev/udevd.c
@@
-1060,7
+1060,7
@@
static int parse_argv(int argc, char *argv[]) {
case 't':
r = safe_atou64(optarg, &arg_event_timeout_usec);
if (r < 0)
case 't':
r = safe_atou64(optarg, &arg_event_timeout_usec);
if (r < 0)
- log_warning("Invali
g
--event-timeout ignored: %s", optarg);
+ log_warning("Invali
d
--event-timeout ignored: %s", optarg);
else {
arg_event_timeout_usec *= USEC_PER_SEC;
arg_event_timeout_warn_usec = (arg_event_timeout_usec / 3) ? : 1;
else {
arg_event_timeout_usec *= USEC_PER_SEC;
arg_event_timeout_warn_usec = (arg_event_timeout_usec / 3) ? : 1;
@@
-1139,13
+1139,26
@@
int main(int argc, char *argv[]) {
goto exit;
}
goto exit;
}
- label_init("/dev");
+ r = label_init("/dev");
+ if (r < 0) {
+ log_error("could not initialize labelling: %s", strerror(-r));
+ goto exit;
+ }
/* set umask before creating any file/directory */
/* set umask before creating any file/directory */
- chdir("/");
+ r = chdir("/");
+ if (r < 0) {
+ log_error("could not change dir to /: %m");
+ goto exit;
+ }
+
umask(022);
umask(022);
- mkdir("/run/udev", 0755);
+ r = mkdir("/run/udev", 0755);
+ if (r < 0 && errno != EEXIST) {
+ log_error("could not create /run/udev: %m");
+ goto exit;
+ }
dev_setup(NULL);
dev_setup(NULL);