diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2011-01-08 12:06:54 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2011-01-08 12:06:54 -0500 |
commit | 9e881a3821b045c9b75c64e9c349dc82b276df28 (patch) | |
tree | c711539acab1466efd5e2047557601d293f42340 /src/ata.c | |
parent | 3c241edf3d7ef29c21e63ab74cfc7cb6f4a92ab3 (diff) | |
download | seabios-hppa-9e881a3821b045c9b75c64e9c349dc82b276df28.zip seabios-hppa-9e881a3821b045c9b75c64e9c349dc82b276df28.tar.gz seabios-hppa-9e881a3821b045c9b75c64e9c349dc82b276df28.tar.bz2 |
Extract space trimming code from ATA and use in USB and bootorder code.
Introduce function nullTrailingSpace() that nulls blank characters
from the end of a string. Use this function in the ATA, USB MSC, and
bootorder code.
Diffstat (limited to 'src/ata.c')
-rw-r--r-- | src/ata.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -727,11 +727,7 @@ ata_extract_model(char *model, u32 size, u16 *buffer) for (i=0; i<size/2; i++) *(u16*)&model[i*2] = ntohs(buffer[27+i]); model[size] = 0x00; - - // Trim trailing spaces from model name. - for (i=size-1; i>0 && model[i] == 0x20; i--) - model[i] = 0x00; - + nullTrailingSpace(model); return model; } |