File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ struct cli_options *cli_options_parse(int argc, char *argv[]) {
195
195
}
196
196
if (res -> vmnet_gateway == NULL ) {
197
197
if (res -> vmnet_mode != VMNET_BRIDGED_MODE ) {
198
- ERROR ( "WARNING: --vmnet-gateway=IP should be explicitly specified to "
198
+ WARN ( " --vmnet-gateway=IP should be explicitly specified to "
199
199
"avoid conflicting with other applications" );
200
200
}
201
201
if (res -> vmnet_dhcp_end != NULL ) {
Original file line number Diff line number Diff line change @@ -14,5 +14,7 @@ extern bool debug;
14
14
#define ERROR (msg ) fprintf(stderr, "ERROR| " msg "\n")
15
15
#define ERRORF (fmt , ...) fprintf(stderr, "ERROR| " fmt "\n", __VA_ARGS__)
16
16
#define ERRORN (name ) ERRORF(name ": %s", strerror(errno))
17
+ #define WARN (msg ) fprintf(stderr, "WARN | " msg "\n")
18
+ #define WARNF (fmt , ...) fprintf(stderr, "WARN | " fmt "\n", __VA_ARGS__)
17
19
18
20
#endif /* SOCKET_VMNET_LOG_H */
Original file line number Diff line number Diff line change @@ -400,12 +400,10 @@ int main(int argc, char *argv[]) {
400
400
struct cli_options * cliopt = cli_options_parse (argc , argv );
401
401
assert (cliopt != NULL );
402
402
if (geteuid () != 0 ) {
403
- ERROR ("WARNING: Running without root. This is very unlikely to "
404
- "work: See README.md" );
403
+ WARN ("Running without root. This is very unlikely to work: See README.md" );
405
404
}
406
405
if (geteuid () != getuid ()) {
407
- ERROR ("WARNING: Seems running with SETUID. This is insecure and "
408
- "highly discouraged: See README.md" );
406
+ WARN ("Seems running with SETUID. This is insecure and highly discouraged: See README.md" );
409
407
}
410
408
411
409
if (sigsetjmp (jmpbuf , 1 ) != 0 ) {
You can’t perform that action at this time.
0 commit comments