From 144418cd9db07666edb4b11f21a620a75acce625 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 4 Feb 2003 10:28:23 +0000 Subject: (show_disk): Move function to precede find_mount_point. --- src/df.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src') diff --git a/src/df.c b/src/df.c index 91580787c..83a74fe82 100644 --- a/src/df.c +++ b/src/df.c @@ -438,25 +438,6 @@ show_dev (const char *disk, const char *mount_point, const char *fstype, putchar ('\n'); } -/* Identify the directory, if any, that device - DISK is mounted on, and show its disk usage. */ - -static void -show_disk (const char *disk) -{ - struct mount_entry *me; - - for (me = mount_list; me; me = me->me_next) - if (STREQ (disk, me->me_devname)) - { - show_dev (me->me_devname, me->me_mountdir, me->me_type, - me->me_dummy, me->me_remote); - return; - } - /* No filesystem is mounted on DISK. */ - show_dev (disk, (char *) NULL, (char *) NULL, 0, 0); -} - /* Return the root mountpoint of the filesystem on which FILE exists, in malloced storage. FILE_STAT should be the result of stating FILE. */ static char * @@ -522,6 +503,25 @@ done: return mp; } +/* Identify the directory, if any, that device + DISK is mounted on, and show its disk usage. */ + +static void +show_disk (const char *disk) +{ + struct mount_entry *me; + + for (me = mount_list; me; me = me->me_next) + if (STREQ (disk, me->me_devname)) + { + show_dev (me->me_devname, me->me_mountdir, me->me_type, + me->me_dummy, me->me_remote); + return; + } + /* No filesystem is mounted on DISK. */ + show_dev (disk, (char *) NULL, (char *) NULL, 0, 0); +} + /* Figure out which device file or directory POINT is mounted on and show its disk usage. STATP is the results of `stat' on POINT. */ -- cgit v1.2.3-70-g09d2