summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>1997-04-29 15:29:49 +0000
committerTheodore Ts'o <tytso@mit.edu>1997-04-29 15:29:49 +0000
commit5c576477ccb2f0ca8c5d5af2e2354fd8eeff1589 (patch)
tree23bf89a13feb18647bdd81622c9f900634093eac /misc
parentef423288716bf9662b952eb5e694a54a5b077240 (diff)
downloade2fsprogs-5c576477ccb2f0ca8c5d5af2e2354fd8eeff1589.tar.gz
Many files:
Checked in e2fsprogs 1.06
Diffstat (limited to 'misc')
-rw-r--r--misc/ChangeLog15
-rw-r--r--misc/chattr.1.in7
-rw-r--r--misc/chattr.c16
-rw-r--r--misc/dumpe2fs.8.in13
-rw-r--r--misc/dumpe2fs.c13
5 files changed, 59 insertions, 5 deletions
diff --git a/misc/ChangeLog b/misc/ChangeLog
index d5217737..11f7c04d 100644
--- a/misc/ChangeLog
+++ b/misc/ChangeLog
@@ -1,3 +1,18 @@
+Mon Oct 7 00:56:24 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * chattr.1.in: Documented the 'A' (noatime) attribute.
+
+ * dumpe2fs.c (main): Change EXT2_SWAP to EXT2_FLAG_SWAP for
+ consistency's sake.
+
+Sun Sep 22 16:18:47 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * chattr.c (decode_arg): Add support for the 'A' (noatime) flag.
+
+Thu Sep 12 15:23:07 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
+
+ * Release of E2fsprogs version 1.05
+
Sat Sep 7 07:34:11 1996 Theodore Ts'o <tytso@rsts-11.mit.edu>
* tune2fs.c (main): Add support for new option -C, which sets the
diff --git a/misc/chattr.1.in b/misc/chattr.1.in
index cfd4ff7d..ad38443a 100644
--- a/misc/chattr.1.in
+++ b/misc/chattr.1.in
@@ -62,13 +62,18 @@ the `sync' mount option applied to a subset of the files.
When a file with the `u' attribute set is deleted, its contents is saved.
This allows the user to ask for its undeletion.
+
+When a file with the 'A' attribute set is modified, its atime record is
+not modified. This avoid a certain amount of disk I/O for laptop
+systems.
.SH AUTHOR
.B chattr
has been written by Remy Card <card@masi.ibp.fr>, the developer and maintainer
of the ext2 fs.
.SH BUGS AND LIMITATIONS
As of ext2 fs 0.5a, the `c' and `u' attribute are not honoured by the kernel
-code.
+code. As of the Linux 2.0 kernel, the 'A' attribute is not yet supported by
+the kernel code. (The noatime code is still in testing.)
.PP
These attributes will be implemented in a future ext2 fs version.
.SH AVAILABILITY
diff --git a/misc/chattr.c b/misc/chattr.c
index b359248a..45e2c8fe 100644
--- a/misc/chattr.c
+++ b/misc/chattr.c
@@ -89,6 +89,12 @@ static int decode_arg (int * i, int argc, char ** argv)
rem = 1;
break;
#endif
+#ifdef EXT2_NOATIME_FL
+ case 'A':
+ rf |= EXT2_NOATIME_FL;
+ rem = 1;
+ break;
+#endif
case 'c':
rf |= EXT2_COMPR_FL;
rem = 1;
@@ -145,6 +151,11 @@ static int decode_arg (int * i, int argc, char ** argv)
af |= EXT2_APPEND_FL;
break;
#endif
+#ifdef EXT2_NOATIME_FL
+ case 'A':
+ af |= EXT2_NOATIME_FL;
+ break;
+#endif
case 'c':
af |= EXT2_COMPR_FL;
break;
@@ -181,6 +192,11 @@ static int decode_arg (int * i, int argc, char ** argv)
sf |= EXT2_APPEND_FL;
break;
#endif
+#ifdef EXT2_NOATIME_FL
+ case 'A':
+ sf |= EXT2_NOATIME_FL;
+ break;
+#endif
case 'c':
sf |= EXT2_COMPR_FL;
break;
diff --git a/misc/dumpe2fs.8.in b/misc/dumpe2fs.8.in
index 0dc1922a..28fa320d 100644
--- a/misc/dumpe2fs.8.in
+++ b/misc/dumpe2fs.8.in
@@ -7,6 +7,12 @@
dumpe2fs \- dump filesystem information
.SH SYNOPSIS
.B dumpe2fs
+[
+.B -b
+]
+[
+.B -V
+]
device
.SH DESCRIPTION
.BI dumpe2fs
@@ -18,6 +24,13 @@ present on
is similar to Berkeley's
.BI dumpfs
program for the BSD Fast File System.
+.SH OPTIONS
+.TP
+.I -b
+print the blocks which are reserved as bad in the filesystem.
+.TP
+.I -V
+print the version number of dumpe2fs and exit.
.SH BUGS
You need to know the physical filesystem structure to understand the
output.
diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
index 740f01bc..069ad644 100644
--- a/misc/dumpe2fs.c
+++ b/misc/dumpe2fs.c
@@ -39,7 +39,7 @@ char * device_name = NULL;
static volatile void usage (void)
{
- fprintf (stderr, "usage: %s device\n", program_name);
+ fprintf (stderr, "usage: %s [-bV] device\n", program_name);
exit (1);
}
@@ -166,17 +166,23 @@ void main (int argc, char ** argv)
int big_endian;
char c;
+ initialize_ext2_error_table();
fprintf (stderr, "dumpe2fs %s, %s for EXT2 FS %s, %s\n",
E2FSPROGS_VERSION, E2FSPROGS_DATE,
EXT2FS_VERSION, EXT2FS_DATE);
if (argc && *argv)
program_name = *argv;
- while ((c = getopt (argc, argv, "b")) != EOF) {
+ while ((c = getopt (argc, argv, "bV")) != EOF) {
switch (c) {
case 'b':
print_badblocks++;
break;
+ case 'V':
+ /* Print version number and exit */
+ fprintf(stderr, "\tUsing %s\n",
+ error_message(EXT2_ET_BASE));
+ exit(0);
default:
usage ();
}
@@ -184,7 +190,6 @@ void main (int argc, char ** argv)
if (optind > argc - 1)
usage ();
device_name = argv[optind++];
- initialize_ext2_error_table();
retval = ext2fs_open (device_name, 0, 0, 0, unix_io_manager, &fs);
if (retval) {
com_err (program_name, retval, "while trying to open %s",
@@ -203,7 +208,7 @@ void main (int argc, char ** argv)
ext2fs_close (fs);
exit (1);
}
- big_endian = ((fs->flags & EXT2_SWAP_BYTES) != 0);
+ big_endian = ((fs->flags & EXT2_FLAG_SWAP_BYTES) != 0);
if (!i386_byteorder())
big_endian = !big_endian;
if (big_endian)