Skip to contentSkip to conversation

namedev.c - change order of fields in CALLOUT

udev Arnd Bergmann 3 participants 5 messages Nov 21, 2003 – Nov 23, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines · Kay Sievers

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 4 lines · Kay Sievers

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#2 lore raw
In reply to Arnd Bergmann
Quoted 6 lines · Greg KH
Quoted 3 lines · Kay Sievers

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#3 lore raw
In reply to Arnd Bergmann
Quoted 11 lines · Kay Sievers
Quoted 6 lines · Greg KH
Quoted 3 lines · Kay Sievers

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.

Quoted 3 lines

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#4 lore raw
In reply to Arnd Bergmann
Quoted 8 lines · Arnd Bergmann
Quoted 6 lines · Kay Sievers

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 :)

Quoted 8 lines

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 :)

Quoted 3 lines

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel