int i;
int err = 0;
+ info(udev, "'%s' started\n", command);
+
/* build argv from command */
util_strscpy(arg, sizeof(arg), command);
i = 0;
argv[0] = arg;
argv[1] = NULL;
}
- info(udev, "'%s'\n", command);
/* prepare pipes from child to parent */
if (result != NULL || udev_get_log_priority(udev) >= LOG_INFO) {
#include <time.h>
#include <getopt.h>
#include <dirent.h>
+#include <sys/time.h>
#include <sys/prctl.h>
#include <sys/socket.h>
#include <sys/signalfd.h>
const char *format, va_list args)
{
if (debug) {
- fprintf(stderr, "[%d] %s: ", (int) getpid(), fn);
- vfprintf(stderr, format, args);
+ char buf[1024];
+ struct timeval tv;
+ struct timezone tz;
+
+ vsnprintf(buf, sizeof(buf), format, args);
+ gettimeofday(&tv, &tz);
+ fprintf(stderr, "%llu.%06u [%u] %s: %s",
+ (unsigned long long) tv.tv_sec, (unsigned int) tv.tv_usec,
+ (int) getpid(), fn, buf);
} else {
vsyslog(priority, format, args);
}
struct worker_message msg;
int err;
+ info(event->udev, "seq %llu running\n", udev_device_get_seqnum(dev));
udev_event = udev_event_new(dev);
if (udev_event == NULL)
_exit(3);