bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patch] ignore cifs mount points like smbfs (otherwise `df -l` shows cif


From: Mike Frysinger
Subject: [patch] ignore cifs mount points like smbfs (otherwise `df -l` shows cifs)
Date: Wed, 19 Jul 2006 21:01:09 -0400
User-agent: KMail/1.9.3

a user reported that running `df --local` was showing his cifs mount point 
http://bugs.gentoo.org/141012 ... indeed:

$ df --version | head -n 1
df (GNU coreutils) 5.97
$ df --local | tail -n 1
//matt/d$             22081340  18343740   3737600  84% /mnt/tmp
$ mount | grep matt
//matt/d$ on /mnt/tmp type cifs (rw,mand)

attached patch against cvs HEAD updates the ME_REMOTE() macro in 
lib/mountlist.c to compare Fs_type to "cifs" like it already does for "smbfs"
-mike

Attachment: pgpbuEbVAP9bn.pgp
Description: PGP signature

2006-07-19  Mike Frysinger  <address@hidden>

        * lib/mountlist.c [ME_REMOTE]: Filter out cifs.

--- coreutils/lib/mountlist.c
+++ coreutils/lib/mountlist.c
@@ -153,12 +153,12 @@
 
 #ifndef ME_REMOTE
 /* A file system is `remote' if its Fs_name contains a `:'
-   or if (it is of type smbfs and its Fs_name starts with `//').  */
+   or if (it is of type (smbfs or cifs) and its Fs_name starts with `//').  */
 # define ME_REMOTE(Fs_name, Fs_type)           \
     (strchr (Fs_name, ':') != 0                        \
      || ((Fs_name)[0] == '/'                   \
         && (Fs_name)[1] == '/'                 \
-        && strcmp (Fs_type, "smbfs") == 0))
+        && (strcmp (Fs_type, "smbfs") == 0 || strcmp (Fs_type, "cifs") == 0)))
 #endif
 
 #if MOUNTED_GETMNTINFO

reply via email to

[Prev in Thread] Current Thread [Next in Thread]