>From 473603b55e41dcc1a41584cfa3cee5c95c0192bc Mon Sep 17 00:00:00 2001 From: Bernhard Voelker Date: Tue, 24 Jan 2017 23:35:56 +0100 Subject: [PATCH 2/5] maint: remove unused get_mounted_filesystems * find/fstype.c (get_mounted_filesystems): Remove unused function ... * find/defs.h (get_mounted_filesystems): ... and its declaration. --- find/defs.h | 1 - find/fstype.c | 38 -------------------------------------- 2 files changed, 39 deletions(-) diff --git a/find/defs.h b/find/defs.h index 52e522fb..1761ec50 100644 --- a/find/defs.h +++ b/find/defs.h @@ -371,7 +371,6 @@ void cleanup(void); /* fstype.c */ char *filesystem_type (const struct stat *statp, const char *path); -char * get_mounted_filesystems (void); dev_t * get_mounted_devices (size_t *); diff --git a/find/fstype.c b/find/fstype.c index a0ac8bca..deaf54a2 100644 --- a/find/fstype.c +++ b/find/fstype.c @@ -232,44 +232,6 @@ file_system_type_uncached (const struct stat *statp, const char *path) } -char * -get_mounted_filesystems (void) -{ - char *result = NULL; - size_t alloc_size = 0u; - size_t used = 0u; - struct mount_entry *entries, *entry; - void *p; - - entries = must_read_fs_list (false); - for (entry=entries; entry; entry=entry->me_next) - { - size_t len; - -#ifdef MNTTYPE_IGNORE - if (!strcmp (entry->me_type, MNTTYPE_IGNORE)) - continue; -#endif - - len = strlen (entry->me_mountdir) + 1; - p = extendbuf (result, used+len, &alloc_size); - if (p) - { - result = p; - strcpy (&result[used], entry->me_mountdir); - used += len; /* len already includes one for the \0 */ - } - else - { - break; - } - } - - free_file_system_list (entries); - return result; -} - - dev_t * get_mounted_devices (size_t *n) { -- 2.11.0