aboutsummaryrefslogtreecommitdiff
path: root/libdiskfs/priv.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1999-09-19 21:13:30 +0000
committerRoland McGrath <roland@gnu.org>1999-09-19 21:13:30 +0000
commit9a51ee3f9fbd12e2ded858c8b9c72b2d5e56b83d (patch)
treeb12e1daa527863b7a75e1bb20c95f2e4dc7571b6 /libdiskfs/priv.h
parent8f79eed4594225520bc8877e0f36a5ff015fc796 (diff)
downloadhurd-9a51ee3f9fbd12e2ded858c8b9c72b2d5e56b83d.tar.gz
hurd-9a51ee3f9fbd12e2ded858c8b9c72b2d5e56b83d.tar.bz2
hurd-9a51ee3f9fbd12e2ded858c8b9c72b2d5e56b83d.zip
1999-09-19 Roland McGrath <roland@baalperazim.frob.com>
* node-times.c (diskfs_set_node_times): If _diskfs_noatime is set and neither NP->dn_set_mtime nor NP->dn_set_ctime is set, clear NP->dn_set_atime. Short-circuit return if none of dn_set_?time set. * opts-common.c (diskfs_common_options): Include "priv.h". Add aliases --ro/--rw for -r/-w. Add alias --nosuid for --no-suid, --noexec for --no-exec. Move --suid-ok, --exec-ok here from ... * opts-std-runtime.c (std_runtime_options): ... here. (struct parse_hook): New member `noatime'. (set_opts): Use H->noatime to set _diskfs_noatime. (parse_opt): Grok -A and OPT_ATIME to set/clear H->noatime. (OPT_ATIME): New macro. (OPT_SUID_OK, OPT_EXEC_OK): Moved to ... * priv.h: ... here. (diskfs_common_options): Add const to decl. * opts-std-startup.c (parse_startup_opt): Grok OPT_SUID_OK, OPT_EXEC_OK, -A, and OPT_ATIME. * init-init.c (_diskfs_noatime): New variable. (_diskfs_nosuid, _diskfs_noexec): Use uninitialized defns. * opts-append-std.c (diskfs_append_std_options): Add --no-atime if _diskfs_noatime is set.
Diffstat (limited to 'libdiskfs/priv.h')
-rw-r--r--libdiskfs/priv.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/libdiskfs/priv.h b/libdiskfs/priv.h
index 7bd7e43c..fca32d16 100644
--- a/libdiskfs/priv.h
+++ b/libdiskfs/priv.h
@@ -32,6 +32,9 @@
/* These inhibit setuid or exec. */
extern int _diskfs_nosuid, _diskfs_noexec;
+/* This relaxes the requirement to set `st_atime'. */
+extern int _diskfs_noatime;
+
/* This is the -C argument value. */
extern const char *_diskfs_chroot_directory;
@@ -43,7 +46,12 @@ extern struct hurd_port _diskfs_exec_portcell;
volatile struct mapped_time_value *_diskfs_mtime;
-extern struct argp_option diskfs_common_options[];
+extern const struct argp_option diskfs_common_options[];
+/* Option keys for long-only options in diskfs_common_options. */
+#define OPT_SUID_OK 600 /* --suid-ok */
+#define OPT_EXEC_OK 601 /* --exec-ok */
+#define OPT_ATIME 602 /* --atime */
+
/* Diskfs thinks the disk is dirty if this is set. */
extern int _diskfs_diskdirty;