All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nuno Silva <nuno.silva@vgertech.com>
To: linux-hotplug-devel@lists.sourceforge.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: [ANNOUNCE] udev 013 release
Date: Thu, 15 Jan 2004 07:48:41 +0000	[thread overview]
Message-ID: <400645D9.1040400@vgertech.com> (raw)
In-Reply-To: <20040114211417.GC6650@kroah.com>

[-- Attachment #1: Type: text/plain, Size: 574 bytes --]

Hi!

Greg KH wrote:
> On Wed, Jan 14, 2004 at 07:23:11PM +0000, Nuno Silva wrote:
> 
>>This would be nice but I think that full info for every new hotplugged 
>>device is even better. It's only 1 line :-)
> 
> 
> Heh, care to make that one line patch?  :)
> 

Ehehehe I was talking about the extra line ending up in syslog. :-)

Anyway, attached is a simple patch that outputs 50% of what I'd like to 
see - still missing the SYSFS_model, serial, etc because 
sysfs_get_classdev_attributes didn't work at my first try, but that's my 
faulty C showing :)

Thanks,
Nuno Silva

[-- Attachment #2: udev-report-details.diff --]
[-- Type: text/plain, Size: 1696 bytes --]

diff -Naur udev-013.orig/logging.c udev-013/logging.c
--- udev-013.orig/logging.c	2003-12-15 21:57:35.000000000 +0000
+++ udev-013/logging.c	2004-01-15 02:52:36.000000000 +0000
@@ -27,8 +27,6 @@
 #include <syslog.h>
 #include "udev.h"
 
-#ifdef DEBUG
-
 static int logging_init = 0;
 static unsigned char udev_logname[42];
 
@@ -55,4 +53,3 @@
 	return 1;
 }
 
-#endif
diff -Naur udev-013.orig/namedev.c udev-013/namedev.c
--- udev-013.orig/namedev.c	2004-01-13 22:52:57.000000000 +0000
+++ udev-013/namedev.c	2004-01-15 07:40:40.000000000 +0000
@@ -748,6 +748,13 @@
 		udev->owner[0] = 0x00;
 		udev->group[0] = 0x00;
 	}
+	/* notify syslog and report some of the configuration: */
+	/* FIXME: add SYSFS_* nodes, too */
+	dbg_syslog("New device! Metrics: BUS='%s', ID='%s', KERNEL='%s'",
+	    sysfs_device->bus, sysfs_device->bus_id, class_dev->name);
+	dbg_syslog("name, '%s' is going to have owner='%s', group='%s', mode = %#o",
+	    udev->name, udev->owner, udev->group, udev->mode);
+
 	dbg("name, '%s' is going to have owner='%s', group='%s', mode = %#o",
 	    udev->name, udev->owner, udev->group, udev->mode);
 
diff -Naur udev-013.orig/udev.h udev-013/udev.h
--- udev-013.orig/udev.h	2004-01-13 01:50:34.000000000 +0000
+++ udev-013/udev.h	2004-01-14 23:22:08.000000000 +0000
@@ -25,9 +25,14 @@
 
 #include "libsysfs/libsysfs.h"
 #include <sys/param.h>
+#include <syslog.h>
+
+#define dbg_syslog(format, arg...)							\
+	do {										\
+		log_message (LOG_DEBUG , "%s: " format , __FUNCTION__ , ## arg);	\
+	} while (0)
 
 #ifdef DEBUG
-#include <syslog.h>
 #define dbg(format, arg...)								\
 	do {										\
 		log_message (LOG_DEBUG , "%s: " format , __FUNCTION__ , ## arg);	\

  reply	other threads:[~2004-01-15  7:48 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-13 23:52 [ANNOUNCE] udev 013 release Greg KH
2004-01-13 23:52 ` Greg KH
2004-01-14  1:38 ` Frédéric L. W. Meunier
2004-01-14  2:14 ` Jon Smirl
2004-01-14  5:15 ` Nuno Silva
2004-01-14 17:15   ` Greg KH
2004-01-14 17:15     ` Greg KH
2004-01-14 17:46     ` Chris Friesen
2004-01-14 17:46       ` Chris Friesen
2004-01-14 19:23       ` Nuno Silva
2004-01-14 19:23         ` Nuno Silva
2004-01-14 21:14         ` Greg KH
2004-01-14 21:14           ` Greg KH
2004-01-15  7:48           ` Nuno Silva [this message]
2004-01-15 23:03             ` Greg KH
2004-01-15 23:03               ` Greg KH
2004-01-14 20:34       ` Clay Haapala
2004-01-14 20:34         ` Clay Haapala
2004-01-14 20:47         ` Chris Friesen
2004-01-14 20:47           ` Chris Friesen
2004-01-14 21:12           ` Greg KH
2004-01-14 21:12             ` Greg KH
2004-01-14 21:10         ` Greg KH
2004-01-14 21:10           ` Greg KH
2004-01-14 17:27 ` Greg KH
2004-01-15  4:14 ` Kay Sievers
2004-01-15 14:32 ` Kay Sievers
2004-01-15 22:40 ` Greg KH
2004-01-16  2:25 ` Nuno Silva
2004-01-16  3:24 ` Kay Sievers
2004-01-16  3:45 ` Nuno Silva
2004-01-19 20:29 ` Olaf Hering
2004-01-19 20:40 ` Greg KH
2004-01-19 20:44 ` Olaf Hering
2004-01-19 20:50 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=400645D9.1040400@vgertech.com \
    --to=nuno.silva@vgertech.com \
    --cc=linux-hotplug-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.