summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1993-04-15 01:58:23 +0000
committerJim Meyering <jim@meyering.net>1993-04-15 01:58:23 +0000
commit29c0442cadced638d3f26b50db5a6328ad7b82d9 (patch)
tree2a8e508d291fa2d0705b3d3f1cc7cc2efcf02c61
parent0c6e5c710bac25a3676d0c04b185b70a7bfcf8b7 (diff)
downloadcoreutils-29c0442cadced638d3f26b50db5a6328ad7b82d9.tar.xz
merge with 3.4.7
-rw-r--r--lib/Makefile.in5
-rw-r--r--lib/fsusage.c12
-rw-r--r--old/fileutils/ChangeLog41
-rw-r--r--old/fileutils/NEWS1
-rw-r--r--src/df.c26
5 files changed, 74 insertions, 11 deletions
diff --git a/lib/Makefile.in b/lib/Makefile.in
index fb21e13dc..affeea23d 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -78,12 +78,13 @@ libfu.a: $(OBJECTS)
# is the only way to reliably do a parallel make.
getdate.c: getdate.y
@echo expect 9 shift/reduce conflicts
- -bison -o getdate.c $(srcdir)/getdate.y || yacc $(srcdir)/getdate.y
+ -bison -o getdate.c $(srcdir)/getdate.y || $(YACC) $(srcdir)/getdate.y
test ! -f y.tab.c || mv y.tab.c getdate.c
# Make the rename atomic, in case sed is interrupted and later rerun.
posixtm.c: posixtm.y
- -bison -o posixtm.tab.c $(srcdir)/posixtm.y || yacc $(srcdir)/posixtm.y
+ -bison -o posixtm.tab.c $(srcdir)/posixtm.y \
+ || $(YACC) $(srcdir)/posixtm.y
test ! -f y.tab.c || mv y.tab.c posixtm.tab.c
sed -e 's/yy/zz/g' posixtm.tab.c > tposixtm.c
mv tposixtm.c posixtm.c
diff --git a/lib/fsusage.c b/lib/fsusage.c
index b43491343..2a1fe86c7 100644
--- a/lib/fsusage.c
+++ b/lib/fsusage.c
@@ -20,6 +20,10 @@
int statfs ();
+#if defined (STATFS_OSF1) /* DEC Alpha running OSF/1 */
+# include <sys/mount.h>
+#endif
+
#if defined(STAT_STATFS2_BSIZE) && !defined(_IBMR2) /* 4.3BSD, SunOS 4, HP-UX, AIX PS/2. */
#include <sys/vfs.h>
#endif
@@ -80,6 +84,14 @@ get_fs_usage (path, disk, fsp)
char *path, *disk;
struct fs_usage *fsp;
{
+#if defined (STATFS_OSF1)
+ struct statfs fsd;
+
+ if (statfs (path, &fsd, sizeof (struct statfs)) != 0)
+ return (-1);
+#define convert_blocks(b) adjust_blocks ((b),fsd.f_fsize, 512)
+#endif /* STATFS_OSF1 */
+
#ifdef STAT_STATFS2_FS_DATA /* Ultrix. */
struct fs_data fsd;
diff --git a/old/fileutils/ChangeLog b/old/fileutils/ChangeLog
index 113659999..504ddf8c9 100644
--- a/old/fileutils/ChangeLog
+++ b/old/fileutils/ChangeLog
@@ -1,3 +1,44 @@
+Tue Apr 13 09:18:18 1993 Jim Meyering (meyering@comco.com)
+
+ * configure.in: Find a parser generator.
+ * Makefile.in [MDEFINES]: Add YACC to the list of variables passed to
+ sub-makes.
+ * lib/Makefile.in (posixtm.c, getdate.c): Try first to build with
+ `bison -o' -- for parallel makes. If that fails, use $(YACC).
+
+ * posixtm.y [HAVE_MEMCPY && !HAVE_BCOPY]: Define bcopy in terms
+ of memcpy for old versions of bison that generate parsers that
+ use bcopy.
+
+ * configure.in: Add tests for memcpy and bcopy.
+
+Mon Apr 12 23:02:14 1993 Jim Meyering (meyering@comco.com)
+
+ * configure.in (mounted, space): Add filesystem checks for DEC Alpha
+ running OSF/1 to complement new code in mountlist.c and fsusage.c.
+
+ * lib/mountlist.c (read_filesystem_list) [MOUNTED_GETFSSTAT]: Add code
+ to do it the OSF/1 way on a DEC alpha.
+ From Brian Fox (bfox@tinker.crseo.ucsb.edu).
+
+ * lib/fsusage.c (get_fs_usage) [STATFS_OSF1]: Add code to call OSF/1's
+ variant of statfs. From Brian Fox (bfox@tinker.crseo.ucsb.edu).
+
+Sun Apr 11 20:29:31 1993 Jim Meyering (meyering@comco.com)
+
+ * df.c (main, show_dev): Don't list dummy (automounter) filesystems
+ unless they're explicitly listed on the command line or if the -a
+ option is given.
+
+Fri Apr 9 11:40:48 1993 Jim Meyering (meyering@comco.com)
+
+ * src/Makefile.in [.c.o]: Put CFLAGS after include directives.
+
+Wed Apr 7 23:54:48 1993 Jim Meyering (meyering@comco.com)
+
+ * eaccess.c: Undefine NGROUPS_MAX before redefining it.
+ From ghazi@caip.rutgers.edu (Kaveh R. Ghazi).
+
Mon Apr 5 20:14:17 1993 Jim Meyering (meyering@comco.com)
* Version 3.4.5.
diff --git a/old/fileutils/NEWS b/old/fileutils/NEWS
index 2e357df3f..d518d195e 100644
--- a/old/fileutils/NEWS
+++ b/old/fileutils/NEWS
@@ -1,4 +1,5 @@
Major changes in release 3.5:
+* adds support for DEC Alpha under OSF/1
* configuring with gcc uses CFLAGS='-g -O' by default
* all programs accept --help and --version options
* long-named options must be introduced with `--'; `+' is no longer
diff --git a/src/df.c b/src/df.c
index af74503eb..3328bd6a3 100644
--- a/src/df.c
+++ b/src/df.c
@@ -16,7 +16,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Usage: df [-aikP] [-t fstype] [-x fstype] [--all] [--inodes]
- [--type fstype] [--exclude-type fstype] [--kilobytes] [--portability] [path...]
+ [--type fstype] [--exclude-type fstype] [--kilobytes] [--portability]
+ [path...]
Options:
-a, --all List all filesystems, even zero-size ones.
@@ -24,7 +25,7 @@
-k, --kilobytes Print sizes in 1K blocks instead of 512-byte blocks.
-P, --portability Use the POSIX output format (one line per filesystem).
-t, --type fstype Limit the listing to filesystems of type `fstype'.
- -x, --exclude-type fstype
+ -x, --exclude-type=fstype
Limit the listing to filesystems not of type `fstype'.
Multiple -t and/or -x options can be given.
By default, all filesystem types are listed.
@@ -66,6 +67,10 @@ static int inode_format;
uninteresting types. */
static int show_all_fs;
+/* If nonzero, output data for each filesystem corresponding to a
+ command line argument -- even if it's a dummy (automounter) entry. */
+static int show_listed_fs;
+
/* If nonzero, use 1K blocks instead of 512-byte blocks. */
static int kilobyte_blocks;
@@ -136,6 +141,7 @@ main (argc, argv)
fs_exclude_list = NULL;
inode_format = 0;
show_all_fs = 0;
+ show_listed_fs = 0;
kilobyte_blocks = getenv ("POSIXLY_CORRECT") == 0;
posix_format = 0;
exit_status = 0;
@@ -180,9 +186,6 @@ main (argc, argv)
if (optind != argc)
{
- /* Display explicitly requested empty filesystems. */
- show_all_fs = 1;
-
/* stat all the given entries to make sure they get automounted,
if necessary, before reading the filesystem table. */
stats = (struct stat *)
@@ -209,9 +212,14 @@ main (argc, argv)
if (optind == argc)
show_all_entries ();
else
- for (i = optind; i < argc; ++i)
- if (argv[i])
- show_entry (argv[i], &stats[i - optind]);
+ {
+ /* Display explicitly requested empty filesystems. */
+ show_listed_fs = 1;
+
+ for (i = optind; i < argc; ++i)
+ if (argv[i])
+ show_entry (argv[i], &stats[i - optind]);
+ }
exit (exit_status);
}
@@ -351,7 +359,7 @@ show_dev (disk, mount_point, fstype)
if (fsu.fsu_blocks == 0)
{
- if (show_all_fs == 0)
+ if (!show_all_fs && !show_listed_fs)
return;
blocks_used = fsu.fsu_bavail = blocks_percent_used = 0;
}