]> err.no Git - systemd/commitdiff
[PATCH] namedev.c - change order of fields in CALLOUT
authorkay.sievers@vrfy.org <kay.sievers@vrfy.org>
Fri, 21 Nov 2003 14:47:29 +0000 (06:47 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:06:25 +0000 (21:06 -0700)
I want to bring the CALLOUT field ordering in line with the other
methods, cause the current parsing relies on the ordering it's good
to have it like the others. The BUS= is now the first expected field.

Also made the last two remaining field names to uppercase and the man page
callout example is updated.

namedev.c
udev.8

index 41480d50c02c0553061c5ece7ce55aedfc86f897..7c8761088f304036b4a3b3994fa3e06e082ed4da 100644 (file)
--- a/namedev.c
+++ b/namedev.c
@@ -286,7 +286,7 @@ static int namedev_init_config(void)
 
                        /* ID="id" */
                        temp2 = strsep(&temp, ",");
-                       retval = get_value("id", &temp, &temp3);
+                       retval = get_value("ID", &temp, &temp3);
                        if (retval)
                                break;
                        strfieldcpy(dev.id, temp3);
@@ -314,7 +314,7 @@ static int namedev_init_config(void)
 
                        /* PLACE="place" */
                        temp2 = strsep(&temp, ",");
-                       retval = get_value("place", &temp, &temp3);
+                       retval = get_value("PLACE", &temp, &temp3);
                        if (retval)
                                break;
                        strfieldcpy(dev.place, temp3);
@@ -353,18 +353,18 @@ static int namedev_init_config(void)
                        /* number type */
                        dev.type = CALLOUT;
 
-                       /* PROGRAM="executable" */
-                       retval = get_value("PROGRAM", &temp, &temp3);
+                       /* BUS="bus" */
+                       retval = get_value("BUS", &temp, &temp3);
                        if (retval)
                                break;
-                       strfieldcpy(dev.exec_program, temp3);
+                       strfieldcpy(dev.bus, temp3);
 
-                       /* BUS="bus" */
+                       /* PROGRAM="executable" */
                        temp2 = strsep(&temp, ",");
-                       retval = get_value("BUS", &temp, &temp3);
+                       retval = get_value("PROGRAM", &temp, &temp3);
                        if (retval)
                                break;
-                       strfieldcpy(dev.bus, temp3);
+                       strfieldcpy(dev.exec_program, temp3);
 
                        /* ID="id" */
                        temp2 = strsep(&temp, ",");
diff --git a/udev.8 b/udev.8
index e46caaf3226d62fde14fb96417230e407b58559d..079d15f4d13c02ab2adddc709b42da90addd3aa0 100644 (file)
--- a/udev.8
+++ b/udev.8
@@ -105,7 +105,7 @@ TOPOLOGY, BUS="usb", PLACE="2.3", NAME="mouse1"
 REPLACE, KERNEL="ttyUSB1", NAME="pda"
 
 # if /sbin/scsi_id returns "OEM 0815" device will be called disk1
-CALLOUT, PROGRAM="/sbin/scsi_id" BUS="scsi", ID="OEM 0815" NAME="disk1"
+CALLOUT, BUS="scsi", PROGRAM="/sbin/scsi_id", ID="OEM 0815", NAME="disk1"
 
 # USB webcams to be called webcam0, webcam1, ...
 LABEL, BUS="usb", model="WebCam Version 3", NAME="webcam%n"