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:
parent
14f0e2e9bf
commit
a49513587b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user