cmd.cwd[0] = '/'; cmd.cwd[1] = '\0';
boot(bootdev)	dev_t	bootdev;{	register const char *bootfile = kernels[0];	register int i = 0, f;	machdep();	devboot(bootdev, cmd.bootdev);	strncpy(cmd.image, bootfile, sizeof(cmd.image));	cmd.boothowto = 0;	cmd.conf = "/etc/boot.conf";	cmd.cwd[0] = '/'; cmd.cwd[1] = '\0';	cmd.addr = (void *)0x100000;	cmd.timeout = 5;	f = read_conf();	printf(">> OpenBSD BOOT %s\n", version);	while (1) {		if (f <= 0) /* no boot.conf, or no boot cmd in there */			do {				printf("boot> ");			} while(!getcmd());		f = 0;		printf("booting %s: ", cmd.path);		exec(cmd.path, cmd.addr, cmd.boothowto);		if (kernels[++i] == NULL)			bootfile = kernels[i=0];		else			bootfile = kernels[i];		cmd.timeout++;		printf(" failed(%d). will try %s\n", errno, bootfile);		strncpy(cmd.image, bootfile, sizeof(cmd.image));	}}