> But then we see we are storing the return value of a void function
> (so that is why ANSI C is good)... so fix that up, too, by setting
> the return value to zero if a valid device was found. Otherwise,
> return ENODEV as before.
>
> Patch is against 2.5.65.
Christoph Hellwig sent a patch for this to the linux-scsi
list. Both patches have the same minor problem. Sysfs
store() callbacks are supposed to return the count of
bytes consumed. It's a moot point in this case since there
is no sscanf() processing. To use this code I can get
to the appropriate sysfs directory and write:
# echo "anything_I_like" > rescan
So are all bytes in that string consumed? If so the "ret = 0;"
line in your patch should be "ret = count;".
Doug Gilbert
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/