public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] for BZ #1978 (statvfs)
@ 2005-12-16  9:30 Thorsten Kukuk
  2005-12-20  7:23 ` Ulrich Drepper
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Kukuk @ 2005-12-16  9:30 UTC (permalink / raw)
  To: libc-hacker


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] for BZ #1978 (statvfs)
  2005-12-16  9:30 [PATCH] for BZ #1978 (statvfs) Thorsten Kukuk
@ 2005-12-20  7:23 ` Ulrich Drepper
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2005-12-20  7:23 UTC (permalink / raw)
  To: Thorsten Kukuk; +Cc: libc-hacker

OK, applied.

-- 
➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-20  7:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-16  9:30 [PATCH] for BZ #1978 (statvfs) Thorsten Kukuk
2005-12-20  7:23 ` Ulrich Drepper

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).