From f85b4fef151a654462dd1f13fea2edee5ee44972 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 12 Sep 2022 16:15:10 +0200 Subject: [PATCH] Distinct stderr messages from ARD --- libs/ardouralsautil/request_device.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libs/ardouralsautil/request_device.c b/libs/ardouralsautil/request_device.c index f7e19fdca6..f9bdf00516 100644 --- a/libs/ardouralsautil/request_device.c +++ b/libs/ardouralsautil/request_device.c @@ -47,7 +47,7 @@ static pid_t parent_pid = 0; static void wearedone(int sig) { (void) sig; // skip 'unused variable' compiler warning; - fprintf(stderr, "caught signal - shutting down.\n"); + fprintf(stderr, ARD_PROG_NAME ": caught signal - shutting down.\n"); run=0; } @@ -208,7 +208,7 @@ int main(int argc, char **argv) { dbus_error_init(&error); if (!(dbus_connection = dbus_bus_get (DBUS_BUS_SESSION, &error))) { - fprintf(stderr, "Failed to connect to session bus for device reservation: %s\n", error.message ? error.message : "unknown error."); + fprintf(stderr, ARD_PROG_NAME ": Failed to connect to session bus for device reservation: %s\n", error.message ? error.message : "unknown error."); dbus_error_free(&error); free(name); return EXIT_FAILURE; @@ -223,7 +223,7 @@ int main(int argc, char **argv) { request_cb, &error)) < 0) { - fprintf(stderr, "Failed to acquire device: '%s'\n%s\n", device_name, (error.message ? error.message : strerror(-ret))); + fprintf(stderr, ARD_PROG_NAME ": Failed to acquire device: '%s'\n%s\n", device_name, (error.message ? error.message : strerror(-ret))); dbus_error_free(&error); dbus_connection_unref(dbus_connection); free(name); @@ -239,11 +239,11 @@ int main(int argc, char **argv) { while (run && dbus_connection_read_write_dispatch (dbus_connection, 200)) { if (!stdin_available()) { - fprintf(stderr, "stdin closed - releasing device.\n"); + fprintf(stderr, ARD_PROG_NAME ": stdin closed - releasing device.\n"); break; } if (parent_pid > 0 && kill (parent_pid, 0)) { - fprintf(stderr, "watched PID no longer exists - releasing device.\n"); + fprintf(stderr, ARD_PROG_NAME ": watched PID no longer exists - releasing device.\n"); break; } }