summaryrefslogtreecommitdiff
path: root/src/df.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-02-04 10:28:23 +0000
committerJim Meyering <jim@meyering.net>2003-02-04 10:28:23 +0000
commit144418cd9db07666edb4b11f21a620a75acce625 (patch)
treec953d8e41b5fbaa5e23d43263a30cacffd5585ad /src/df.c
parentdc4a9398cbbd839bc34d588d7cf080b0a125b225 (diff)
downloadcoreutils-144418cd9db07666edb4b11f21a620a75acce625.tar.xz
(show_disk): Move function to precede find_mount_point.
Diffstat (limited to 'src/df.c')
-rw-r--r--src/df.c38
1 files changed, 19 insertions, 19 deletions
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. */