🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #27030

Re: boot path

#27030
From: Justin Chris Vallon
Date: Wed, 06 Apr 1988 05:40
16 lines
1124 bytes
To get the volume name of the current startup disk (ie the disk on which the
current System Folder is) in C, use the working directory reference number
of the system folder contained in BootDrive ($210), and then GetVolInfo:

    ParamBlkRec paramBlock;
    paramBlock.ioNamePtr = startupVolName;
    paramBlock.ioVRefNum = *(int *)0x210;
    paramBlock.ioVolIndex = 0;
    PBGetVInfo(&paramBlock, 0); /* returns OsErr */

Note that since BootDrive is an HFS global, this code will fail under the
64K ROMs... but who cares about them anyway :-)  If you want MFS, look at
Inside Mac II-108, which tells you to GetVRefNum of SysMap which returns the
VRN of the system startup volume.
-Justin
Technical Details
Message-ID: <gWKQH9E1DU-0QO00L9@andrew.cmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!bbn!rochester!PT.CS.CMU.EDU!andrew.cmu.edu!jv0l+

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!lll-winken!lll-tis!ames!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!bbn!rochester!PT.CS.CMU.EDU!andrew.cmu.edu!jv0l+
From: jv0l+@andrew.cmu.edu (Justin Chris Vallon)
Newsgroups: comp.sys.mac
Subject: Re: boot path
Message-ID: <gWKQH9E1DU-0QO00L9@andrew.cmu.edu>
Date: 6 Apr 88 05:40:25 GMT
Organization: Carnegie Mellon University
Lines: 14
In-Reply-To: <406@lsrhs.UUCP>