From: Andries Brouwer <aebr@win.tue.nl>
To: Ludovic Drolez <ludovic.drolez@freealter.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: ioctl to get partitions infos
Date: Thu, 17 Apr 2003 14:23:28 +0200 [thread overview]
Message-ID: <20030417122328.GA19035@win.tue.nl> (raw)
In-Reply-To: <3E9E7B7C.9090605@freealter.com>
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
prev parent reply other threads:[~2003-04-17 12:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-17 10:01 ioctl to get partitions infos Ludovic Drolez
2003-04-17 12:23 ` Andries Brouwer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030417122328.GA19035@win.tue.nl \
--to=aebr@win.tue.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.drolez@freealter.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox