Skip to content
Snippets Groups Projects
Verified Commit d77c26e8 authored by Benny Baumann's avatar Benny Baumann
Browse files

Allow output of error messages on status fd

parent ed5782dc
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,9 @@
ATTR_NONNULL_ALL
void dctl_status_msg(const char* msg);
ATTR_NONNULL_ALL
void dctl_status_err(const char *msg);
void dctl_status_ready();
void dctl_status_reload();
void dctl_status_shutdown();
......
......@@ -7,6 +7,11 @@ void dctl_status_msg(const char* msg) {
(void)msg;
}
ATTR_WEAK
void dctl_status_err(const char *msg) {
(void)msg;
}
ATTR_WEAK
void dctl_status_ready() {
......
......@@ -12,6 +12,12 @@ void dctl_status_msg(const char* msg) {
std::cout << SD_INFO << "STATUS=" << msg << std::endl;
}
ATTR_NONNULL_ALL
void dctl_status_err(const char *msg) {
sd_notifyf(0, "STATUS=%s", msg);
std::cerr << SD_ERR << "STATUS=" << msg << std::endl;
}
void dctl_status_ready() {
sd_notify(0, "READY=1");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment