From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH BlueZ 3/6] tool/btmon-logger: Use mainloop_notify instead of sd_notify
Date: Mon, 26 Nov 2018 18:24:35 +0200 [thread overview]
Message-ID: <20181126162438.27872-3-luiz.dentz@gmail.com> (raw)
In-Reply-To: <20181126162438.27872-1-luiz.dentz@gmail.com>
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
mainloop_notify takes care of sending the messages to NOTIFY_SOCKET and
includes the handling of WATCHDOG_USEC as well.
---
tools/btmon-logger.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/tools/btmon-logger.c b/tools/btmon-logger.c
index c3ba17939..65c497dbb 100644
--- a/tools/btmon-logger.c
+++ b/tools/btmon-logger.c
@@ -48,8 +48,6 @@
#include "src/shared/mainloop.h"
#include "src/shared/btsnoop.h"
-#include "src/systemd.h"
-
#define MONITOR_INDEX_NONE 0xffff
struct monitor_hdr {
@@ -283,7 +281,7 @@ int main(int argc, char *argv[])
mainloop_init();
- sd_notify(0, "STATUS=Starting up");
+ mainloop_notify("STATUS=Starting up");
while (true) {
int opt;
@@ -375,12 +373,11 @@ int main(int argc, char *argv[])
printf("Bluetooth monitor logger ver %s\n", VERSION);
- sd_notify(0, "STATUS=Running");
- sd_notify(0, "READY=1");
+ mainloop_notify("STATUS=Running");
exit_status = mainloop_run();
- sd_notify(0, "STATUS=Quitting");
+ mainloop_notify("STATUS=Quitting");
btsnoop_unref(btsnoop_file);
--
2.17.2
next prev parent reply other threads:[~2018-11-26 16:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-26 16:24 [PATCH BlueZ 1/6] share/mainloop: Add handling of NOTIFY_SOCKET Luiz Augusto von Dentz
2018-11-26 16:24 ` [PATCH BlueZ 2/6] share/mainloop: Add watchdog support Luiz Augusto von Dentz
2018-11-26 16:24 ` Luiz Augusto von Dentz [this message]
2018-11-26 16:24 ` [PATCH BlueZ 4/6] core: Use mainloop_notify instead of sd_notify Luiz Augusto von Dentz
2018-11-26 16:24 ` [PATCH BlueZ 5/6] core: Remove old code related to sd_notify Luiz Augusto von Dentz
2018-11-26 16:24 ` [PATCH BlueZ 6/6] shared/timeout-glib: Check 0 id when removing timeout Luiz Augusto von Dentz
2018-11-26 17:54 ` [PATCH BlueZ 1/6] share/mainloop: Add handling of NOTIFY_SOCKET Marcel Holtmann
2018-11-27 9:51 ` Luiz Augusto von Dentz
2018-11-27 13:30 ` Marcel Holtmann
2018-11-27 15:19 ` Luiz Augusto von Dentz
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=20181126162438.27872-3-luiz.dentz@gmail.com \
--to=luiz.dentz@gmail.com \
--cc=linux-bluetooth@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;
as well as URLs for NNTP newsgroup(s).