summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2017-12-14 15:23:02 -0500
committerSven Eden <yamakuzure@gmx.net>2018-05-30 07:49:37 +0200
commitbcea5aca80838b704c37fd500896b03c42d1a9b1 (patch)
treefc68c9d9794b05929c7ce7ccac6f8b50d9bfcd92 /src
parentdb80da22478c43afb2541427cf9f8052af4c3312 (diff)
verbs: Rename VERB_OFFLINE to VERB_ONLINE_ONLY, expand MUSTBEROOT
Followup to previous commit. Suggested by @poettering. Reindented the `verbs[]` tables to match the apparent previous whitespace rules (indent to one flag, allow multiple flags to overflow?).
Diffstat (limited to 'src')
-rw-r--r--src/basic/verbs.c4
-rw-r--r--src/basic/verbs.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/basic/verbs.c b/src/basic/verbs.c
index 97bb59f5e..ce1d304d9 100644
--- a/src/basic/verbs.c
+++ b/src/basic/verbs.c
@@ -126,7 +126,7 @@ int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata) {
return -EINVAL;
}
- if ((verb->flags & VERB_NOCHROOT) && running_in_chroot_or_offline()) {
+ if ((verb->flags & VERB_ONLINE_ONLY) && running_in_chroot_or_offline()) {
if (name)
log_info("Running in chroot, ignoring request: %s", name);
else
@@ -134,7 +134,7 @@ int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata) {
return 0;
}
- if (verb->flags & VERB_MUSTBEROOT) {
+ if (verb->flags & VERB_MUST_BE_ROOT) {
r = must_be_root();
if (r < 0)
return r;
diff --git a/src/basic/verbs.h b/src/basic/verbs.h
index a35a3a9fc..d9259fc45 100644
--- a/src/basic/verbs.h
+++ b/src/basic/verbs.h
@@ -23,9 +23,9 @@
#define VERB_ANY ((unsigned) -1)
typedef enum VerbFlags {
- VERB_DEFAULT = 1 << 0,
- VERB_NOCHROOT = 1 << 1,
- VERB_MUSTBEROOT = 1 << 2,
+ VERB_DEFAULT = 1 << 0,
+ VERB_ONLINE_ONLY = 1 << 1,
+ VERB_MUST_BE_ROOT = 1 << 2,
} VerbFlags;
typedef struct {