Skip to content

Commit

Permalink
powermand: drop dbg_notty()
Browse files Browse the repository at this point in the history
  • Loading branch information
garlick committed Feb 5, 2024
1 parent 41cb585 commit b96e1af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
14 changes: 2 additions & 12 deletions src/powerman/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@
#define DBG_BUFLEN 1024

static unsigned long dbg_channel_mask = 0;
static bool dbg_ttyvalid = true;

void dbg_notty(void)
{
dbg_ttyvalid = false;
}

void dbg_setmask(unsigned long mask)
{
Expand Down Expand Up @@ -81,12 +75,8 @@ void dbg_wrapped(unsigned long channel, const char *fmt, ...)
vsnprintf(buf, DBG_BUFLEN, fmt, ap); /* overflow ignored on purpose */
va_end(ap);

if (dbg_ttyvalid)
fprintf(stderr, "%s %s: %s\n",
_time(), _channel_name(channel), buf);
else
syslog(LOG_DEBUG, "%s: %s",
_channel_name(channel), buf);
fprintf(stderr, "%s %s: %s\n",
_time(), _channel_name(channel), buf);
}
}

Expand Down
1 change: 0 additions & 1 deletion src/powerman/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
{ 0, NULL } \
}

void dbg_notty(void);
void dbg_setmask(unsigned long mask);
void dbg_wrapped(unsigned long channel, const char *fmt, ...)
__attribute__ ((format (printf, 2, 3)));
Expand Down

0 comments on commit b96e1af

Please sign in to comment.