Wow,

diskinfo.c has explicit support for regular files:

               isreg = S_ISREG(sb.st_mode);
               if (isreg) {
                       mediasize = sb.st_size;
                       sectorsize = S_BLKSIZE;
                       fwsectors = 0;
                       fwheads = 0;

But I would not know the proper use case for that related to the name of the 
tool.

Anyways, nice catch. Computers are weird.

Cheers,
Ronald.


Van: Pete French <p...@twisted.org.uk>
Datum: vrijdag, 25 februari 2022 11:30
Aan: Chuck Tuffli <ctuf...@gmail.com>
CC: stable@freebsd.org
Onderwerp: Re: Instance drives in AWS comming up with the wrong size

Ok, I found what was causing this, there is no bug, and I am somewhat 
embarassed.

Somehow I ended up with a file called 'nda2' in /root

So doing 'diskinfo' in /root finds the file not the device. Simple as that.

sorry for the noise!

-pete.

Reply via email to