From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29682 invoked by alias); 16 Dec 2005 09:30:57 -0000 Received: (qmail 29658 invoked by uid 22791); 16 Dec 2005 09:30:55 -0000 X-Spam-Check-By: sourceware.org Received: from ns2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 16 Dec 2005 09:30:52 +0000 Received: from Relay1.suse.de (mail2.suse.de [195.135.221.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 7E3091D8D2 for ; Fri, 16 Dec 2005 10:30:47 +0100 (CET) Date: Fri, 16 Dec 2005 09:30:00 -0000 From: Thorsten Kukuk To: libc-hacker@sources.redhat.com Subject: [PATCH] for BZ #1978 (statvfs) Message-ID: <20051216093047.GA24751@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.6i Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2005-12/txt/msg00013.txt.bz2 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 [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 , 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