lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 10 Apr 2008 15:53:33 -0400
From:	Mark Lord <lkml@....ca>
To:	Francis Moreau <francis.moro@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Disk geometry from /sys

Francis Moreau wrote:
> Hi
> 
> On Wed, Apr 9, 2008 at 11:57 PM, Mark Lord <lkml@....ca> wrote:
>>> I'm trying to know the geometry of my hard disk from a bash script
>>> and that's the reason I'm looking in /sys. The reason is that I'd like
>>> to figure out the size of a cylinder without doing a
>>> ioctl(bdev, HDIO_GETGEO, &geo)
>>>
>>  $ DEV=/dev/sda
>>  $ GEOM="`/sbin/hdparm -g $DEV | awk '{print $3}'`"
>>  $ echo $GEOM
>>  19457/255/63
>>  $
>>
> 
> Sure and you could the same with fdisk, sfdisk, parted outputs...
> 
> But that wasn't my point, sorry if it wasn't clear.
> 
> I was actually wondering why /sys/block/sda exports a lot of disk
> features but the disk geometry. I was wondering if somthing like
> 
> /sys/block/sda/geometry/heads
> 
> could be useful...
..

Probably not for going forward.  Except when partitioning,
the CHS info isn't really useful or needed for anything newer
than about 14 years old.

And there's already an ioctl for getting it.

So we could add more /sysfs bloat for it, I suppose, but..
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ