X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=libudev%2Flibudev-util-private.c;h=f7daa9460beabeca74c08a80c548f1b5b129365a;hp=1a37490a9e364d76d1f2d305cd05f198bad0526f;hb=820fc48f249012c673eb38f63dd8b5ee039627d0;hpb=257bb4cdac76c00be6e17b0b656df0a2d7ee7b4d diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c index 1a37490a9..f7daa9460 100644 --- a/libudev/libudev-util-private.c +++ b/libudev/libudev-util-private.c @@ -249,6 +249,8 @@ int util_run_program(struct udev *udev, const char *command, char **envp, int i; int err = 0; + info(udev, "'%s' started\n", command); + /* build argv from command */ util_strscpy(arg, sizeof(arg), command); i = 0; @@ -273,7 +275,6 @@ int util_run_program(struct udev *udev, const char *command, char **envp, argv[0] = arg; argv[1] = NULL; } - info(udev, "'%s'\n", command); /* prepare pipes from child to parent */ if (result != NULL || udev_get_log_priority(udev) >= LOG_INFO) { @@ -435,11 +436,11 @@ int util_run_program(struct udev *udev, const char *command, char **envp, } waitpid(pid, &status, 0); if (WIFEXITED(status)) { - info(udev, "'%s' returned with status %i\n", argv[0], WEXITSTATUS(status)); + info(udev, "'%s' returned with exitcode %i\n", command, WEXITSTATUS(status)); if (WEXITSTATUS(status) != 0) err = -1; } else { - err(udev, "'%s' abnormal exit\n", command); + err(udev, "'%s' unexpected exit with status 0x%04x\n", command, status); err = -1; } }