The sector count is a 64bit number that is often reported as a 32bit
number (due to limitations in dprintf). Consistently use "%u"
reporting to avoid confusing negative numbers.
Reported-by: Tobias Diedrich <tobiasdiedrich@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
// clip to 1024 cylinders in lchs
if (cylinders > 1024)
cylinders = 1024;
- dprintf(1, "drive %p: PCHS=%u/%d/%d translation=%s LCHS=%d/%d/%d s=%d\n"
+ dprintf(1, "drive %p: PCHS=%u/%d/%d translation=%s LCHS=%d/%d/%d s=%u\n"
, drive
, drive->pchs.cylinder, drive->pchs.head, drive->pchs.sector
, desc
return -1;
}
drive->sectors = (u64)be32_to_cpu(capdata.sectors) + 1;
- dprintf(1, "%s blksize=%d sectors=%d\n"
+ dprintf(1, "%s blksize=%d sectors=%u\n"
, s, drive->blksize, (unsigned)drive->sectors);
// We do not recover from USB stalls, so try to be safe and avoid