diff options
author | Petr Uzel <petr.uzel@suse.cz> | 2012-05-03 21:01:47 +0200 |
---|---|---|
committer | Karel Zak <kzak@redhat.com> | 2012-05-04 15:13:20 +0200 |
commit | 2e9b39eff3610b2ae68ad0572b5be37ae6806b6d (patch) | |
tree | 7e9a3a99aa63c4ccafeb91cdf9c24819e31c7915 /misc-utils | |
parent | a767169febcefe9a80f3e54b2b1a558ebfdb06d8 (diff) | |
download | util-linux-2e9b39eff3610b2ae68ad0572b5be37ae6806b6d.tar.gz |
uuidd: use UUIDD_OP_GETPID instead of magic number
Make parameters passed to call_daemon() more descriptive:
- use UUIDD_OP_GETPID instead of magic number 0
- call_daemon() takes pointer as a last argument, so pass NULL instead
of 0
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
Diffstat (limited to 'misc-utils')
-rw-r--r-- | misc-utils/uuidd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc-utils/uuidd.c b/misc-utils/uuidd.c index 7c19615b..80600f19 100644 --- a/misc-utils/uuidd.c +++ b/misc-utils/uuidd.c @@ -244,7 +244,7 @@ static void server_loop(const char *socket_path, const char *pidfile_path, fprintf(stderr, _("Failed to lock %s: %m\n"), pidfile_path); exit(EXIT_FAILURE); } - ret = call_daemon(socket_path, 0, reply_buf, sizeof(reply_buf), 0, 0); + ret = call_daemon(socket_path, UUIDD_OP_GETPID, reply_buf, sizeof(reply_buf), 0, NULL); if (ret > 0) { if (!quiet) printf(_("uuidd daemon already running at pid %s\n"), @@ -578,7 +578,7 @@ int main(int argc, char **argv) } if (do_kill) { - ret = call_daemon(socket_path, 0, buf, sizeof(buf), 0, 0); + ret = call_daemon(socket_path, UUIDD_OP_GETPID, buf, sizeof(buf), 0, NULL); if ((ret > 0) && ((do_kill = atoi((char *) buf)) > 0)) { ret = kill(do_kill, SIGTERM); if (ret < 0) { |