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
This commit is contained in:
Jordan K. Hubbard 1994-11-18 16:29:50 +00:00
parent dca5391032
commit 9b1096e759
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=4642

View file

@ -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)