From: Thorsten Kukuk <kukuk@suse.de>
To: libc-hacker@sources.redhat.com
Subject: [PATCH] for BZ #1978 (statvfs)
Date: Fri, 16 Dec 2005 09:30:00 -0000 [thread overview]
Message-ID: <20051216093047.GA24751@suse.de> (raw)
Hi,
for BZ #1978 I added the SYSFS_MAGIC to linux_fsinfo.h and the most
common filesystem mappings to internal_statvfs.c: sysfs, reiserfs,
xfs, jfs, hpfs, devfs, iso9660, msdos and ntfs.
We still have magics in linux_fsinfo.h for which we have no mapping,
but I don't know the real used names in /proc/mounts for them.
2005-12-16 Thorsten Kukuk <kukuk@suse.de>
[BZ #1978]
* sysdeps/unix/sysv/linux/internal_statvfs.c (__statvfs_getflags):
Map more filesystem types to a string.
* sysdeps/unix/sysv/linux/linux_fsinfo.h: Add SYSFS_MAGIC.
--- sysdeps/unix/sysv/linux/internal_statvfs.c 3 Apr 2004 17:32:18 -0000 1.13
+++ sysdeps/unix/sysv/linux/internal_statvfs.c 15 Dec 2005 18:40:55 -0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2003, 2004, 2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -71,6 +71,33 @@
case NFS_SUPER_MAGIC:
fsname = "nfs";
break;
+ case SYSFS_MAGIC:
+ fsname = "sysfs";
+ break;
+ case REISERFS_SUPER_MAGIC:
+ fsname = "reiserfs";
+ break;
+ case XFS_SUPER_MAGIC:
+ fsname = "xfs";
+ break;
+ case JFS_SUPER_MAGIC:
+ fsname = "jfs";
+ break;
+ case HPFS_SUPER_MAGIC:
+ fsname = "hpfs";
+ break;
+ case DEVFS_SUPER_MAGIC:
+ fsname = "devfs";
+ break;
+ case ISOFS_SUPER_MAGIC:
+ fsname = "iso9660";
+ break;
+ case MSDOS_SUPER_MAGIC:
+ fsname = "msdos";
+ break;
+ case NTFS_SUPER_MAGIC:
+ fsname = "ntfs";
+ break;
}
FILE *mtab = __setmntent ("/proc/mounts", "r");
--- sysdeps/unix/sysv/linux/linux_fsinfo.h 17 Sep 2003 00:48:25 -0000 1.14
+++ sysdeps/unix/sysv/linux/linux_fsinfo.h 15 Dec 2005 18:40:55 -0000
@@ -1,5 +1,5 @@
/* Constants from kernel header for various FSes.
- Copyright (C) 1998,1999,2000,2001,2002,2003 Free Software Foundation, Inc.
+ Copyright (C) 1998,1999,2000,2001,2002,2003,2005 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -135,6 +135,9 @@
/* Constants that identify the `vxfs' filesystem. */
#define VXFS_SUPER_MAGIC 0xa501fcf5
+/* Constants that identify the `sysfs´ filesystem. */
+#define SYSFS_MAGIC 0x62656572
+
/* Maximum link counts. */
#define COH_LINK_MAX 10000
#define EXT2_LINK_MAX 32000
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de
SUSE LINUX Products GmbH Maxfeldstr. 5 D-90409 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B
next reply other threads:[~2005-12-16 9:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-16 9:30 Thorsten Kukuk [this message]
2005-12-20 7:23 ` Ulrich Drepper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051216093047.GA24751@suse.de \
--to=kukuk@suse.de \
--cc=libc-hacker@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).