summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-05-19 16:54:17 +0000
committerMiles Bader <miles@gnu.org>1995-05-19 16:54:17 +0000
commit3073b82395df44e31ee9c1f55b72a6e7b1b2c812 (patch)
treea9eb6b1a593420fef63789ae1707ef8eccde6e9e
parent3ff4af88742bd6eb9dbcf108f27d57729941feae (diff)
Add the --writable & --nosync options.
-rw-r--r--ext2fs/ext2fs.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/ext2fs/ext2fs.c b/ext2fs/ext2fs.c
index 16e7ee5e..40ed1580 100644
--- a/ext2fs/ext2fs.c
+++ b/ext2fs/ext2fs.c
@@ -143,8 +143,10 @@ usage(int status)
printf("\
\n\
-r, --readonly disable writing to DEVICE\n\
- -s, --sync[=INTERVAL] write data out immediately or at least ever\n\
- INTERVAL seconds\n\
+ -w, --writable enable writing to DEVICE\n\
+ -s, --sync[=INTERVAL] with an argument, sync every INTERVAL seconds,\n\
+ otherwise operate in synchronous mode\n\
+ -n, --nosync never sync the filesystem\n\
--help display this help and exit\n\
--version output version information and exit\n\
");
@@ -152,12 +154,14 @@ usage(int status)
exit (status);
}
-#define SHORT_OPTIONS "rs?"
+#define SHORT_OPTIONS "rwsn?V"
static struct option options[] =
{
{"readonly", no_argument, 0, 'r'},
+ {"writable", no_argument, 0, 'w'},
{"sync", optional_argument, 0, 's'},
+ {"nosync", no_argument, 0, 'n'},
{"help", no_argument, 0, '?'},
{"version", no_argument, 0, 'V'},
{0, 0, 0, 0}
@@ -194,12 +198,18 @@ main (int argc, char **argv)
{
case 'r':
diskfs_readonly = 1; break;
+ case 'w':
+ diskfs_readonly = 0; break;
case 's':
if (optarg == NULL)
diskfs_synchronous = 1;
else
diskfs_default_sync_interval = atoi (optarg);
break;
+ case 'n':
+ diskfs_synchronous = 0;
+ diskfs_default_sync_interval = 0;
+ break;
case 'V':
printf("%s %d.%d.%d\n", diskfs_server_name, diskfs_major_version,
diskfs_minor_version, diskfs_edit_version);