Re: + s390-add-modalias-to-uevent-for-ccw-devices.patch added to-mm tree

From: Cornelia Huck
Date: Mon Mar 06 2006 - 10:37:30 EST


On Mon, 6 Mar 2006 14:50:17 +0100
Bastian Blank <bastian@xxxxxxxxxxxx> 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.

> @@ -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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/