summaryrefslogtreecommitdiffstats
path: root/usr.sbin/boot0cfg/boot0cfg.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2011-12-20 15:19:29 +0000
committerjhb <jhb@FreeBSD.org>2011-12-20 15:19:29 +0000
commit2fa7cf8a54af92319bc1a08f666ee13551b12207 (patch)
tree8f352c4469c3c5ab00568b543c364b9bc5229d97 /usr.sbin/boot0cfg/boot0cfg.c
parent1eeaa2989fb2285b0318968605f3fe7826f8e863 (diff)
downloadFreeBSD-src-2fa7cf8a54af92319bc1a08f666ee13551b12207.zip
FreeBSD-src-2fa7cf8a54af92319bc1a08f666ee13551b12207.tar.gz
Allow boot0cfg to force a PXE boot via boot0 on the next boot.
- Fix boot0 to check for PXE when using the pre-set setting for the preferred slice. - Update boot0cfg to use slice 6 to select PXE. Accept a 'pxe' argument instead of a number for the 's' option as a way to select PXE as well. Submitted by: Andrew Boyer aboyer averesystems MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/boot0cfg/boot0cfg.c')
-rw-r--r--usr.sbin/boot0cfg/boot0cfg.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/boot0cfg/boot0cfg.c b/usr.sbin/boot0cfg/boot0cfg.c
index 935f85b..2602e50 100644
--- a/usr.sbin/boot0cfg/boot0cfg.c
+++ b/usr.sbin/boot0cfg/boot0cfg.c
@@ -169,7 +169,10 @@ main(int argc, char *argv[])
o_flag = 1;
break;
case 's':
- s_arg = argtoi(optarg, 1, 5, 's');
+ if (strcasecmp(optarg, "pxe") == 0)
+ s_arg = 6;
+ else
+ s_arg = argtoi(optarg, 1, 6, 's');
break;
case 't':
t_arg = argtoi(optarg, 1, 0xffff, 't');
@@ -472,8 +475,10 @@ display_mbr(u_int8_t *mbr)
printf("default_selection=F%d (", mbr[OFF_OPT] + 1);
if (mbr[OFF_OPT] < 4)
printf("Slice %d", mbr[OFF_OPT] + 1);
- else
+ else if (mbr[OFF_OPT] == 4)
printf("Drive 1");
+ else
+ printf("PXE");
printf(")\n");
}
OpenPOWER on IntegriCloud