From: Petr Uzel <petr.uzel@suse.cz>
To: util-linux <util-linux@vger.kernel.org>
Subject: [PATCH 01/15] uuidd: use UUIDD_OP_GETPID instead of magic number
Date: Thu, 3 May 2012 21:01:47 +0200 [thread overview]
Message-ID: <1336071721-32492-2-git-send-email-petr.uzel@suse.cz> (raw)
In-Reply-To: <1336071721-32492-1-git-send-email-petr.uzel@suse.cz>
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>
---
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 7c19615..80600f1 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) {
--
1.7.7
next prev parent reply other threads:[~2012-05-03 19:02 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-03 19:01 [PATCH 00/15] uuidd: refactoring & systemd support (take 2) Petr Uzel
2012-05-03 19:01 ` Petr Uzel [this message]
2012-05-03 19:01 ` [PATCH 02/15] uuidd: remove useless initialization of cleanup_socket Petr Uzel
2012-05-03 19:01 ` [PATCH 03/15] uuidd: factor out pidfile creation into separate function Petr Uzel
2012-05-03 19:01 ` [PATCH 04/15] uuidd: implement --no-pid option Petr Uzel
2012-05-03 19:01 ` [PATCH 05/15] uuidd: use ignore_result helper Petr Uzel
2012-05-03 19:01 ` [PATCH 06/15] uuidd: implement --no-fork option Petr Uzel
2012-05-03 19:01 ` [PATCH 07/15] uuidd: factor out socket creation into separate function Petr Uzel
2012-05-03 19:01 ` [PATCH 08/15] uuidd: implement --socket-activation option Petr Uzel
2012-05-03 19:01 ` [PATCH 09/15] uuidd: print all debugging information to stderr Petr Uzel
2012-05-03 19:01 ` [PATCH 10/15] uuidd: do not drop privileges Petr Uzel
2012-05-03 19:01 ` [PATCH 11/15] libuuid: use EXIT_FAILURE Petr Uzel
2012-05-03 19:01 ` [PATCH 12/15] uuidd: add systemd unit files Petr Uzel
2012-05-03 19:01 ` [PATCH 13/15] libuuid: don't exec uuidd Petr Uzel
2012-05-03 19:02 ` [PATCH 14/15] uuidd: introduce uuidd_cxt to pass arguments to server loop Petr Uzel
2012-05-03 19:02 ` [PATCH 15/15] libuuid: avoid double open and leaking descriptor Petr Uzel
2012-05-04 14:25 ` [PATCH 00/15] uuidd: refactoring & systemd support (take 2) Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1336071721-32492-2-git-send-email-petr.uzel@suse.cz \
--to=petr.uzel@suse.cz \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox