diff options
author | Marcus Brinkmann <marcus@gnu.org> | 2000-05-14 20:35:53 +0000 |
---|---|---|
committer | Marcus Brinkmann <marcus@gnu.org> | 2000-05-14 20:35:53 +0000 |
commit | d699bf4063041c0be2e874a639880b59078eefdc (patch) | |
tree | 678a556b407c8ed770d93270e5d1374fa1b17c45 /libdiskfs | |
parent | be15ddb8f111be6e9ad0049e586005366e144a04 (diff) |
2000-05-14 Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
* priv.h (DEFAULT_SYNC_INTERVAL): New macro.
(DEFAULT_SYNC_INTERVAL_STRING): Likewise.
(STRINGIFY): Likewise.
(STRINGIFY_1): Likewise.
* opts-common.h (diskfs_common_options): Use
DEFAULT_SYNC_INTERVAL_STRING instead hardcoded value.
* sync-default.h: Include "priv.h". Use DEFAULT_SYNC_INTERVAL
instead hardcoded value.
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/ChangeLog | 11 | ||||
-rw-r--r-- | libdiskfs/opts-common.c | 2 | ||||
-rw-r--r-- | libdiskfs/priv.h | 5 | ||||
-rw-r--r-- | libdiskfs/sync-default.c | 4 |
4 files changed, 20 insertions, 2 deletions
diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog index 5833e680..1fba6652 100644 --- a/libdiskfs/ChangeLog +++ b/libdiskfs/ChangeLog @@ -1,3 +1,14 @@ +2000-05-14 Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> + + * priv.h (DEFAULT_SYNC_INTERVAL): New macro. + (DEFAULT_SYNC_INTERVAL_STRING): Likewise. + (STRINGIFY): Likewise. + (STRINGIFY_1): Likewise. + * opts-common.h (diskfs_common_options): Use + DEFAULT_SYNC_INTERVAL_STRING instead hardcoded value. + * sync-default.h: Include "priv.h". Use DEFAULT_SYNC_INTERVAL + instead hardcoded value. + 2000-04-29 Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> * init-main.c (diskfs_init_main): Dereference BOOTSTRAP before diff --git a/libdiskfs/opts-common.c b/libdiskfs/opts-common.c index 05de5144..97d511e0 100644 --- a/libdiskfs/opts-common.c +++ b/libdiskfs/opts-common.c @@ -34,7 +34,7 @@ const struct argp_option diskfs_common_options[] = {"sync", 's', "INTERVAL", OPTION_ARG_OPTIONAL, "If INTERVAL is supplied, sync all data not actually written to disk" " every INTERVAL seconds, otherwise operate in synchronous mode (the" - " default is to sync every 30 seconds)"}, + " default is to sync every " DEFAULT_SYNC_INTERVAL_STRING " seconds)"}, {"no-sync", 'n', 0, 0, "Don't automatically sync data to disk"}, {"nosync", 0, 0, OPTION_ALIAS | OPTION_HIDDEN}, {"no-suid", 'S', 0, 0, "Don't permit set-uid or set-gid execution"}, diff --git a/libdiskfs/priv.h b/libdiskfs/priv.h index 57d00e66..fd69af9c 100644 --- a/libdiskfs/priv.h +++ b/libdiskfs/priv.h @@ -52,6 +52,11 @@ extern const struct argp_option diskfs_common_options[]; #define OPT_EXEC_OK 601 /* --exec-ok */ #define OPT_ATIME 602 /* --atime */ +/* Common value for diskfs_common_options and diskfs_default_sync_interval. */ +#define DEFAULT_SYNC_INTERVAL 5 +#define DEFAULT_SYNC_INTERVAL_STRING STRINGIFY(DEFAULT_SYNC_INTERVAL) +#define STRINGIFY(x) STRINGIFY_1(x) +#define STRINGIFY_1(x) #x /* Diskfs thinks the disk is dirty if this is set. */ extern int _diskfs_diskdirty; diff --git a/libdiskfs/sync-default.c b/libdiskfs/sync-default.c index 4b8bdd7c..0d1fd93b 100644 --- a/libdiskfs/sync-default.c +++ b/libdiskfs/sync-default.c @@ -18,4 +18,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -int diskfs_default_sync_interval = 5; +#include "priv.h" + +int diskfs_default_sync_interval = DEFAULT_SYNC_INTERVAL; |