mirror of
https://github.com/systemd/systemd.git
synced 2024-10-30 14:55:37 +03:00
shared/verbs: drop now-unused VERB_MUST_BE_ROOT
This commit is contained in:
parent
a004cb75c0
commit
62bf89d7d2
@ -50,7 +50,7 @@ int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata) {
|
|||||||
const Verb *verb;
|
const Verb *verb;
|
||||||
const char *name;
|
const char *name;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
int left, r;
|
int left;
|
||||||
|
|
||||||
assert(verbs);
|
assert(verbs);
|
||||||
assert(verbs[0].dispatch);
|
assert(verbs[0].dispatch);
|
||||||
@ -109,12 +109,6 @@ int dispatch_verb(int argc, char *argv[], const Verb verbs[], void *userdata) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (verb->flags & VERB_MUST_BE_ROOT) {
|
|
||||||
r = must_be_root();
|
|
||||||
if (r < 0)
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (name)
|
if (name)
|
||||||
return verb->dispatch(left, argv, userdata);
|
return verb->dispatch(left, argv, userdata);
|
||||||
else {
|
else {
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
typedef enum VerbFlags {
|
typedef enum VerbFlags {
|
||||||
VERB_DEFAULT = 1 << 0,
|
VERB_DEFAULT = 1 << 0,
|
||||||
VERB_ONLINE_ONLY = 1 << 1,
|
VERB_ONLINE_ONLY = 1 << 1,
|
||||||
VERB_MUST_BE_ROOT = 1 << 2,
|
|
||||||
} VerbFlags;
|
} VerbFlags;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user