commit 25b0404d828632130ab3627695e2b845a5f99c6a
Author: Alex Dehnert <adehnert@mit.edu>
Date:   Sun Aug 8 09:51:19 2010 -0400

    If you can scan it, you should be able to skip it
    
    Just because a filesystem isn't backed by a real device doesn't mean it should
    be hard to skip. Scanning AFS (a networked filesystem) and various FUSE
    filesystems are really painful, but baobab didn't previously give an option to
    scan them.
    
    By and large, this tries to make the list of what you can skip show an option
    for any mount that will get scanned.

diff --git a/baobab/src/baobab-prefs.c b/baobab/src/baobab-prefs.c
index 0786ffa..8babeed 100644
--- a/baobab/src/baobab-prefs.c
+++ b/baobab/src/baobab-prefs.c
@@ -24,7 +24,6 @@
 #include <config.h>
 
 #include <string.h>
-#include <sys/stat.h>
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 #include <gconf/gconf-client.h>
@@ -240,7 +239,7 @@ fill_props_model (GtkListStore *store)
 	glibtop_mountentry *mountentry, *mountentry_tofree;
 	guint64 fstotal, fsavail;
 
-	mountentry_tofree = glibtop_get_mountlist (&mountlist, 0);
+	mountentry_tofree = glibtop_get_mountlist (&mountlist, 1);
 
 	for (lo = 0, mountentry = mountentry_tofree;
 	     lo < mountlist.number;
@@ -251,8 +250,17 @@ fill_props_model (GtkListStore *store)
 		gchar *uri;
 		gboolean excluded;
 
-		struct stat buf;
-		if (g_stat (mountentry->devname,&buf) == -1)
+		file = g_file_new_for_path (mountentry->mountdir);
+		/* Virtual filesystems are skipped by the search,
+		so skip them here too */
+		if (is_virtual_filesystem (file))
+			continue;
+		/* If a mount doesn't have a backing store, providing the
+		option to skip it is probably just confusing. */
+		if (strcmp(mountentry->devname, "none") == 0)
+			continue;
+		/* .gvfs is skipped by the search, so skip it here too */
+		if (strcmp(mountentry->type, "fuse.gvfs-fuse-daemon") == 0)
 			continue;
 
 		glibtop_get_fsusage (&fsusage, mountentry->mountdir);
@@ -260,7 +268,6 @@ fill_props_model (GtkListStore *store)
 		fsavail = fsusage.bfree * fsusage.block_size;
 		total = g_format_size_for_display(fstotal);
 		avail = g_format_size_for_display(fsavail);
-		file = g_file_new_for_path (mountentry->mountdir);
 		uri = g_file_get_uri (file);
 		excluded = baobab_is_excluded_location (file);
 
