Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234281
b: refs/heads/master
c: 93f1c20
h: refs/heads/master
i:
  234279: 7554331
v: v3
  • Loading branch information
Aneesh Kumar K.V authored and Al Viro committed Mar 15, 2011
1 parent 66bb93b commit 52e401f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a51571ccb8be1b88aea502ebba8350519682c16d
refs/heads/master: 93f1c20bc8cdb757be50566eff88d65c3b26881f
16 changes: 16 additions & 0 deletions trunk/fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1002,6 +1002,18 @@ const struct seq_operations mounts_op = {
.show = show_vfsmnt
};

static int uuid_is_nil(u8 *uuid)
{
int i;
u8 *cp = (u8 *)uuid;

for (i = 0; i < 16; i++) {
if (*cp++)
return 0;
}
return 1;
}

static int show_mountinfo(struct seq_file *m, void *v)
{
struct proc_mounts *p = m->private;
Expand Down Expand Up @@ -1040,6 +1052,10 @@ static int show_mountinfo(struct seq_file *m, void *v)
if (IS_MNT_UNBINDABLE(mnt))
seq_puts(m, " unbindable");

if (!uuid_is_nil(mnt->mnt_sb->s_uuid))
/* print the uuid */
seq_printf(m, " uuid:%pU", mnt->mnt_sb->s_uuid);

/* Filesystem specific data */
seq_puts(m, " - ");
show_type(m, sb);
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1408,6 +1408,7 @@ struct super_block {
wait_queue_head_t s_wait_unfrozen;

char s_id[32]; /* Informational name */
u8 s_uuid[16]; /* UUID */

void *s_fs_info; /* Filesystem private info */
fmode_t s_mode;
Expand Down

0 comments on commit 52e401f

Please sign in to comment.