/* Input: buf: C string containing an unsigned integer value representing the number of NFSD threads to start size: non-zero length of C string in @buf Output: On success: NFS service is started; passed-in buffer filled with ' */
static ssize_t write_threads(struct file *file, char *buf, size_t size)
/* Input: buf: C string containing an unsigned integer value representing the number of NFSD threads to start size: non-zero length of C string in @buf Output: On success: NFS service is started; passed-in buffer filled with ' */
static ssize_t write_threads(struct file *file, char *buf, size_t size)
{
	char *mesg = buf;
	int rv;
	if (size > 0) {
		int newthreads;
		rv = get_int(&mesg, &newthreads);
		if (rv)
			return rv;
		if (newthreads < 0)
			return -EINVAL;
		rv = nfsd_svc(NFS_PORT, newthreads);
		if (rv < 0)
			return rv;
	} else
		rv = nfsd_nrthreads();
	return scnprintf(buf, SIMPLE_TRANSACTION_LIMIT, "%d\n", rv);
}