Ignore leading '_' in model name returned by devices.

This make "_NEC" devices appear as "NEC" which is more corrent.
The reason is tha NEC originally screwed up on the byteorder in the
model string, so now that they have realized that they prefixed the '_'
so that not every ATA driver on the planet would call them "EN C" :)
This commit is contained in:
Søren Schmidt 2004-09-16 09:35:01 +00:00
parent 14f0e2e9bf
commit a49513587b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=135296

View file

@ -759,7 +759,7 @@ btrim(int8_t *buf, int len)
int8_t *ptr;
for (ptr = buf; ptr < buf+len; ++ptr)
if (!*ptr)
if (!*ptr || *ptr == '_')
*ptr = ' ';
for (ptr = buf + len - 1; ptr >= buf && *ptr == ' '; --ptr)
*ptr = 0;