home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.programmer
- Path: sparky!uunet!spool.mu.edu!yale.edu!jvnc.net!darwin.sura.net!udel!rochester!rocksanne!news
- From: collins.escp10@xerox.com (Anthony Collins)
- Subject: Re: sun dkinfo command question
- Message-ID: <1992Dec21.165524.6241@spectrum.xerox.com>
- Sender: news@spectrum.xerox.com
- Reply-To: collins.escp10@xerox.com
- Organization: Xerox Corporation, El Segundo CA
- References: <1992Dec16.112411@is.morgan.com>
- Date: Mon, 21 Dec 1992 16:55:24 GMT
- Lines: 43
-
- In article 112411@is.morgan.com, scairns@is.morgan.com (Scott Cairns) writes:
- > I'm working on an application that needs to display dkinfo(8) like
- > information about disk drives and their partitions. This is under
- > SunOS 4.1.
- >
- > So far, I've got it to a point where I can display the starting
- > cylinder number, the number of cylinders and the tracks/sector
- > for the drive but I need to get more detailed information about
- > the partitions.
- >
- > I've been using ioctl(2) to get the above information but what
- > calls should I be looking at to get the individual partition
- > info?
- >
- > Thanks in advance.
- >
- > +------------------------------------------------------------------+
- > | Scott Cairns | email: scairns@fsg.com |
- > | Fusion Systems Group | scairns@is.morgan.com |
- > | New York, New York, USA | |
- > +------------------------------------------------------------------+
- > | Standard disclaimers apply. |
- > +------------------------------------------------------------------+
- > | I hope in the future Americans are thought of as a warlike, |
- > | vicious people, because then I bet a lot of high schools would |
- > | pick 'Americans' as their mascot. |
- > | - Jack Handey |
- > +------------------------------------------------------------------+
-
- I believe you may want to do 'man dkio'. This should tell you how to
- use ioctl(2) to get information from the disk label about partitions
- and disk geometry. I have used the DKIOCGEOM and DKIOCGAPART defines
- as arguments to ioctl(2) to get geometry and partition information.
-
- Hope this helps.
-
-
- ---
- Anthony Collins
- Xerox Corporation
- Internet: collins.escp10@xerox.com
-
-
-