aboutsummaryrefslogtreecommitdiff
path: root/sys/nfsclient/bootp_subr.c
diff options
context:
space:
mode:
authorBenno Rice <benno@FreeBSD.org>2008-05-16 06:27:03 +0000
committerBenno Rice <benno@FreeBSD.org>2008-05-16 06:27:03 +0000
commitaea75fde62208ee460ad17391e06021586a5aa6e (patch)
tree354e844d56b37819297bbcd4fc46a226d6d555f1 /sys/nfsclient/bootp_subr.c
parentb98d401185e17236b4e68ff2ce58413c7865bc18 (diff)
downloadsrc-aea75fde62208ee460ad17391e06021586a5aa6e.tar.gz
src-aea75fde62208ee460ad17391e06021586a5aa6e.zip
Allow the block size used when booting over NFS to be overridden. It defaults
to 8192 bytes which is the size currently used.
Notes
Notes: svn path=/head/; revision=179039
Diffstat (limited to 'sys/nfsclient/bootp_subr.c')
-rw-r--r--sys/nfsclient/bootp_subr.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c
index a2c09c5e576d..77c7739b3750 100644
--- a/sys/nfsclient/bootp_subr.c
+++ b/sys/nfsclient/bootp_subr.c
@@ -209,6 +209,11 @@ struct bootpc_globalcontext {
#define DHCP_REQUEST 3
#define DHCP_ACK 5
+/* NFS read/write block size */
+#ifndef BOOTP_BLOCKSIZE
+#define BOOTP_BLOCKSIZE 8192
+#endif
+
static char bootp_cookie[128];
SYSCTL_STRING(_kern, OID_AUTO, bootp_cookie, CTLFLAG_RD,
bootp_cookie, 0, "Cookie (T134) supplied by bootp server");
@@ -1234,8 +1239,8 @@ static void
mountopts(struct nfs_args *args, char *p)
{
args->version = NFS_ARGSVERSION;
- args->rsize = 8192;
- args->wsize = 8192;
+ args->rsize = BOOTP_BLOCKSIZE;
+ args->wsize = BOOTP_BLOCKSIZE;
args->flags = NFSMNT_RSIZE | NFSMNT_WSIZE | NFSMNT_RESVPORT;
args->sotype = SOCK_DGRAM;
if (p != NULL)