From: Hannes Reinecke <hare@suse.de>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] allow non-block devices for udevinfo
Date: Wed, 25 Feb 2004 14:11:06 +0000 [thread overview]
Message-ID: <403CACFA.8080308@suse.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 567 bytes --]
Hi all,
with the attached patch to udevinfo it is possible to look also at
devices in /class which do not provide the 'dev' attribute, e.g. net
devices.
Agreed, it is of limited usefulness as it stands, but with it we can
check devices for consistency with the 'standard' or 'acceptable'
behaviour re. sysfs. And complain loudly to the driver maintainer if
they don't (Hi Arnd !).
Cheers,
Hannes
--
Dr. Hannes Reinecke hare@suse.de
SuSE Linux AG S390 & zSeries
Maxfeldstraße 5 +49 911 74053 688
90409 Nürnberg http://www.suse.de
[-- Attachment #2: udevinfo-net.patch --]
[-- Type: text/plain, Size: 782 bytes --]
===== udevinfo.c 1.13 vs edited =====
--- 1.13/udevinfo.c Mon Feb 23 20:07:25 2004
+++ edited/udevinfo.c Wed Feb 25 14:44:02 2004
@@ -143,14 +143,12 @@
/* read the 'dev' file for major/minor*/
attr = sysfs_get_classdev_attr(class_dev, "dev");
- if (attr == NULL) {
- printf("couldn't get the \"dev\" file\n");
- retval = -1;
- goto exit;
+ if (attr) {
+ printf("\ndevice '%s' has major:minor %s", class_dev->path,
+ attr->value);
+ sysfs_close_attribute(attr);
}
- printf("\ndevice '%s' has major:minor %s", class_dev->path, attr->value);
- sysfs_close_attribute(attr);
-
+
/* open sysfs class device directory and print all attributes */
printf(" looking at class device '%s':\n", class_dev->path);
if (print_all_attributes(class_dev->path) != 0) {
next reply other threads:[~2004-02-25 14:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-25 14:11 Hannes Reinecke [this message]
2004-02-25 16:31 ` [PATCH] allow non-block devices for udevinfo Kay Sievers
2004-02-28 0:22 ` 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=403CACFA.8080308@suse.de \
--to=hare@suse.de \
--cc=linux-hotplug@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).