SpGetBootdrive: Difference between revisions
Appearance
m Martini moved page OS2 API:spGetBootdrive to OS2 API:SPUTILS:spGetBootdrive |
m Ak120 moved page OS2 API:SPUTILS:spGetBootdrive to SpGetBootdrive |
||
(One intermediate revision by the same user not shown) | |||
Line 23: | Line 23: | ||
CALL spDropFuncs | CALL spDropFuncs | ||
[[Category: | [[Category:SpUtils]] |
Latest revision as of 23:51, 6 March 2017
Returns the drive letter of the volume the system was booted from. In contrast to spQuerySysInfo('QSV_BOOT_DRIVE') a letter with appended colon is returned.
The function is equivalent to the following Rexx Statement:
D2C(C2D('A')-1+spQuerySysInfo('QSV_BOOT_DRIVE'))||':'
Syntax: bootdrive = spGetBootdrive ( )
Returns: Drive letter of boot volume followed by a colon
Example Code:
/* bootdrv.cmd (spUtils Example Code) */ /* The env variable specified as argument is set to the drive letter of */ /* the boot volume, or if called without parameter, writes it to stdout */ CALL RXFUNCADD 'spLoadFuncs','spUtils','spLoadFuncs' CALL spLoadFuncs PARSE ARG varname rest IF varname= THEN SAY spGetBootdrive() ELSE CALL VALUE varname,spGetBootdrive(),'OS2ENVIRONMENT' CALL spDropFuncs