From 9b1096e759e35845b76cf2a4b63abe64a0d38cb6 Mon Sep 17 00:00:00 2001 From: "Jordan K. Hubbard" Date: Fri, 18 Nov 1994 16:29:50 +0000 Subject: [PATCH] From: wpaul@ctr.columbia.edu (Bill Paul) Subject: Mea culpa -- small fix for netboot fixes In accordance with the unavoidable principle sof Murphy's Law, I discovered that the fixes I recently contributed for the netboot code had some small flaws in them. Two of them were just typos and had no effect on how the program functioned. The other one was a missing line from the rootopts and swapopts functions I created in bootmenu.c, which was supposed to initialize the NFS sotype flag. It defaults to UDP, and you can change it to TCP with the rootopts or swapopts commands, but then you can't change it back again. I originally had a line at the top of each function to reinitialize this flag, but somehow it got lost in the shuffle, probably because I don't actually have a need for that flag yet. Submitted by: wpaul --- sys/i386/boot/netboot/bootmenu.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/i386/boot/netboot/bootmenu.c b/sys/i386/boot/netboot/bootmenu.c index 807786dfaf55..10fc5ca50018 100644 --- a/sys/i386/boot/netboot/bootmenu.c +++ b/sys/i386/boot/netboot/bootmenu.c @@ -29,7 +29,7 @@ struct bootcmds_t { {"diskboot", exit}, {"autoboot", NULL}, #ifdef INCLUDE_3COM - ("trans", cmd_aui}, + {"trans", cmd_aui}, #endif {NULL, NULL} }; @@ -221,6 +221,7 @@ cmd_rootopts(p) if (*p) { nfsdiskless.root_args.flags = NFSMNT_RSIZE | NFSMNT_WSIZE; + nfsdiskless.root_args.sotype = SOCK_DGRAM; if ((tmp = (char *)substr(p,"rsize="))) nfsdiskless.root_args.rsize=getdec(&tmp); if ((tmp = (char *)substr(p,"wsize="))) @@ -234,7 +235,7 @@ cmd_rootopts(p) if ((tmp = (char *)substr(p, "tcp"))) nfsdiskless.root_args.sotype = SOCK_STREAM; } else { - printf("rootfs mount options: rsize=%d,wsize=%d", + printf("Rootfs mount options: rsize=%d,wsize=%d", nfsdiskless.root_args.rsize, nfsdiskless.root_args.wsize); if (nfsdiskless.root_args.flags & NFSMNT_RESVPORT) @@ -261,6 +262,7 @@ cmd_swapopts(p) if (*p) { nfsdiskless.swap_args.flags = NFSMNT_RSIZE | NFSMNT_WSIZE; + nfsdiskless.swap_args.sotype = SOCK_DGRAM; if ((tmp = (char *)substr(p,"rsize="))) nfsdiskless.swap_args.rsize=getdec(&tmp); if ((tmp = (char *)substr(p,"wsize="))) @@ -274,11 +276,11 @@ cmd_swapopts(p) if ((tmp = (char *)substr(p, "tcp"))) nfsdiskless.swap_args.sotype = SOCK_STREAM; } else { - printf("swapfs mount options: rsize=%d,wsize=%d", + printf("Swapfs mount options: rsize=%d,wsize=%d", nfsdiskless.swap_args.rsize, nfsdiskless.swap_args.wsize); if (nfsdiskless.swap_args.flags & NFSMNT_RESVPORT) - printf (",resrvport"); + printf (",resvport"); if (nfsdiskless.swap_args.flags & NFSMNT_SOFT) printf (",soft"); if (nfsdiskless.swap_args.flags & NFSMNT_INT)