chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core: fix SetUnitProperties
[elogind.git]
/
src
/
udev
/
udevd.c
diff --git
a/src/udev/udevd.c
b/src/udev/udevd.c
index 7c6c5d6a87d81252b5c1a8295cd645ba36eabead..572bca881d40a06dde9725bf80a54316908aaef9 100644
(file)
--- a/
src/udev/udevd.c
+++ b/
src/udev/udevd.c
@@
-75,7
+75,7
@@
static int exec_delay;
static sigset_t sigmask_orig;
static UDEV_LIST(event_list);
static UDEV_LIST(worker_list);
static sigset_t sigmask_orig;
static UDEV_LIST(event_list);
static UDEV_LIST(worker_list);
-char *udev_cgroup;
+
static
char *udev_cgroup;
static bool udev_exit;
enum event_state {
static bool udev_exit;
enum event_state {
@@
-779,10
+779,11
@@
static void handle_signal(struct udev *udev, int signo)
if (WIFEXITED(status)) {
if (WEXITSTATUS(status) != 0)
if (WIFEXITED(status)) {
if (WEXITSTATUS(status) != 0)
- log_error("worker [%u] exit with return code %i\n", pid, WEXITSTATUS(status));
+ log_error("worker [%u] exit with return code %i\n",
+ pid, WEXITSTATUS(status));
} else if (WIFSIGNALED(status)) {
log_error("worker [%u] terminated by signal %i (%s)\n",
} else if (WIFSIGNALED(status)) {
log_error("worker [%u] terminated by signal %i (%s)\n",
- pid, WTERMSIG(status), strsignal(WTERMSIG(status)));
+
pid, WTERMSIG(status), strsignal(WTERMSIG(status)));
} else if (WIFSTOPPED(status)) {
log_error("worker [%u] stopped\n", pid);
} else if (WIFCONTINUED(status)) {
} else if (WIFSTOPPED(status)) {
log_error("worker [%u] stopped\n", pid);
} else if (WIFCONTINUED(status)) {
@@
-856,10
+857,15
@@
static int systemd_fds(struct udev *udev, int *rctrl, int *rnetlink)
*/
static void kernel_cmdline_options(struct udev *udev)
{
*/
static void kernel_cmdline_options(struct udev *udev)
{
- char *line, *w, *state;
+ _cleanup_free_ char *line = NULL;
+ char *w, *state;
size_t l;
size_t l;
+ int r;
- if (read_one_line_file("/proc/cmdline", &line) < 0)
+ r = proc_cmdline(&line);
+ if (r < 0)
+ log_warning("Failed to read /proc/cmdline, ignoring: %s", strerror(-r));
+ if (r <= 0)
return;
FOREACH_WORD_QUOTED(w, l, line, state) {
return;
FOREACH_WORD_QUOTED(w, l, line, state) {
@@
-889,8
+895,6
@@
static void kernel_cmdline_options(struct udev *udev)
free(s);
}
free(s);
}
-
- free(line);
}
int main(int argc, char *argv[])
}
int main(int argc, char *argv[])