chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
volume_id: remove unnecessary global variable
[elogind.git]
/
udevadm.c
diff --git
a/udevadm.c
b/udevadm.c
index e2b7779a917299d1b1582076a9b04b5623683ec6..6e7d7734d279ba498dc8b750ce61f5a7cfb8f195 100644
(file)
--- a/
udevadm.c
+++ b/
udevadm.c
@@
-26,7
+26,7
@@
#include "udev.h"
#include "udev.h"
-static int
verbose
;
+static int
debug
;
#ifdef USE_LOG
void log_message(int priority, const char *format, ...)
#ifdef USE_LOG
void log_message(int priority, const char *format, ...)
@@
-37,9
+37,8
@@
void log_message(int priority, const char *format, ...)
return;
va_start(args, format);
return;
va_start(args, format);
- if (
verbose
) {
+ if (
debug
) {
vprintf(format, args);
vprintf(format, args);
- printf("\n");
} else
vsyslog(priority, format, args);
va_end(args);
} else
vsyslog(priority, format, args);
va_end(args);
@@
-50,7
+49,7
@@
struct command {
const char *name;
int (*cmd)(int argc, char *argv[], char *envp[]);
const char *help;
const char *name;
int (*cmd)(int argc, char *argv[], char *envp[]);
const char *help;
- int
verbose
;
+ int
debug
;
};
static const struct command cmds[];
};
static const struct command cmds[];
@@
-102,7
+101,7
@@
static const struct command cmds[] = {
.name = "test",
.cmd = udevtest,
.help = "simulation run",
.name = "test",
.cmd = udevtest,
.help = "simulation run",
- .
verbose
= 1,
+ .
debug
= 1,
},
{
.name = "version",
},
{
.name = "version",
@@
-155,7
+154,7
@@
int main(int argc, char *argv[], char *envp[])
/* find and execute command */
for (cmd = cmds; cmd->name != NULL; cmd++) {
if (strcmp(cmd->name, command) == 0) {
/* find and execute command */
for (cmd = cmds; cmd->name != NULL; cmd++) {
if (strcmp(cmd->name, command) == 0) {
-
verbose = cmd->verbose
;
+
debug = cmd->debug
;
rc = cmd->cmd(argc, argv, envp);
goto out;
}
rc = cmd->cmd(argc, argv, envp);
goto out;
}