mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: viro@parcelfarce.linux.theplanet.co.uk
To: mikem@beardog.cca.cpqcorp.net
Cc: linux-kernel@vger.kernel.org
Subject: Re: problems with alloc_disk in genhd.c
Date: Wed, 23 Jun 2004 23:03:15 +0100	[thread overview]
Message-ID: <20040623220314.GL12308@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20040623215512.GD16336@beardog.cca.cpqcorp.net>

On Wed, Jun 23, 2004 at 04:55:12PM -0500, mikem@beardog.cca.cpqcorp.net wrote:
> On Wed, Jun 23, 2004 at 10:24:59PM +0100, viro@parcelfarce.linux.theplanet.co.uk wrote:
> > On Wed, Jun 23, 2004 at 04:18:29PM -0500, mikem@beardog.cca.cpqcorp.net wrote:
> > > In the  ioctl we are doing
> > > 
> > >         /* count partitions 1 to 15 with sizes > 0 */
> > >         for(i=0; i <MAX_PART; i++) {
> > 
> > ... followed by what?
> Here's the actual code, I typoed this first time.
> 	/* count partitions 1 to 15 with sizes > 0 */
> 	for(i=1; i <MAX_PART; i++) {
> 		if (!disk->part[i])
> 			continue;
> 		if (disk->part[i]->nr_sects != 0)
> 			luninfo.num_parts++;
> We're trying to figure how many partitions are physically on the disk. We do
> this for one of our utilities. Is there a kernel API that will return this
> data for us?

A bunch of those, starting with readdir on /sys/block/<whatever>.  Why do
you want that as a driver-specific ioctl?

That stuff has no business being in the driver.  At all.

      reply	other threads:[~2004-06-23 22:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-23 21:18 mikem
2004-06-23 21:24 ` viro
2004-06-23 21:55   ` mikem
2004-06-23 22:03     ` viro [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=20040623220314.GL12308@parcelfarce.linux.theplanet.co.uk \
    --to=viro@parcelfarce.linux.theplanet.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikem@beardog.cca.cpqcorp.net \
    /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

all inboxes | Powered by JetHome®