Subject: changes for df for -l (local filesystem only) flag
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Michael Graff <explorer@vorpal.com>
List: current-users
Date: 12/29/1993 05:16:02
Here's a quick addition to df which will allow the -l flag to display
information on local filesystems only.
*** df.c.orig Wed Dec 29 04:52:54 1993
--- df.c Wed Dec 29 05:11:06 1993
***************
*** 59,65 ****
void ufs_df __P((char *, long));
void usage __P((void));
! int iflag, kflag = 0, nflag;
long blocksize;
struct ufs_args mdev;
--- 59,65 ----
void ufs_df __P((char *, long));
void usage __P((void));
! int iflag, kflag, lflag = 0, nflag;
long blocksize;
struct ufs_args mdev;
***************
*** 74,80 ****
int err, ch, i;
char *mntpt;
! while ((ch = getopt(argc, argv, "ikn")) != EOF)
switch(ch) {
case 'i':
iflag = 1;
--- 74,80 ----
int err, ch, i;
char *mntpt;
! while ((ch = getopt(argc, argv, "ikln")) != EOF)
switch(ch) {
case 'i':
iflag = 1;
***************
*** 83,88 ****
--- 83,91 ----
blocksize = 1024;
kflag = 1;
break;
+ case 'l':
+ lflag = 1;
+ break;
case 'n':
nflag = 1;
break;
***************
*** 185,190 ****
--- 188,196 ----
static int headerlen, timesthrough;
static char *header;
long used, availblks, inodes;
+
+ if (lflag && !(sfsp->f_flags & MNT_LOCAL))
+ return;
if (maxwidth < 11)
maxwidth = 11;
*** df.1.orig Wed Dec 29 05:06:29 1993
--- df.1 Wed Dec 29 05:09:54 1993
***************
*** 40,46 ****
.Nd display free disk space
.Sh SYNOPSIS
.Nm df
! .Op Fl ikn
.Op Ar file | Ar filesystem ...
.Sh DESCRIPTION
.Nm Df
--- 40,46 ----
.Nd display free disk space
.Sh SYNOPSIS
.Nm df
! .Op Fl ikln
.Op Ar file | Ar filesystem ...
.Sh DESCRIPTION
.Nm Df
***************
*** 61,66 ****
--- 61,68 ----
The
.Fl k
option causes the numbers to be reported in kilobyte counts.
+ .It Fl l
+ Display information on local filesystems only.
.It Fl n
Print out the previously obtained statistics from the filesystems.
This option should be used if it is possible that one or more
--Michael
--
Michael Graff <explorer@vorpal.com>
1304 Florida #3 (515) 296-2735
Ames, IA 50014 PGP key on a key-server near you!
------------------------------------------------------------------------------