+ s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
Cornelia Huck
Acked-byQuoted 5 lines · On Sun, 05 Mar 2006 23:12:30 -0800 [email protected] wrote:
From: Bastian Blank <[email protected]>
Add a MODALIAS line to the uevents generated for ccw devices. udev uses them to load modules.
Quoted 7 lines
Cc Heiko Carstens <[email protected]>Cc Martin Schwidefsky <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
drivers/s390/cio/device.c | 40 ++++++++++++++++++++++++++---------- 1 files changed, 29 insertions(+), 11 deletions(-)
Hm, didn't see this on lkml, but the patch looks fine.
Cornelia
Quoted 14 lines · Cornelia Huck
Quoted 10 lines · On Sun, 05 Mar 2006 23:12:30 -0800 [email protected] wrote:
From: Bastian Blank <[email protected]>
Add a MODALIAS line to the uevents generated for ccw devices. udev uses them to load modules.
Cc Heiko Carstens <[email protected]>Cc Martin Schwidefsky <[email protected]>Signed-off-by Andrew Morton <[email protected]>---
Quoted 4 lines
Quoted 2 lines
drivers/s390/cio/device.c | 40 ++++++++++++++++++++++++++---------- 1 files changed, 29 insertions(+), 11 deletions(-)Hm, didn't see this on lkml, but the patch looks fine.
It was a best guess, based upon random URLs which people were tossing around. (I did ask to be emailed the updated patch).
Quoted 1 line
Acked-by Cornelia Huck <[email protected]>
OK, but if you're prefer to do it differently, please send the patch. Via email ;)
Quoted 1 line · Cornelia Huck
Hm, didn't see this on lkml, but the patch looks fine.
Yep, I forgot to add the lkml in the recipient list, sorry.
Bastian
Signature · 2 lines
Love sometimes expresses itself in sacrifice. -- Kirk, "Metamorphosis", stardate 3220.3
Quoted 1 line · Cornelia Huck
Hm, didn't see this on lkml, but the patch looks fine.
And it does not work as expected. The uevent includes "MODALIAS=" but the rest got lost in the buffer as it used a wrong offset. The attached patch makes that really working.
Bastian
Signature · 3 lines
Lots of people drink from the wrong bottle sometimes. -- Edith Keeler, "The City on the Edge of Forever", stardate unknown
drivers/s390/cio/device.c +3 -3
@@ -79,7 +79,7 @@ ccw_uevent (struct device *dev, char **e {struct ccw_device *cdev =to_ccwdev (dev);int i =0 ; -int length =0 ; +int length =0 , tmp_length =0 ;if (!cdev)return -ENODEV ;
@@ -120,8 +120,8 @@ ccw_uevent (struct device *dev, char **e buffer += length; envp[i++] = buffer; - length +=scnprintf (buffer, buffer_size - length,"MODALIAS=" ); - length +=modalias_print (cdev, buffer + length, buffer_size - length); + length += tmp_length =scnprintf (buffer, buffer_size - length,"MODALIAS=" ); + length +=modalias_print (cdev, buffer + tmp_length, buffer_size - length);if ((buffer_size - length <=0 ) || (i >= num_envp))return -ENOMEM ;
Quoted 5 lines · On Mon, 6 Mar 2006 14:50:17 +0100 Bastian Blank <[email protected]> wrote:
And it does not work as expected. The uevent includes "MODALIAS=" but the rest got lost in the buffer as it used a wrong offset. The attached patch makes that really working.
drivers/s390/cio/device.c ccw_uevent (struct device *dev, char **e · line 126
Quoted 9 lines
drivers/s390/cio/device.c +2
-2@@ -120,8 +120,8 @@ ccw_uevent (struct device *dev, char **e buffer += length; envp[i++] = buffer; - length +=scnprintf (buffer, buffer_size - length,"MODALIAS=" ); - length +=modalias_print (cdev, buffer + length, buffer_size - length); + length += tmp_length =scnprintf (buffer, buffer_size - length,"MODALIAS=" ); + length +=modalias_print (cdev, buffer + tmp_length, buffer_size - length);if ((buffer_size - length <=0 ) || (i >= num_envp))return -ENOMEM ;
You're right. I don't like the tmp_length too much, but can't think of anything better.
Cornelia
Quoted 2 lines · Cornelia Huck
You're right. I don't like the
tmp_lengthtoo much, but can't think of anything better.
This will get fixed in my next patch, which uses add_uevent_var where possible.
Bastian
Signature · 2 lines
A woman should have compassion. -- Kirk, "Catspaw", stardate 3018.2
Quoted 2 lines · On Mon, 6 Mar 2006 17:02:34 +0100 Bastian Blank <[email protected]> wrote:
This will get fixed in my next patch, which uses
add_uevent_varwhere possible.
Sounds good - thanks for working on this!
Cornelia