* ioctl to get partitions infos
@ 2003-04-17 10:01 Ludovic Drolez
2003-04-17 12:23 ` Andries Brouwer
0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Drolez @ 2003-04-17 10:01 UTC (permalink / raw)
To: linux-kernel
Hi !
As I need more than 'cat /proc/partitions', I wondered if there's an
ioctl in 2.4 or 2.5 which will kindly return me all the information the
kernel knows about partition (start sector, length, type) ? (pls, don't
say that I need the parse the partition table myself ;-( )
Regards,
--
Ludovic DROLEZ Free&ALter Soft
152, rue de Grigy - Technopole Metz 2000 57070 METZ
tel : 03 87 75 55 21 fax : 03 87 75 19 26
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ioctl to get partitions infos
2003-04-17 10:01 ioctl to get partitions infos Ludovic Drolez
@ 2003-04-17 12:23 ` Andries Brouwer
0 siblings, 0 replies; 2+ messages in thread
From: Andries Brouwer @ 2003-04-17 12:23 UTC (permalink / raw)
To: Ludovic Drolez; +Cc: linux-kernel
On Thu, Apr 17, 2003 at 12:01:32PM +0200, Ludovic Drolez wrote:
> As I need more than 'cat /proc/partitions', I wondered if there's an
> ioctl in 2.4 or 2.5 which will kindly return me all the information the
> kernel knows about partition (start sector, length, type) ? (pls, don't
> say that I need the parse the partition table myself ;-( )
There are ioctls that will tell you start sector and length.
HDIO_GETGEO gives you start
BLKGETSIZE gives you length
I do not know what you mean by type, but the kernel doesn't know it.
(A partition may be found from a DOS-type or BSD-type or Amiga-type
or ... partition table. Each has its own ways of indicating a type
of partition. A partition can also be created by ioctl where no
partition table is involved. Then there is no type at all.
No type is used by the kernel, roughly speaking.)
Andries
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-04-17 12:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-17 10:01 ioctl to get partitions infos Ludovic Drolez
2003-04-17 12:23 ` Andries Brouwer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).