All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Masney <masneyb@onstation.org>
To: "David F." <df7729@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: What populates /proc/partitions ?
Date: Mon, 30 Sep 2019 19:46:18 -0400	[thread overview]
Message-ID: <20190930234618.GA5536@onstation.org> (raw)
In-Reply-To: <CAGRSmLsV96jK+7UB6T6k8j9u74oPSHTA+1TPU8F9G2NnOqCDJg@mail.gmail.com>

On Mon, Sep 30, 2019 at 03:47:21PM -0700, David F. wrote:
> Hi,
> 
> I want to find out why fd0 is being added to /proc/partitions and stop
> that for my build.  I've searched "/proc/partitions" and "partitions",
> not finding anything that matters.

It looks like it is done in block/genhd.c with this function:

static int __init proc_genhd_init(void)
{
        proc_create_seq("diskstats", 0, NULL, &diskstats_op);
        proc_create_seq("partitions", 0, NULL, &partitions_op);
        return 0;
}
module_init(proc_genhd_init);

Brian


> 
> If udev is doing it, what function is it call so I can search on that?
> 
> TIA!!

  reply	other threads:[~2019-09-30 23:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-30 22:47 What populates /proc/partitions ? David F.
2019-09-30 23:46 ` Brian Masney [this message]
2019-09-30 23:49 ` Randy Dunlap
2019-10-01  0:13   ` David F.
2019-10-01  3:38     ` David F.
2019-10-01  4:59       ` David F.

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=20190930234618.GA5536@onstation.org \
    --to=masneyb@onstation.org \
    --cc=df7729@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.