summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rw-r--r--bin/df/Makefile2
-rw-r--r--bin/df/df.c36
2 files changed, 1 insertions, 37 deletions
diff --git a/bin/df/Makefile b/bin/df/Makefile
index d9a27cf..77a05e84 100644
--- a/bin/df/Makefile
+++ b/bin/df/Makefile
@@ -3,8 +3,6 @@
PROG= df
SRCS= df.c vfslist.c
-BINGRP= operator
-BINMODE=2555
MOUNT= ${.CURDIR}/../../sbin/mount
CFLAGS+= -I${MOUNT}
diff --git a/bin/df/df.c b/bin/df/df.c
index fc8cb34..e7ab41f 100644
--- a/bin/df/df.c
+++ b/bin/df/df.c
@@ -119,7 +119,7 @@ main(argc, argv)
struct statfs statfsbuf, *mntbuf;
long mntsize;
int ch, err, i, maxwidth, rv, width;
- char *mntpt, *mntpath, **vfslist;
+ char *mntpt, **vfslist;
vfslist = NULL;
while ((ch = getopt(argc, argv, "abgHhikmnPt:")) != -1)
@@ -208,40 +208,6 @@ main(argc, argv)
} else if ((stbuf.st_mode & S_IFMT) == S_IFCHR) {
rv = ufs_df(*argv, maxwidth) || rv;
continue;
- } else if ((stbuf.st_mode & S_IFMT) == S_IFBLK) {
- if ((mntpt = getmntpt(*argv)) == 0) {
- mdev.fspec = *argv;
- mntpath = strdup("/tmp/df.XXXXXX");
- if (mntpath == NULL) {
- warn("strdup failed");
- rv = 1;
- continue;
- }
- mntpt = mkdtemp(mntpath);
- if (mntpt == NULL) {
- warn("mkdtemp(\"%s\") failed", mntpath);
- rv = 1;
- free(mntpath);
- continue;
- }
- if (mount("ufs", mntpt, MNT_RDONLY,
- &mdev) != 0) {
- rv = ufs_df(*argv, maxwidth) || rv;
- (void)rmdir(mntpt);
- free(mntpath);
- continue;
- } else if (statfs(mntpt, &statfsbuf) == 0) {
- statfsbuf.f_mntonname[0] = '\0';
- prtstat(&statfsbuf, maxwidth);
- } else {
- warn("%s", *argv);
- rv = 1;
- }
- (void)unmount(mntpt, 0);
- (void)rmdir(mntpt);
- free(mntpath);
- continue;
- }
} else
mntpt = *argv;
/*
OpenPOWER on IntegriCloud