diff options
Diffstat (limited to 'fs/nfsd/export.c')
-rw-r--r-- | fs/nfsd/export.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c index 06d5cd4a52c4..c7bbf460b009 100644 --- a/fs/nfsd/export.c +++ b/fs/nfsd/export.c | |||
@@ -641,6 +641,7 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen) | |||
641 | 641 | ||
642 | static void exp_flags(struct seq_file *m, int flag, int fsid, | 642 | static void exp_flags(struct seq_file *m, int flag, int fsid, |
643 | uid_t anonu, uid_t anong, struct nfsd4_fs_locations *fslocs); | 643 | uid_t anonu, uid_t anong, struct nfsd4_fs_locations *fslocs); |
644 | static void show_secinfo(struct seq_file *m, struct svc_export *exp); | ||
644 | 645 | ||
645 | static int svc_export_show(struct seq_file *m, | 646 | static int svc_export_show(struct seq_file *m, |
646 | struct cache_detail *cd, | 647 | struct cache_detail *cd, |
@@ -670,6 +671,7 @@ static int svc_export_show(struct seq_file *m, | |||
670 | seq_printf(m, "%02x", exp->ex_uuid[i]); | 671 | seq_printf(m, "%02x", exp->ex_uuid[i]); |
671 | } | 672 | } |
672 | } | 673 | } |
674 | show_secinfo(m, exp); | ||
673 | } | 675 | } |
674 | seq_puts(m, ")\n"); | 676 | seq_puts(m, ")\n"); |
675 | return 0; | 677 | return 0; |
@@ -1467,6 +1469,33 @@ static void show_expflags(struct seq_file *m, int flags, int mask) | |||
1467 | } | 1469 | } |
1468 | } | 1470 | } |
1469 | 1471 | ||
1472 | static void show_secinfo_flags(struct seq_file *m, int flags) | ||
1473 | { | ||
1474 | seq_printf(m, ","); | ||
1475 | show_expflags(m, flags, NFSEXP_SECINFO_FLAGS); | ||
1476 | } | ||
1477 | |||
1478 | static void show_secinfo(struct seq_file *m, struct svc_export *exp) | ||
1479 | { | ||
1480 | struct exp_flavor_info *f; | ||
1481 | struct exp_flavor_info *end = exp->ex_flavors + exp->ex_nflavors; | ||
1482 | int lastflags = 0, first = 0; | ||
1483 | |||
1484 | if (exp->ex_nflavors == 0) | ||
1485 | return; | ||
1486 | for (f = exp->ex_flavors; f < end; f++) { | ||
1487 | if (first || f->flags != lastflags) { | ||
1488 | if (!first) | ||
1489 | show_secinfo_flags(m, lastflags); | ||
1490 | seq_printf(m, ",sec=%d", f->pseudoflavor); | ||
1491 | lastflags = f->flags; | ||
1492 | } else { | ||
1493 | seq_printf(m, ":%d", f->pseudoflavor); | ||
1494 | } | ||
1495 | } | ||
1496 | show_secinfo_flags(m, lastflags); | ||
1497 | } | ||
1498 | |||
1470 | static void exp_flags(struct seq_file *m, int flag, int fsid, | 1499 | static void exp_flags(struct seq_file *m, int flag, int fsid, |
1471 | uid_t anonu, uid_t anong, struct nfsd4_fs_locations *fsloc) | 1500 | uid_t anonu, uid_t anong, struct nfsd4_fs_locations *fsloc) |
1472 | { | 1501 | { |