Gentoo Archives: gentoo-dev

From: Greg KH <gregkh@g.o>
To: Nathaniel McCallum <npmccallum@g.o>
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] HDD Detection
Date: Sun, 13 Jun 2004 18:45:59
Message-Id: 20040613184440.GA15039@kroah.com
In Reply to: Re: [gentoo-dev] HDD Detection by Nathaniel McCallum
1 On Sat, Jun 12, 2004 at 10:09:11PM -0400, Nathaniel McCallum wrote:
2 > Hey, I was hoping you would jump in. The script is for the installer
3 > and it is to detect and return a list of all the partitionable devices
4 > on the system (hard drives, etc). What are your suggestions?
5
6 Oh, that's simple:
7 /sys/block/*
8
9 > The current iteration relies on /proc/partitions and minor/major
10 > numbers, the second of which I would like to do without (being that
11 > kernel major/minors are diappearing).
12
13 They aren't dissapearing, just not as meaningful to userspace anymore.
14 You will need to get them from:
15 /sys/block/*/dev
16 and they will be in the form:
17 major:minor
18
19
20 Sound good?
21
22 thanks,
23
24 greg k-h
25
26 --
27 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] HDD Detection Mike Frysinger <vapier@g.o>