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.
> @@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]