lkml.org 
[lkml]   [2011]   [Dec]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] Add BLKPG_GET_PARTITION operation
On Wed, Nov 30, 2011 at 10:23:44PM -0500, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Add a new operation to the BLKPG ioctl to read the partition.
> This allows user space to find the current start and length
> of a partition without having to open the partition and use
> the long depreciated HDIO_GETGEO ioctl.

$ cat /sys/block/sda/sda1/{size,start}
4096000
2048

...is probably the best way if you want to avoid problems with
permissions and deprecated (or all) ioctls :-)

Karel

--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com


\
 
 \ /
  Last update: 2011-12-08 13:37    [W:0.030 / U:1.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site