diff options
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | libdiskfs/ChangeLog | 5 | ||||
-rw-r--r-- | libdiskfs/opts-append-std.c | 15 |
3 files changed, 14 insertions, 9 deletions
@@ -126,9 +126,6 @@ See `tasks', the exported task list. (syslog, but takes special care when the root file system?). !! *** Some of diskfs_readonly_changed in ufs/ext2fs should be in generic routines. ! -*** diskfs_default_sync_interval should not be changed, keeping the option - setting elsewhere, so that diskfs_append_std_options can elide the - --sync=N option when it reflects the default setting. ** libfshelp *** Put functions here to deal with directory and file change notifications !!! diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog index c4f5d0bc..bdcaf857 100644 --- a/libdiskfs/ChangeLog +++ b/libdiskfs/ChangeLog @@ -1,3 +1,8 @@ +2002-03-12 Marcus Brinkmann <marcus@gnu.org> + + * opts-append-std.c (diskfs_append_std_options): Only add --sync=N + or --no-sync option if it is not the default. + 2002-03-06 Roland McGrath <roland@frob.com> * dir-mkfile.c (diskfs_S_dir_mkfile): Clear OPENONLY_STATE_MODES bits diff --git a/libdiskfs/opts-append-std.c b/libdiskfs/opts-append-std.c index f6083365..00e858fc 100644 --- a/libdiskfs/opts-append-std.c +++ b/libdiskfs/opts-append-std.c @@ -47,13 +47,16 @@ diskfs_append_std_options (char **argz, unsigned *argz_len) { if (diskfs_synchronous) err = argz_add (argz, argz_len, "--sync"); - else if (diskfs_sync_interval == 0) - err = argz_add (argz, argz_len, "--no-sync"); - else + else if (DEFAULT_SYNC_INTERVAL != diskfs_sync_interval) { - char buf[80]; - sprintf (buf, "--sync=%d", diskfs_sync_interval); - err = argz_add (argz, argz_len, buf); + if (diskfs_sync_interval == 0) + err = argz_add (argz, argz_len, "--no-sync"); + else + { + char buf[80]; + sprintf (buf, "--sync=%d", diskfs_sync_interval); + err = argz_add (argz, argz_len, buf); + } } } |