summaryrefslogtreecommitdiffstats
path: root/bin/setfacl/setfacl.c
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2012-10-19 05:43:38 +0000
committered <ed@FreeBSD.org>2012-10-19 05:43:38 +0000
commitfbb83e78c0ca90b09e1e9c0a76030f46f419dcaf (patch)
tree4ffbcf3b1f945e0ae5715cc8c2500ff622b14872 /bin/setfacl/setfacl.c
parentc6ac8508b2ea2c486313c4fbfef377e83807af8f (diff)
downloadFreeBSD-src-fbb83e78c0ca90b09e1e9c0a76030f46f419dcaf.zip
FreeBSD-src-fbb83e78c0ca90b09e1e9c0a76030f46f419dcaf.tar.gz
Fix warnings found by -Wmising-variable-declarations.
This self-written compiler warning, which is hopefully going to be committed into LLVM sources soon, warns about potentially missing `static' keywords, similar to -Wmissing-prototypes. - bin/pax: Move external declaration of chdname and s_mask into extern.h. - bin/setfacl: Move setfacl.c-specific stuff out of setfacl.h. - sbin/mount_fusefs: Remove char *progname; use getprogname(). - others: add `static' where possible.
Diffstat (limited to 'bin/setfacl/setfacl.c')
-rw-r--r--bin/setfacl/setfacl.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/bin/setfacl/setfacl.c b/bin/setfacl/setfacl.c
index e1f3023..c69f0ba 100644
--- a/bin/setfacl/setfacl.c
+++ b/bin/setfacl/setfacl.c
@@ -42,6 +42,35 @@ __FBSDID("$FreeBSD$");
#include "setfacl.h"
+/* file operations */
+#define OP_MERGE_ACL 0x00 /* merge acl's (-mM) */
+#define OP_REMOVE_DEF 0x01 /* remove default acl's (-k) */
+#define OP_REMOVE_EXT 0x02 /* remove extended acl's (-b) */
+#define OP_REMOVE_ACL 0x03 /* remove acl's (-xX) */
+#define OP_REMOVE_BY_NUMBER 0x04 /* remove acl's (-xX) by acl entry number */
+#define OP_ADD_ACL 0x05 /* add acls entries at a given position */
+
+/* TAILQ entry for acl operations */
+struct sf_entry {
+ uint op;
+ acl_t acl;
+ uint entry_number;
+ TAILQ_ENTRY(sf_entry) next;
+};
+static TAILQ_HEAD(, sf_entry) entrylist;
+
+/* TAILQ entry for files */
+struct sf_file {
+ const char *filename;
+ TAILQ_ENTRY(sf_file) next;
+};
+static TAILQ_HEAD(, sf_file) filelist;
+
+uint have_mask;
+uint need_mask;
+uint have_stdin;
+uint n_flag;
+
static void add_filename(const char *filename);
static void usage(void);
OpenPOWER on IntegriCloud