Re: [PATCH] hdparm: fix printing of ATA identification strings

tito via busybox <[email protected]>
Newsgroups gmane.linux.busybox
Message-ID <20260811101503.73d6ce73@devuan>
On Tue, 11 Aug 2026 14:22:58 +0900
Romain Guyard via busybox <[email protected]> wrote:

> Hello!
> 
> In the hdparm applet, print_ascii() is intended to skip leading
> spaces before printing ATA IDENTIFY strings, but its condition
> is inverted, causing it to skip non-space characters instead.
> 
> This causes left-justified serial numbers and firmware revisions to be
> printed as empty, and truncates model strings at their first embedded
> space.
> 
> The attached patch fixes the condition and adds a regression test using
> synthetic ATA IDENTIFY data. It was also tested on real hardware.
> 
> Thanks,
Hi,
to be honest the hdparm applet seems to be totally broken
with latest git:

./busybox hdparm -I /dev/sdb

/dev/sdb:
hdparm: HDIO_DRIVE_CMD: Invalid argument


hdparm -I /dev/sdb

/dev/sdb:

ATA device, with non-removable media
        Model Number:       WDC WD5003ABYZ-011FA0               


 git rev-parse --short HEAD
7473045ad

Ciao,
Tito
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.