home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / programm / 5757 < prev    next >
Encoding:
Text File  |  1992-12-22  |  2.2 KB  |  56 lines

  1. Newsgroups: comp.unix.programmer
  2. Path: sparky!uunet!spool.mu.edu!yale.edu!jvnc.net!darwin.sura.net!udel!rochester!rocksanne!news
  3. From: collins.escp10@xerox.com (Anthony Collins)
  4. Subject: Re: sun dkinfo command question
  5. Message-ID: <1992Dec21.165524.6241@spectrum.xerox.com>
  6. Sender: news@spectrum.xerox.com
  7. Reply-To: collins.escp10@xerox.com
  8. Organization: Xerox Corporation, El Segundo CA
  9. References: <1992Dec16.112411@is.morgan.com>
  10. Date: Mon, 21 Dec 1992 16:55:24 GMT
  11. Lines: 43
  12.  
  13. In article 112411@is.morgan.com, scairns@is.morgan.com (Scott Cairns) writes:
  14. > I'm working on an application that needs to display dkinfo(8) like
  15. > information about disk drives and their partitions.  This is under
  16. > SunOS 4.1.
  17. > So far, I've got it to a point where I can display the starting
  18. > cylinder number, the number of cylinders and the tracks/sector
  19. > for the drive but I need to get more detailed information about
  20. > the partitions.  
  21. > I've been using ioctl(2) to get the above information but what
  22. > calls should I be looking at to get the individual partition
  23. > info?
  24. > Thanks in advance.
  25. > +------------------------------------------------------------------+
  26. > | Scott Cairns               |   email: scairns@fsg.com         |
  27. > | Fusion Systems Group        |          scairns@is.morgan.com   |
  28. > | New York, New York, USA       |                                  |
  29. > +------------------------------------------------------------------+
  30. > | Standard disclaimers apply.                      | 
  31. > +------------------------------------------------------------------+
  32. > | I hope in the future Americans are thought of as a warlike,      |
  33. > | vicious people, because then I bet a lot of high schools would   |
  34. > | pick 'Americans' as their mascot.                   |
  35. > |                        - Jack Handey           |
  36. > +------------------------------------------------------------------+
  37.  
  38. I believe you may want to do 'man dkio'.  This should tell you how to
  39. use ioctl(2) to get information from the disk label about partitions
  40. and disk geometry.  I have used the DKIOCGEOM and DKIOCGAPART defines
  41. as arguments to ioctl(2) to get geometry and partition information.
  42.  
  43. Hope this helps.
  44.  
  45.  
  46. ---
  47. Anthony Collins
  48. Xerox Corporation
  49. Internet: collins.escp10@xerox.com
  50.  
  51.  
  52.