mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
Remove src/common/log.c
Use wlr_log() instead
This commit is contained in:
parent
20fd8f59a7
commit
82e47ac1f5
20 changed files with 28 additions and 65 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
@ -3,7 +3,6 @@ labwc_sources += files(
|
|||
'dir.c',
|
||||
'font.c',
|
||||
'grab-file.c',
|
||||
'log.c',
|
||||
'nodename.c',
|
||||
'spawn.c',
|
||||
'string-helpers.c',
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue