rpms/udev/devel udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch, NONE, 1.1 udev.spec, 1.288, 1.289

Harald Hoyer harald at fedoraproject.org
Tue Aug 4 09:16:54 UTC 2009


Author: harald

Update of /cvs/pkgs/rpms/udev/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv30446

Modified Files:
	udev.spec 
Added Files:
	udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch 
Log Message:
* Tue Aug 04 2009 Harald Hoyer <harald at redhat.com> 145-4
- --enable-debug 
- add patch for timestamps in debugging output


udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch:
 libudev/libudev-util-private.c |    3 ++-
 udev/udevd.c                   |   13 +++++++++++--
 2 files changed, 13 insertions(+), 3 deletions(-)

--- NEW FILE udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch ---
From: Kay Sievers <kay.sievers at vrfy.org>
Date: Fri, 17 Jul 2009 11:24:37 +0000 (+0200)
Subject: udevd: add timestamp to --debug output
X-Git-Url: http://git.kernel.org/?p=linux%2Fhotplug%2Fudev.git;a=commitdiff_plain;h=820fc48f249012c673eb38f63dd8b5ee039627d0

udevd: add timestamp to --debug output
---

diff --git a/libudev/libudev-util-private.c b/libudev/libudev-util-private.c
index 5f5f4c1..f7daa94 100644
--- a/libudev/libudev-util-private.c
+++ b/libudev/libudev-util-private.c
@@ -249,6 +249,8 @@ int util_run_program(struct udev *udev, const char *command, char **envp,
 	int i;
 	int err = 0;
 
+	info(udev, "'%s' started\n", command);
+
 	/* build argv from command */
 	util_strscpy(arg, sizeof(arg), command);
 	i = 0;
@@ -273,7 +275,6 @@ int util_run_program(struct udev *udev, const char *command, char **envp,
 		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) {
diff --git a/udev/udevd.c b/udev/udevd.c
index 2cdc18b..69d509c 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -31,6 +31,7 @@
 #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>
@@ -53,8 +54,15 @@ static void log_fn(struct udev *udev, int priority,
 		   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);
 	}
@@ -266,6 +274,7 @@ static void worker_new(struct event *event)
 			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);


Index: udev.spec
===================================================================
RCS file: /cvs/pkgs/rpms/udev/devel/udev.spec,v
retrieving revision 1.288
retrieving revision 1.289
diff -u -p -r1.288 -r1.289
--- udev.spec	29 Jul 2009 12:06:44 -0000	1.288
+++ udev.spec	4 Aug 2009 09:16:53 -0000	1.289
@@ -5,7 +5,7 @@
 Summary: A userspace implementation of devfs
 Name: udev
 Version: 145
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: GPLv2
 Group: System Environment/Base
 Provides: udev-persistent = %{version}-%{release}
@@ -15,6 +15,7 @@ Provides: udev-extras = 20090618-1
 Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2
 
 Patch1: udev.git-3bf768245b98479a14190e1e1d32ef5fae3ddf8a.patch
+Patch2: udev.git-820fc48f249012c673eb38f63dd8b5ee039627d0.patch
 
 Source1: start_udev
 Source3: udev-post.init
@@ -98,6 +99,7 @@ glib-based applications using libudev fu
 %prep
 %setup -q  
 %patch1 -p1
+%patch2 -p1
 
 %build
 # get rid of rpath
@@ -106,7 +108,7 @@ libtoolize -f -c
 	   --sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} \
 	   --sbindir="/sbin" --libexecdir=%{udev_scriptdir} \
 	   --with-rootlibdir=/%{_lib} --enable-introspection \
-	   --disable-rpath
+	   --disable-rpath --enable-debug
 
 make %{?_smp_mflags}
 
@@ -349,6 +351,10 @@ rm -rf $RPM_BUILD_ROOT
 %attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0*
 
 %changelog
+* Tue Aug 04 2009 Harald Hoyer <harald at redhat.com> 145-4
+- --enable-debug 
+- add patch for timestamps in debugging output
+
 * Wed Jul 29 2009 Harald Hoyer <harald at redhat.com> 145-3
 - add patch from upstream git to fix bug #514086
 - add version to usbutils build requirement




More information about the fedora-extras-commits mailing list