diff options
author | Christian Hesse <mail@eworm.de> | 2013-07-03 00:14:51 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-07-03 00:14:51 +0200 |
commit | f5e3001784038bd26d135fb4dcf3abedd4cdc20f (patch) | |
tree | e16e8a824adf5334ee057b0152d64824aae69dd8 | |
parent | fb7b13b2a35fd2428948c63877c03633d911916f (diff) | |
download | netlink-notify-f5e3001784038bd26d135fb4dcf3abedd4cdc20f.tar.gz netlink-notify-f5e3001784038bd26d135fb4dcf3abedd4cdc20f.tar.zst |
give program name on debug output
-rw-r--r-- | netlink-notify.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/netlink-notify.c b/netlink-notify.c index 55fcfea..b6278cb 100644 --- a/netlink-notify.c +++ b/netlink-notify.c @@ -201,7 +201,7 @@ static int msg_handler (struct sockaddr_nl *nl, struct nlmsghdr *msg) { } #if DEBUG - printf("Interface %s, flags: %x, msg type: %d\n", name, ifa->ifa_flags, msg->nlmsg_type); + printf("%s: Interface %s, flags: %x, msg type: %d\n", program, name, ifa->ifa_flags, msg->nlmsg_type); #endif switch (msg->nlmsg_type) { @@ -223,7 +223,7 @@ static int msg_handler (struct sockaddr_nl *nl, struct nlmsghdr *msg) { while (next->next != NULL) { if (strcmp(next->address, buf) == 0 && next->prefix == ifa->ifa_prefixlen) { #if DEBUG - printf("Already notified about address %s/%d, skipping.\n", buf, ifa->ifa_prefixlen); + printf("%s: Already notified about address %s/%d, skipping.\n", program, buf, ifa->ifa_prefixlen); #endif seen++; break; @@ -281,7 +281,7 @@ static int msg_handler (struct sockaddr_nl *nl, struct nlmsghdr *msg) { } #if DEBUG - puts (notifystr); + printf("%s: %s\n", program, notifystr); #endif if (address == NULL) { |