[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47FD3BBB.406@rtr.ca>
Date: Wed, 09 Apr 2008 17:57:15 -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,
>
> 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
$
--
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