diff options
Diffstat (limited to 'libstore')
-rw-r--r-- | libstore/argp.c | 2 | ||||
-rw-r--r-- | libstore/kids.c | 4 | ||||
-rw-r--r-- | libstore/store.h | 18 | ||||
-rw-r--r-- | libstore/xinl.c | 2 |
4 files changed, 17 insertions, 9 deletions
diff --git a/libstore/argp.c b/libstore/argp.c index 9af7ae57..6ed79964 100644 --- a/libstore/argp.c +++ b/libstore/argp.c @@ -365,7 +365,7 @@ parse_opt (int opt, char *arg, struct argp_state *state) break; case ARGP_KEY_ERROR: - /* Parsing error occured, free everything. */ + /* Parsing error occurred, free everything. */ store_parsed_free (parsed); break; case ARGP_KEY_SUCCESS: diff --git a/libstore/kids.c b/libstore/kids.c index f254bcd3..901a7f85 100644 --- a/libstore/kids.c +++ b/libstore/kids.c @@ -103,7 +103,7 @@ store_decode_children (struct store_enc *enc, int num_children, return err; } -/* Set FLAGS in all children of STORE, and if successfull, add FLAGS to +/* Set FLAGS in all children of STORE, and if successful, add FLAGS to STORE's flags. */ error_t store_set_child_flags (struct store *store, int flags) @@ -127,7 +127,7 @@ store_set_child_flags (struct store *store, int flags) return err; } -/* Clear FLAGS in all children of STORE, and if successfull, remove FLAGS from +/* Clear FLAGS in all children of STORE, and if successful, remove FLAGS from STORE's flags. */ error_t store_clear_child_flags (struct store *store, int flags) diff --git a/libstore/store.h b/libstore/store.h index 5b48504c..ae334a1d 100644 --- a/libstore/store.h +++ b/libstore/store.h @@ -33,11 +33,13 @@ #include <mach.h> #include <device/device.h> #include <hurd/hurd_types.h> +#include <features.h> -#ifndef STORE_EI -#define STORE_EI extern inline +#ifdef STORE_DEFINE_EI +#define STORE_EI +#else +#define STORE_EI __extern_inline #endif - /* Type for addresses inside the store. */ typedef off64_t store_offset_t; @@ -262,14 +264,18 @@ error_t store_set_flags (struct store *store, int flags); /* Remove FLAGS from STORE's currently set flags. */ error_t store_clear_flags (struct store *store, int flags); -/* Set FLAGS in all children of STORE, and if successfull, add FLAGS to +/* Set FLAGS in all children of STORE, and if successful, add FLAGS to STORE's flags. */ error_t store_set_child_flags (struct store *store, int flags); -/* Clear FLAGS in all children of STORE, and if successfull, remove FLAGS from +/* Clear FLAGS in all children of STORE, and if successful, remove FLAGS from STORE's flags. */ error_t store_clear_child_flags (struct store *store, int flags); +extern int store_is_securely_returnable (struct store *store, int open_flags); + +#if defined(__USE_EXTERN_INLINES) || defined(STORE_DEFINE_EI) + /* Returns true if STORE can safely be returned to a user who has accessed it via a node using OPEN_FLAGS, without compromising security. */ STORE_EI int @@ -283,6 +289,8 @@ store_is_securely_returnable (struct store *store, int open_flags) || (flags & STORE_HARD_READONLY))); } +#endif /* Use extern inlines. */ + /* Fills in the values of the various fields in STORE that are derivable from the set of runs & the block size. */ void _store_derive (struct store *store); diff --git a/libstore/xinl.c b/libstore/xinl.c index a603d621..90242212 100644 --- a/libstore/xinl.c +++ b/libstore/xinl.c @@ -1,2 +1,2 @@ -#define STORE_EI +#define STORE_DEFINE_EI #include "store.h" |