Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60841
b: refs/heads/master
c: ac34cdb
h: refs/heads/master
i:
  60839: 920fb6a
v: v3
  • Loading branch information
J. Bruce Fields authored and Linus Torvalds committed Jul 17, 2007
1 parent bd20cfb commit df6b2ac
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 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: 0ec757df9743025f14190d6034d8bd2bf37c2dd1
refs/heads/master: ac34cdb03dfdb8cdc824f41f577434c5c2521155
23 changes: 15 additions & 8 deletions trunk/fs/nfsd/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -1453,28 +1453,35 @@ static struct flags {
{ 0, {"", ""}}
};

static void exp_flags(struct seq_file *m, int flag, int fsid,
uid_t anonu, uid_t anong, struct nfsd4_fs_locations *fsloc)
static void show_expflags(struct seq_file *m, int flags, int mask)
{
int first = 0;
struct flags *flg;
int state, first = 0;

for (flg = expflags; flg->flag; flg++) {
int state = (flg->flag & flag)?0:1;
if (flg->flag & ~mask)
continue;
state = (flg->flag & flags) ? 0 : 1;
if (*flg->name[state])
seq_printf(m, "%s%s", first++?",":"", flg->name[state]);
}
}

static void exp_flags(struct seq_file *m, int flag, int fsid,
uid_t anonu, uid_t anong, struct nfsd4_fs_locations *fsloc)
{
show_expflags(m, flag, NFSEXP_ALLFLAGS);
if (flag & NFSEXP_FSID)
seq_printf(m, "%sfsid=%d", first++?",":"", fsid);
seq_printf(m, ",fsid=%d", fsid);
if (anonu != (uid_t)-2 && anonu != (0x10000-2))
seq_printf(m, "%sanonuid=%d", first++?",":"", anonu);
seq_printf(m, ",sanonuid=%d", anonu);
if (anong != (gid_t)-2 && anong != (0x10000-2))
seq_printf(m, "%sanongid=%d", first++?",":"", anong);
seq_printf(m, ",sanongid=%d", anong);
if (fsloc && fsloc->locations_count > 0) {
char *loctype = (fsloc->migrated) ? "refer" : "replicas";
int i;

seq_printf(m, "%s%s=", first++?",":"", loctype);
seq_printf(m, ",%s=", loctype);
seq_escape(m, fsloc->locations[0].path, ",;@ \t\n\\");
seq_putc(m, '@');
seq_escape(m, fsloc->locations[0].hosts, ",;@ \t\n\\");
Expand Down

0 comments on commit df6b2ac

Please sign in to comment.