summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-09-17 19:49:26 -0400
committerAnthony G. Basile <blueness@gentoo.org>2014-09-17 19:49:26 -0400
commita3fd1c6811ea93610d1d22451d502519907d3b88 (patch)
tree7d6b9defd469a985cfef9465826f6b8cbfb6ea51
parent57594ac626568e98a031c8a5ca4cb51b24833bc4 (diff)
udev: drop duplicate logging
Once upon a time logging during early boot was unreliable, so extra logging messages were sent by udev to stderr. That is no longer a concern, so drop all fprintf() calls from udved. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r--src/udev/udevd.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 83f65b27ba..042e43a3bd 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -1085,7 +1085,6 @@ static int parse_argv(int argc, char *argv[]) {
} else if (streq(optarg, "never")) {
arg_resolve_names = -1;
} else {
- fprintf(stderr, "resolve-names must be early, late or never\n");
log_error("resolve-names must be early, late or never");
return 0;
}
@@ -1143,7 +1142,6 @@ int main(int argc, char *argv[]) {
}
if (getuid() != 0) {
- fprintf(stderr, "root privileges required\n");
log_error("root privileges required");
goto exit;
}
@@ -1173,7 +1171,6 @@ int main(int argc, char *argv[]) {
if (fd > STDERR_FILENO)
close(fd);
} else {
- fprintf(stderr, "cannot open /dev/null\n");
log_error("cannot open /dev/null");
}
}
@@ -1181,7 +1178,6 @@ int main(int argc, char *argv[]) {
/* open control and netlink socket */
udev_ctrl = udev_ctrl_new(udev);
if (udev_ctrl == NULL) {
- fprintf(stderr, "error initializing udev control socket");
log_error("error initializing udev control socket");
rc = 1;
goto exit;
@@ -1190,7 +1186,6 @@ int main(int argc, char *argv[]) {
monitor = udev_monitor_new_from_netlink(udev, "kernel");
if (monitor == NULL) {
- fprintf(stderr, "error initializing netlink socket\n");
log_error("error initializing netlink socket");
rc = 3;
goto exit;
@@ -1198,14 +1193,12 @@ int main(int argc, char *argv[]) {
fd_netlink = udev_monitor_get_fd(monitor);
if (udev_monitor_enable_receiving(monitor) < 0) {
- fprintf(stderr, "error binding netlink socket\n");
log_error("error binding netlink socket");
rc = 3;
goto exit;
}
if (udev_ctrl_enable_receiving(udev_ctrl) < 0) {
- fprintf(stderr, "error binding udev control socket\n");
log_error("error binding udev control socket");
rc = 1;
goto exit;
@@ -1250,7 +1243,6 @@ int main(int argc, char *argv[]) {
fd_inotify = udev_watch_init(udev);
if (fd_inotify < 0) {
- fprintf(stderr, "error initializing inotify\n");
log_error("error initializing inotify");
rc = 4;
goto exit;
@@ -1274,7 +1266,6 @@ int main(int argc, char *argv[]) {
sigprocmask(SIG_SETMASK, &mask, &sigmask_orig);
fd_signal = signalfd(-1, &mask, SFD_NONBLOCK|SFD_CLOEXEC);
if (fd_signal < 0) {
- fprintf(stderr, "error creating signalfd\n");
log_error("error creating signalfd");
rc = 5;
goto exit;
@@ -1282,7 +1273,6 @@ int main(int argc, char *argv[]) {
/* unnamed socket from workers to the main daemon */
if (socketpair(AF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0, worker_watch) < 0) {
- fprintf(stderr, "error creating socketpair\n");
log_error("error creating socketpair");
rc = 6;
goto exit;