Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 153656
b: refs/heads/master
c: 0a5372d
h: refs/heads/master
v: v3
  • Loading branch information
Chuck Lever authored and J. Bruce Fields committed Apr 28, 2009
1 parent 52ce6c1 commit 785d004
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c71206a7b4e829601e44c49d8a0f4df0fdfe9302
refs/heads/master: 0a5372d8a13c3f670bf7c9c4a68ab04c3664fa28
20 changes: 13 additions & 7 deletions trunk/fs/nfsd/nfsctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,17 @@ static ssize_t write_versions(struct file *file, char *buf, size_t size)
return rv;
}

/*
* Zero-length write. Return a list of NFSD's current listener
* transports.
*/
static ssize_t __write_ports_names(char *buf)
{
if (nfsd_serv == NULL)
return 0;
return svc_xprt_names(nfsd_serv, buf, 0);
}

/*
* A single 'fd' number was written, in which case it must be for
* a socket of a supported family/protocol, and we use it as an
Expand Down Expand Up @@ -1019,13 +1030,8 @@ static ssize_t __write_ports_delxprt(char *buf)

static ssize_t __write_ports(struct file *file, char *buf, size_t size)
{
if (size == 0) {
int len = 0;

if (nfsd_serv)
len = svc_xprt_names(nfsd_serv, buf, 0);
return len;
}
if (size == 0)
return __write_ports_names(buf);

if (isdigit(buf[0]))
return __write_ports_addfd(buf);
Expand Down

0 comments on commit 785d004

Please sign in to comment.