Remove src/common/log.c

Use wlr_log() instead
This commit is contained in:
Johan Malm 2021-07-23 21:15:55 +01:00
parent 20fd8f59a7
commit 82e47ac1f5
20 changed files with 28 additions and 65 deletions

View file

@ -9,9 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include "common/dir.h"
#include "common/log.h"
struct dir {
const char *prefix;

View file

@ -1,16 +0,0 @@
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void
warn(const char *err, ...)
{
va_list params;
fprintf(stderr, "[labwc] warn: ");
va_start(params, err);
vfprintf(stderr, err, params);
va_end(params);
fprintf(stderr, "\n");
}

View file

@ -3,7 +3,6 @@ labwc_sources += files(
'dir.c',
'font.c',
'grab-file.c',
'log.c',
'nodename.c',
'spawn.c',
'string-helpers.c',

View file

@ -7,7 +7,7 @@
#include <stdlib.h>
#include <sys/wait.h>
#include <unistd.h>
#include "common/log.h"
#include <wlr/util/log.h>
#include "common/spawn.h"
void
@ -35,7 +35,7 @@ spawn_async_no_shell(char const *command)
child = fork();
switch (child) {
case -1:
warn("unable to fork()");
wlr_log(WLR_ERROR, "unable to fork()");
goto out;
case 0:
setsid();
@ -47,7 +47,7 @@ spawn_async_no_shell(char const *command)
execvp(argv[0], argv);
_exit(0);
} else if (grandchild < 0) {
warn("unable to fork()");
wlr_log(WLR_ERROR, "unable to fork()");
}
_exit(0);
default: