summaryrefslogtreecommitdiff
path: root/src/system.h
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2012-06-22 11:17:38 +0100
committerPádraig Brady <P@draigBrady.com>2012-06-22 11:17:38 +0100
commit30a604e631291b80b9812e03e0f325489ae0d77e (patch)
treedd6c760b0e161c416e1f95ab9c78c76a11981dc9 /src/system.h
parent4cfca3916d878afdd0d0b111354f30decc41e8f5 (diff)
downloadcoreutils-30a604e631291b80b9812e03e0f325489ae0d77e.tar.xz
maint: refactor common mode bits used to create files
* src/system.h (MODE_RW_UGO): The new refactored define (666). * src/mkfifo.c: Use the new define. * src/mknod.c: Likewise. * src/split.c: Likewise. * src/system.h: Likewise. * src/touch.c: Likewise. * src/truncate.c: Likewise. Suggested-by: Jim Meyering
Diffstat (limited to 'src/system.h')
-rw-r--r--src/system.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/system.h b/src/system.h
index 06f09cba6..5e3b3cbde 100644
--- a/src/system.h
+++ b/src/system.h
@@ -30,6 +30,9 @@ you must include <sys/types.h> before including this file
#include <sys/stat.h>
+/* Commonly used file permission combination. */
+#define MODE_RW_UGO (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
+
#if !defined HAVE_MKFIFO
# define mkfifo(name, mode) mknod (name, (mode) | S_IFIFO, 0)
#endif