From 01a7406e270277001bdb8e0ac277da3328c138ec Mon Sep 17 00:00:00 2001
From: Andreas Mohr <and@gmx.li>
Date: Sun, 17 Jan 2016 16:43:31 +0000
Subject: [PATCH] cleanup mountlist.c remove unused read_file_system_list() parameter
need_fs_type and all_fs never varied
Signed-off-by: Andreas Mohr <and@gmx.li>
---
src/filemanager/mountlist.c | 27 +++++++++++----------------
1 file changed, 11 insertions(+), 16 deletions(-)
diff --git a/src/filemanager/mountlist.c b/src/filemanager/mountlist.c
index 3aa7a6a..14477b1 100644
a
|
b
|
unescape_tab (char *str) |
645 | 645 | the returned list are valid. Otherwise, they might not be. */ |
646 | 646 | |
647 | 647 | static GSList * |
648 | | read_file_system_list (int need_fs_type) |
| 648 | read_file_system_list (void) |
649 | 649 | { |
650 | 650 | GSList *mount_list = NULL; |
651 | 651 | struct mount_entry *me; |
… |
… |
read_file_system_list (int need_fs_type) |
1057 | 1057 | me->me_type = ""; |
1058 | 1058 | me->me_type_malloced = 0; |
1059 | 1059 | #ifdef GETFSTYP /* SVR3. */ |
1060 | | if (need_fs_type) |
1061 | | { |
1062 | | struct statfs fsd; |
1063 | | char typebuf[FSTYPSZ]; |
| 1060 | struct statfs fsd; |
| 1061 | char typebuf[FSTYPSZ]; |
1064 | 1062 | |
1065 | | if (statfs (me->me_mountdir, &fsd, sizeof (fsd), 0) != -1 |
1066 | | && sysfs (GETFSTYP, fsd.f_fstyp, typebuf) != -1) |
1067 | | { |
1068 | | me->me_type = g_strdup (typebuf); |
1069 | | me->me_type_malloced = 1; |
1070 | | } |
| 1063 | if (statfs (me->me_mountdir, &fsd, sizeof (fsd), 0) != -1 |
| 1064 | && sysfs (GETFSTYP, fsd.f_fstyp, typebuf) != -1) |
| 1065 | { |
| 1066 | me->me_type = g_strdup (typebuf); |
| 1067 | me->me_type_malloced = 1; |
1071 | 1068 | } |
1072 | 1069 | #endif |
1073 | 1070 | me->me_dummy = ME_DUMMY (me->me_devname, me->me_type); |
… |
… |
read_file_system_list (int need_fs_type) |
1290 | 1287 | } |
1291 | 1288 | #endif /* MOUNTED_INTERIX_STATVFS */ |
1292 | 1289 | |
1293 | | (void) need_fs_type; /* avoid argument-unused warning */ |
1294 | | |
1295 | 1290 | return g_slist_reverse (mount_list); |
1296 | 1291 | |
1297 | 1292 | free_then_fail: |
… |
… |
read_file_system_list (int need_fs_type) |
1318 | 1313 | */ |
1319 | 1314 | |
1320 | 1315 | static GSList * |
1321 | | read_file_system_list (int need_fs_type, int all_fs) |
| 1316 | read_file_system_list (void) |
1322 | 1317 | { |
1323 | 1318 | struct _disk_entry de; |
1324 | 1319 | struct statfs fs; |
… |
… |
init_my_statfs (void) |
1694 | 1689 | { |
1695 | 1690 | #ifdef HAVE_INFOMOUNT_LIST |
1696 | 1691 | free_my_statfs (); |
1697 | | mc_mount_list = read_file_system_list (1); |
| 1692 | mc_mount_list = read_file_system_list (); |
1698 | 1693 | #endif /* HAVE_INFOMOUNT_LIST */ |
1699 | 1694 | } |
1700 | 1695 | |
… |
… |
my_statfs (struct my_statfs *myfs_stats, const char *path) |
1754 | 1749 | struct mount_entry *entry; |
1755 | 1750 | struct fs_usage fs_use; |
1756 | 1751 | |
1757 | | entry = read_file_system_list (0, 0); |
| 1752 | entry = read_file_system_list (); |
1758 | 1753 | if (entry != NULL) |
1759 | 1754 | { |
1760 | 1755 | get_fs_usage (entry->me_mountdir, NULL, &fs_use); |