From: Hannes Reinecke Date: Mon, 13 Jun 2005 20:38:42 +0000 (+0200) Subject: udevcontrol: fix exit code X-Git-Tag: 059~13^2~11 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60d7b201008edb3c6d9226ef336c7ae0daa5742f;p=systemd udevcontrol: fix exit code Kay is lazy! :) Signed-off-by: Kay Sievers --- diff --git a/udevcontrol.c b/udevcontrol.c index 6a278a04..4a54af80 100644 --- a/udevcontrol.c +++ b/udevcontrol.c @@ -95,8 +95,13 @@ int main(int argc, char *argv[], char *envp[]) retval = sendto(sock, &usend_msg, sizeof(usend_msg), 0, (struct sockaddr *)&saddr, addrlen); - if (retval == -1) + if (retval == -1) { info("error sending message (%s)", strerror(errno)); + retval = 1; + } else { + dbg("sent message '%x' (%u bytes sent)\n", usend_msg.type, retval); + retval = 0; + } close(sock);