[sane-devel] [PATCH] sanei_scsi device enumeration via sysfs
jb at jblache.org
Mon Apr 27 20:47:10 UTC 2009
"m. allan noah" <kitno455 at gmail.com> wrote:
> Attached is a new version, more debug output, fix mis-placed ')',
> strip trailing whitespace from data read from /sys files.
Woops, thanks for catching the misplaced '(' :) Actually the SCSI
identifiers on my laptops are not long enough to show the problem.
As for the whitespace, you don't need to trim it, that's actually why
strncmp() is used for the string comparison later on. SCSI strings
have always been whitespace-padded.
Actually, removing the trailing \n added by sysfs would be nice for
display purpose, but more than that is just wasting CPU cycles :)
Julien BLACHE <http://www.jblache.org>
<jb at jblache.org> GPG KeyID 0xF5D65169
More information about the sane-devel