| Guido van Rossum | d4d7728 | 1994-08-19 10:51:31 +0000 | [diff] [blame] | 1 | /* Return the name of the boot volume (not the current directory). | 
 | 2 |    Public domain by Guido van Rossum, CWI, Amsterdam (July 1987). | 
 | 3 | */ | 
 | 4 |  | 
 | 5 | #include "macdefs.h" | 
 | 6 |  | 
 | 7 | char * | 
| Jack Jansen | 9ae898b | 2000-07-11 21:16:03 +0000 | [diff] [blame] | 8 | getbootvol(void) | 
| Guido van Rossum | d4d7728 | 1994-08-19 10:51:31 +0000 | [diff] [blame] | 9 | { | 
 | 10 | 	short vrefnum; | 
 | 11 | 	static unsigned char name[32]; | 
 | 12 | 	 | 
 | 13 | 	(void) GetVol(name, &vrefnum); | 
 | 14 | 	p2cstr(name); | 
 | 15 | 		/* Shouldn't fail; return ":" if it does */ | 
 | 16 | 	strcat((char *)name, ":"); | 
 | 17 | 	return (char *)name; | 
 | 18 | } |