* Re: [udev] namedev.c - change order of fields in CALLOUT
@ 2003-11-21 3:26 Arnd Bergmann
2003-11-21 6:49 ` Greg KH
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Arnd Bergmann @ 2003-11-21 3:26 UTC (permalink / raw)
To: linux-hotplug
On Friday 21 November 2003 18:08, Kay Sievers wrote:
> Fine, please don't forget to mention it with the next release,
> cause people need to change their config file if CALLOUT was used before.
>
> Maybe we should put a line in the example config too, that says:
> "The order of the fields does matter."
> I needed approx. 10 minutes to realize :)
Hmm, maybe the order /shouldn't/ matter, then. I already thought about
making a patch that lets you have some other interesting fields, without
the order mattering at all. E.g.
# no ID=, but DRIVERCALLOUT, DRIVER="dasd-eckd", PROGRAM="/sbin/dasdname", NAME="%c"
# new CLASS=, NAME= first
REPLACE, NAME="tape/norewind/nst%n", CLASS="tape", KERNEL_NAME="nst*"
Btw, can someone explain to me the difference between TOPOLOGY and NUMBER?
The documentation suggests that they are used differently, but I
could not find any difference in the code.
Arnd <><
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [udev] namedev.c - change order of fields in CALLOUT
2003-11-21 3:26 [udev] namedev.c - change order of fields in CALLOUT Arnd Bergmann
@ 2003-11-21 6:49 ` Greg KH
2003-11-21 17:08 ` Kay Sievers
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2003-11-21 6:49 UTC (permalink / raw)
To: linux-hotplug
On Thu, Nov 20, 2003 at 11:05:53PM +0100, Kay Sievers wrote:
> Hi Greg,
> 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.
Good catch, I've applied this, thanks.
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [udev] namedev.c - change order of fields in CALLOUT
2003-11-21 3:26 [udev] namedev.c - change order of fields in CALLOUT Arnd Bergmann
2003-11-21 6:49 ` Greg KH
@ 2003-11-21 17:08 ` Kay Sievers
2003-11-23 6:01 ` Greg KH
2003-11-23 6:03 ` Greg KH
3 siblings, 0 replies; 6+ messages in thread
From: Kay Sievers @ 2003-11-21 17:08 UTC (permalink / raw)
To: linux-hotplug
On Thu, Nov 20, 2003 at 10:49:56PM -0800, Greg KH wrote:
> On Thu, Nov 20, 2003 at 11:05:53PM +0100, Kay Sievers wrote:
> > 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.
>
> Good catch, I've applied this, thanks.
Fine, please don't forget to mention it with the next release,
cause people need to change their config file if CALLOUT was used before.
Maybe we should put a line in the example config too, that says:
"The order of the fields does matter."
I needed approx. 10 minutes to realize :)
thanks,
Kay
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [udev] namedev.c - change order of fields in CALLOUT
2003-11-21 3:26 [udev] namedev.c - change order of fields in CALLOUT Arnd Bergmann
2003-11-21 6:49 ` Greg KH
2003-11-21 17:08 ` Kay Sievers
@ 2003-11-23 6:01 ` Greg KH
2003-11-23 6:03 ` Greg KH
3 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2003-11-23 6:01 UTC (permalink / raw)
To: linux-hotplug
On Fri, Nov 21, 2003 at 06:08:34PM +0100, Kay Sievers wrote:
> On Thu, Nov 20, 2003 at 10:49:56PM -0800, Greg KH wrote:
> > On Thu, Nov 20, 2003 at 11:05:53PM +0100, Kay Sievers wrote:
> > > 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.
> >
> > Good catch, I've applied this, thanks.
>
>
> Fine, please don't forget to mention it with the next release,
> cause people need to change their config file if CALLOUT was used before.
Good point, I will try to remember that.
> Maybe we should put a line in the example config too, that says:
> "The order of the fields does matter."
> I needed approx. 10 minutes to realize :)
Heh, sorry.
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [udev] namedev.c - change order of fields in CALLOUT
2003-11-21 3:26 [udev] namedev.c - change order of fields in CALLOUT Arnd Bergmann
` (2 preceding siblings ...)
2003-11-23 6:01 ` Greg KH
@ 2003-11-23 6:03 ` Greg KH
3 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2003-11-23 6:03 UTC (permalink / raw)
To: linux-hotplug
On Fri, Nov 21, 2003 at 04:26:44AM +0100, Arnd Bergmann wrote:
> On Friday 21 November 2003 18:08, Kay Sievers wrote:
> > Fine, please don't forget to mention it with the next release,
> > cause people need to change their config file if CALLOUT was used before.
> >
> > Maybe we should put a line in the example config too, that says:
> > "The order of the fields does matter."
> > I needed approx. 10 minutes to realize :)
>
> Hmm, maybe the order /shouldn't/ matter, then. I already thought about
> making a patch that lets you have some other interesting fields, without
> the order mattering at all. E.g.
>
> # no ID=, but DRIVER> CALLOUT, DRIVER="dasd-eckd", PROGRAM="/sbin/dasdname", NAME="%c"
>
> # new CLASS=, NAME= first
> REPLACE, NAME="tape/norewind/nst%n", CLASS="tape", KERNEL_NAME="nst*"
That would be nice. As you can probably tell, I don't like writing
parsers :)
> Btw, can someone explain to me the difference between TOPOLOGY and NUMBER?
> The documentation suggests that they are used differently, but I
> could not find any difference in the code.
I need to get some more stuff from libsysfs in order to make these two
rules different. You are correct, right now they are pretty much the
same, due to USB devices putting the topology in the device number,
which is what I had on hand to demo for OLS 2003.
thanks,
greg k-h
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* [udev] namedev.c - change order of fields in CALLOUT
@ 2003-11-20 22:05 Kay Sievers
0 siblings, 0 replies; 6+ messages in thread
From: Kay Sievers @ 2003-11-20 22:05 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 471 bytes --]
Hi Greg,
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.
thanks,
Kay
10-namedev.c-callout-fields-order.diff
10-udev.8-callout-fields-order.diff
namedev.c - reorder CALLOUT fields to match the other methods
[-- Attachment #2: 10-namedev.c-callout-fields-order.diff --]
[-- Type: text/plain, Size: 1223 bytes --]
--- ../udev/namedev.c 2003-11-20 22:07:06.000000000 +0100
+++ namedev.c 2003-11-20 22:59:27.000000000 +0100
@@ -286,7 +286,7 @@
/* 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 @@
/* 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 @@
/* 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, ",");
[-- Attachment #3: 10-udev.8-callout-fields-order.diff --]
[-- Type: text/plain, Size: 491 bytes --]
--- ../udev/udev.8 2003-11-20 22:07:06.000000000 +0100
+++ udev.8 2003-11-20 22:23:50.000000000 +0100
@@ -105,7 +105,7 @@
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"
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-11-23 6:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-21 3:26 [udev] namedev.c - change order of fields in CALLOUT Arnd Bergmann
2003-11-21 6:49 ` Greg KH
2003-11-21 17:08 ` Kay Sievers
2003-11-23 6:01 ` Greg KH
2003-11-23 6:03 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2003-11-20 22:05 Kay Sievers
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).