From e9ad6b71c3b1136414672cd21b339ded7a02dfb9 Mon Sep 17 00:00:00 2001 From: chenjing Date: Mon, 21 Jun 2021 14:17:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A2=9E=E5=8A=A0=E8=A1=A8=E5=A4=B4?= =?UTF-8?q?=EF=BC=8C=E5=86=85=E5=AE=B9=E4=BB=A5=E5=88=B6=E8=A1=A8=E7=AC=A6?= =?UTF-8?q?=E5=88=86=E6=A0=8F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit close #I3W2M9 Signed-off-by: chenjing Change-Id: If8ba7047e2914a3104182bf017f437c2ae962625 --- fs/proc/os_adapt/mounts_proc.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/fs/proc/os_adapt/mounts_proc.c b/fs/proc/os_adapt/mounts_proc.c index 54f128c5..1f3be0e4 100644 --- a/fs/proc/os_adapt/mounts_proc.c +++ b/fs/proc/os_adapt/mounts_proc.c @@ -42,44 +42,38 @@ static int ShowType(const char *mountPoint, struct statfs *statBuf, void *arg) { struct SeqBuf *seqBuf = (struct SeqBuf *)arg; char *type = NULL; - char *name = NULL; switch (statBuf->f_type) { case PROCFS_MAGIC: type = "proc"; - name = "proc"; break; case JFFS2_SUPER_MAGIC: type = "jffs2"; - name = "jffs2"; break; case NFS_SUPER_MAGIC: type = "nfs"; - name = "nfs"; break; case TMPFS_MAGIC: type = "tmpfs"; - name = "tmpfs"; break; case MSDOS_SUPER_MAGIC: type = "vfat"; - name = "fat"; break; case ZPFS_MAGIC: type = "zpfs"; - name = "zpfs"; break; default: return 0; } - (void)LosBufPrintf(seqBuf, "%s %s %s\n", name, mountPoint, type); + (void)LosBufPrintf(seqBuf, "%s\t%s\n", type, mountPoint); return 0; } static int MountsProcFill(struct SeqBuf *m, void *v) { + (void)LosBufPrintf(m, "%s\t%s\n", "Type", "MountPoint"); foreach_mountpoint_t handler = ShowType; (void)foreach_mountpoint(handler, (void *)m); -- GitLab