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 (from parent 1:
f0f7c71
)
udevinfo: remove -d option
author
Kay Sievers
<kay.sievers@vrfy.org>
Sun, 18 Mar 2007 14:08:53 +0000
(15:08 +0100)
committer
Kay Sievers
<kay.sievers@vrfy.org>
Sun, 18 Mar 2007 14:08:53 +0000
(15:08 +0100)
TODO
patch
|
blob
|
history
udevinfo.c
patch
|
blob
|
history
diff --git
a/TODO
b/TODO
index 5d5a058e98bbf98119f36a257ccde4c966f457a6..881f7c1ee247aa53121d75a16a7700f263c7db9c 100644
(file)
--- a/
TODO
+++ b/
TODO
@@
-11,9
+11,6
@@
These things will change in future udev versions:
These things are deprecated and scheduled for removal in a future
udev version:
These things are deprecated and scheduled for removal in a future
udev version:
- o remove old udevdb dump 'udevinfo -d'
- (-e exports everything)
-
o remove udevstart
(we rely on the kernel "uevent" triggers of kernel 2.6.15 and no longer
want to guess event properties from sysfs like udevstart is doing it)
o remove udevstart
(we rely on the kernel "uevent" triggers of kernel 2.6.15 and no longer
want to guess event properties from sysfs like udevstart is doing it)
diff --git
a/udevinfo.c
b/udevinfo.c
index e892b1092e311687058b5e3c2ec4dd20c5f37bac..52c49b824f364fc7b6b63936790bf726893da89c 100644
(file)
--- a/
udevinfo.c
+++ b/
udevinfo.c
@@
-150,16
+150,7
@@
static void print_record(struct udevice *udev)
printf("E: %s\n", name_loop->name);
}
printf("E: %s\n", name_loop->name);
}
-static void export_name_devpath(struct udevice *udev) {
- printf("%s=%s/%s\n", udev->dev->devpath, udev_root, udev->name);
-}
-
-static void export_record(struct udevice *udev) {
- print_record(udev);
- printf("\n");
-}
-
-static void export_db(void fnct(struct udevice *udev)) {
+static void export_db(void) {
LIST_HEAD(name_list);
struct name_entry *name_loop;
LIST_HEAD(name_list);
struct name_entry *name_loop;
@@
-171,7
+162,8
@@
static void export_db(void fnct(struct udevice *udev)) {
if (udev_db == NULL)
continue;
if (udev_db_get_device(udev_db, name_loop->name) == 0)
if (udev_db == NULL)
continue;
if (udev_db_get_device(udev_db, name_loop->name) == 0)
- fnct(udev_db);
+ print_record(udev_db);
+ printf("\n");
udev_device_cleanup(udev_db);
}
name_list_cleanup(&name_list);
udev_device_cleanup(udev_db);
}
name_list_cleanup(&name_list);
@@
-263,7
+255,7
@@
int main(int argc, char *argv[], char *envp[])
/* get command line options */
while (1) {
/* get command line options */
while (1) {
- option = getopt_long(argc, argv, "a
d
en:p:q:rVh", options, NULL);
+ option = getopt_long(argc, argv, "aen:p:q:rVh", options, NULL);
if (option == -1)
break;
if (option == -1)
break;
@@
-319,11
+311,8
@@
int main(int argc, char *argv[], char *envp[])
case 'a':
action = ACTION_ATTRIBUTE_WALK;
break;
case 'a':
action = ACTION_ATTRIBUTE_WALK;
break;
- case 'd':
- export_db(export_name_devpath);
- goto exit;
case 'e':
case 'e':
- export_db(
export_record
);
+ export_db();
goto exit;
case 1:
printf("%s\n", UDEV_VERSION);
goto exit;
case 1:
printf("%s\n", UDEV_VERSION);