summaryrefslogtreecommitdiffstats
path: root/Mac/Compat/getbootvol.c
blob: 8f5d28c0b302c69ea2916ce11fc8c3824f3542fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* Return the name of the boot volume (not the current directory).
   Public domain by Guido van Rossum, CWI, Amsterdam (July 1987).
*/

#include "macdefs.h"

char *
getbootvol()
{
	short vrefnum;
	static unsigned char name[32];
	
	(void) GetVol(name, &vrefnum);
	p2cstr(name);
		/* Shouldn't fail; return ":" if it does */
	strcat((char *)name, ":");
	return (char *)name;
}