chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
18b53db
)
udevd: use 'uptime' in debug timestamp
author
Kay Sievers
<kay.sievers@vrfy.org>
Mon, 11 Jul 2011 20:56:07 +0000
(22:56 +0200)
committer
Kay Sievers
<kay.sievers@vrfy.org>
Mon, 11 Jul 2011 20:56:07 +0000
(22:56 +0200)
udev/udevd.c
patch
|
blob
|
history
diff --git
a/udev/udevd.c
b/udev/udevd.c
index e7384e19a2431b1007680bc10e4290647dfcc9a1..968b41667e356b2a81b6b8cff467506e83feb2e3 100644
(file)
--- a/
udev/udevd.c
+++ b/
udev/udevd.c
@@
-55,13
+55,12
@@
static void log_fn(struct udev *udev, int priority,
{
if (debug) {
char buf[1024];
- struct timeval tv;
- struct timezone tz;
+ struct timespec ts;
vsnprintf(buf, sizeof(buf), format, args);
-
gettimeofday(&tv, &tz
);
+
clock_gettime(CLOCK_MONOTONIC, &ts
);
fprintf(stderr, "%llu.%06u [%u] %s: %s",
- (unsigned long long) t
v.tv_sec, (unsigned int) tv.tv_usec
,
+ (unsigned long long) t
s.tv_sec, (unsigned int) ts.tv_nsec/1000
,
(int) getpid(), fn, buf);
} else {
vsyslog(priority, format, args);