On Mon, Mar 06, 2006 at 11:04:16AM +0100, Cornelia Huck wrote: > 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 -- Lots of people drink from the wrong bottle sometimes. -- Edith Keeler, "The City on the Edge of Forever", stardate unknown
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 3494bff..ea4652b 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c @@ -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;
Attachment:
signature.asc
Description: Digital signature
- Follow-Ups:
- Re: + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree
- From: Cornelia Huck <[email protected]>
- Re: + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree
- References:
- Re: + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree
- From: Cornelia Huck <[email protected]>
- Re: + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree
- Prev by Date: RE: [PATCH 2.6.15.3 1/1] ACPI: Atlas ACPI driver
- Next by Date: Re: emu10k1_synth use after free
- Previous by thread: Re: + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree
- Next by thread: Re: + s390-add-modalias-to-uevent-for-ccw-devices.patch added to -mm tree
- Index(es):