Print this page
Marcel's code review fixes
Marcel's update to 7651


2475 struct proto_option_defs {
2476         char *tag;
2477         char *name;     /* display name -- remove protocol identifier */
2478         int index;
2479         int type;
2480         union {
2481             int intval;
2482             char *string;
2483         } defvalue;
2484         uint32_t svcs;
2485         int32_t minval;
2486         int32_t maxval;
2487         char *other;
2488         int compare;
2489 #define OPT_CMP_GE      0
2490 #define OPT_CMP_LE      1
2491         int (*check)(char *);
2492 } proto_options[] = {
2493 #define PROTO_OPT_NFSD_SERVERS                  0
2494         {"nfsd_servers",
2495             "servers", PROTO_OPT_NFSD_SERVERS, OPT_TYPE_NUMBER, 16, SVC_NFSD,
2496             1, INT32_MAX},
2497 #define PROTO_OPT_LOCKD_LISTEN_BACKLOG          1
2498         {"lockd_listen_backlog",
2499             "lockd_listen_backlog", PROTO_OPT_LOCKD_LISTEN_BACKLOG,
2500             OPT_TYPE_NUMBER, 32, SVC_LOCKD, 32, INT32_MAX},
2501 #define PROTO_OPT_LOCKD_SERVERS                 2
2502         {"lockd_servers",
2503             "lockd_servers", PROTO_OPT_LOCKD_SERVERS, OPT_TYPE_NUMBER, 20,
2504             SVC_LOCKD, 1, INT32_MAX},
2505 #define PROTO_OPT_LOCKD_RETRANSMIT_TIMEOUT      3
2506         {"lockd_retransmit_timeout",
2507             "lockd_retransmit_timeout", PROTO_OPT_LOCKD_RETRANSMIT_TIMEOUT,
2508             OPT_TYPE_NUMBER, 5, SVC_LOCKD, 0, INT32_MAX},
2509 #define PROTO_OPT_GRACE_PERIOD                  4
2510         {"grace_period",
2511             "grace_period", PROTO_OPT_GRACE_PERIOD, OPT_TYPE_NUMBER, 90,
2512             SVC_LOCKD, 0, INT32_MAX},
2513 #define PROTO_OPT_NFS_SERVER_VERSMIN            5
2514         {"nfs_server_versmin",
2515             "server_versmin", PROTO_OPT_NFS_SERVER_VERSMIN, OPT_TYPE_NUMBER,
2516             (int)NFS_VERSMIN_DEFAULT, SVC_NFSD|SVC_MOUNTD, NFS_VERSMIN,
2517             NFS_VERSMAX, "server_versmax", OPT_CMP_LE},
2518 #define PROTO_OPT_NFS_SERVER_VERSMAX            6
2519         {"nfs_server_versmax",
2520             "server_versmax", PROTO_OPT_NFS_SERVER_VERSMAX, OPT_TYPE_NUMBER,
2521             (int)NFS_VERSMAX_DEFAULT, SVC_NFSD|SVC_MOUNTD, NFS_VERSMIN,
2522             NFS_VERSMAX, "server_versmin", OPT_CMP_GE},
2523 #define PROTO_OPT_NFS_CLIENT_VERSMIN            7




2475 struct proto_option_defs {
2476         char *tag;
2477         char *name;     /* display name -- remove protocol identifier */
2478         int index;
2479         int type;
2480         union {
2481             int intval;
2482             char *string;
2483         } defvalue;
2484         uint32_t svcs;
2485         int32_t minval;
2486         int32_t maxval;
2487         char *other;
2488         int compare;
2489 #define OPT_CMP_GE      0
2490 #define OPT_CMP_LE      1
2491         int (*check)(char *);
2492 } proto_options[] = {
2493 #define PROTO_OPT_NFSD_SERVERS                  0
2494         {"nfsd_servers",
2495             "servers", PROTO_OPT_NFSD_SERVERS, OPT_TYPE_NUMBER, 1024, SVC_NFSD,
2496             1, INT32_MAX},
2497 #define PROTO_OPT_LOCKD_LISTEN_BACKLOG          1
2498         {"lockd_listen_backlog",
2499             "lockd_listen_backlog", PROTO_OPT_LOCKD_LISTEN_BACKLOG,
2500             OPT_TYPE_NUMBER, 32, SVC_LOCKD, 32, INT32_MAX},
2501 #define PROTO_OPT_LOCKD_SERVERS                 2
2502         {"lockd_servers",
2503             "lockd_servers", PROTO_OPT_LOCKD_SERVERS, OPT_TYPE_NUMBER, 256,
2504             SVC_LOCKD, 1, INT32_MAX},
2505 #define PROTO_OPT_LOCKD_RETRANSMIT_TIMEOUT      3
2506         {"lockd_retransmit_timeout",
2507             "lockd_retransmit_timeout", PROTO_OPT_LOCKD_RETRANSMIT_TIMEOUT,
2508             OPT_TYPE_NUMBER, 5, SVC_LOCKD, 0, INT32_MAX},
2509 #define PROTO_OPT_GRACE_PERIOD                  4
2510         {"grace_period",
2511             "grace_period", PROTO_OPT_GRACE_PERIOD, OPT_TYPE_NUMBER, 90,
2512             SVC_LOCKD, 0, INT32_MAX},
2513 #define PROTO_OPT_NFS_SERVER_VERSMIN            5
2514         {"nfs_server_versmin",
2515             "server_versmin", PROTO_OPT_NFS_SERVER_VERSMIN, OPT_TYPE_NUMBER,
2516             (int)NFS_VERSMIN_DEFAULT, SVC_NFSD|SVC_MOUNTD, NFS_VERSMIN,
2517             NFS_VERSMAX, "server_versmax", OPT_CMP_LE},
2518 #define PROTO_OPT_NFS_SERVER_VERSMAX            6
2519         {"nfs_server_versmax",
2520             "server_versmax", PROTO_OPT_NFS_SERVER_VERSMAX, OPT_TYPE_NUMBER,
2521             (int)NFS_VERSMAX_DEFAULT, SVC_NFSD|SVC_MOUNTD, NFS_VERSMIN,
2522             NFS_VERSMAX, "server_versmin", OPT_CMP_GE},
2523 #define PROTO_OPT_NFS_CLIENT_VERSMIN            7