chiark
/
gitweb
/
~ian
/
chiark-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a6dcfab
)
really: Support REALLY_CHECK_FILE_2 for checking multiple files
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 12 Aug 2019 09:52:28 +0000
(10:52 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 12 Aug 2019 09:55:40 +0000
(10:55 +0100)
Only works if REALLY_CHECK_FILE is defined too.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
cprogs/really.c
patch
|
blob
|
history
diff --git
a/cprogs/really.c
b/cprogs/really.c
index b79da8f9c02b8be1f95ca32178f9cbab36c12de7..3183e500746d9196c428f639e56a6a823df62d9e 100644
(file)
--- a/
cprogs/really.c
+++ b/
cprogs/really.c
@@
-103,6
+103,11
@@
static int checkroot(void) {
int r;
r= access(REALLY_CHECK_FILE, W_OK);
if (!r) return 0;
+#ifdef REALLY_CHECK_FILE_2
+ r= access(REALLY_CHECK_FILE_2, W_OK);
+ if (!r) return 0;
+ /* If all fails we return the errno from file _2 */
+#endif REALLY_CHECK_FILE_2
return -1;
}
#endif