diff options
| author | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-02-05 21:07:40 +0000 |
|---|---|---|
| committer | Jerry Jelinek <jerry.jelinek@joyent.com> | 2016-02-05 21:07:40 +0000 |
| commit | 14fafe1c7dc8e0d2718591f3a06a84ec0d32c9b5 (patch) | |
| tree | c1c584e5b1a81f69778eecfdae0fd534a33e051a | |
| parent | 389c6f5cb69d3260a1627efc70c10659b3164f40 (diff) | |
| download | illumos-joyent-14fafe1c7dc8e0d2718591f3a06a84ec0d32c9b5.tar.gz | |
OS-4762 lxbrand /proc/mounts could tell a better story
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
| -rw-r--r-- | usr/src/uts/common/brand/lx/procfs/lx_prvnops.c | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c b/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c index c922861d1c..a2dad381be 100644 --- a/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c +++ b/usr/src/uts/common/brand/lx/procfs/lx_prvnops.c @@ -3491,6 +3491,7 @@ nextfs: while (printp != NULL) { struct print_data *printp_next; const char *resource; + char *fstype; char *mntpt; struct vnode *vp; int error; @@ -3524,9 +3525,33 @@ nextfs: resource = "-"; } + /* Make things look more like Linux */ + fstype = vfssw[printp->vfs_fstype].vsw_name; + + if (strcmp(mntpt, "/var/ld") == 0 || + strcmp(fstype, "objfs") == 0 || + strcmp(fstype, "mntfs") == 0 || + strcmp(fstype, "ctfs") == 0 || + strncmp(mntpt, "/native/", 8) == 0) { + goto nextp; + } + + if (strcmp(fstype, "tmpfs") == 0) { + resource = "tmpfs"; + } else if (strcmp(fstype, "lx_proc") == 0) { + resource = fstype = "proc"; + } else if (strcmp(fstype, "lx_sysfs") == 0) { + resource = fstype = "sysfs"; + } else if (strcmp(fstype, "lx_devfs") == 0) { + resource = fstype = "devtmpfs"; + } else if (strcmp(fstype, "lx_cgroup") == 0) { + resource = fstype = "cgroup"; + } else if (strcmp(fstype, "lxautofs") == 0) { + fstype = "autofs"; + } + lxpr_uiobuf_printf(uiobuf, - "%s %s %s %s 0 0\n", - resource, mntpt, vfssw[printp->vfs_fstype].vsw_name, + "%s %s %s %s 0 0\n", resource, mntpt, fstype, printp->vfs_flag & VFS_RDONLY ? "ro" : "rw"); nextp: @@ -3537,6 +3562,9 @@ nextp: printp = printp_next; } + + /* Add a single dummy entry for /native */ + lxpr_uiobuf_printf(uiobuf, "/native /native zfs ro 0 0\n"); } /* |
