#include "udev.h"
-static int debug;
+static bool debug;
static void log_fn(struct udev *udev, int priority,
const char *file, int line, const char *fn,
.name = "test",
.cmd = udevadm_test,
.help = "simulation run",
- .debug = 1,
+ .debug = true,
},
{
.name = "version",
static int run_command(struct udev *udev, const struct command *cmd, int argc, char *argv[])
{
if (cmd->debug) {
- debug = 1;
+ debug = true;
if (udev_get_log_priority(udev) < LOG_INFO)
udev_set_log_priority(udev, LOG_INFO);
}
switch (option) {
case 'd':
- debug = 1;
+ debug = true;
if (udev_get_log_priority(udev) < LOG_INFO)
udev_set_log_priority(udev, LOG_INFO);
break;
}
command = argv[optind];
+ info(udev, "runtime dir '%s'\n", udev_get_run_path(udev));
+
if (command != NULL)
for (i = 0; cmds[i].cmd != NULL; i++) {
if (strcmp(cmds[i].name, command) == 0) {