mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
drop unused name_type_can_xxx() calls
This commit is contained in:
parent
ac1135be1f
commit
be66c128c3
14
name.c
14
name.c
@ -432,10 +432,10 @@ int name_start(Name *n) {
|
||||
return NAME_VTABLE(n)->start(n);
|
||||
}
|
||||
|
||||
bool name_type_can_start(NameType t) {
|
||||
assert(t >= 0 && t < _NAME_TYPE_MAX);
|
||||
bool name_can_start(Name *n) {
|
||||
assert(n);
|
||||
|
||||
return !!name_vtable[t]->start;
|
||||
return !!NAME_VTABLE(n)->start;
|
||||
}
|
||||
|
||||
/* Errors:
|
||||
@ -484,16 +484,10 @@ int name_reload(Name *n) {
|
||||
return NAME_VTABLE(n)->reload(n);
|
||||
}
|
||||
|
||||
bool name_type_can_reload(NameType t) {
|
||||
assert(t >= 0 && t < _NAME_TYPE_MAX);
|
||||
|
||||
return !!name_vtable[t]->reload;
|
||||
}
|
||||
|
||||
bool name_can_reload(Name *n) {
|
||||
assert(n);
|
||||
|
||||
if (!name_type_can_reload(n->meta.type))
|
||||
if (!NAME_VTABLE(n)->reload)
|
||||
return false;
|
||||
|
||||
if (!NAME_VTABLE(n)->can_reload)
|
||||
|
27
name.h
27
name.h
@ -189,29 +189,32 @@ DEFINE_CAST(MOUNT, Mount);
|
||||
DEFINE_CAST(AUTOMOUNT, Automount);
|
||||
DEFINE_CAST(SNAPSHOT, Snapshot);
|
||||
|
||||
bool name_type_can_start(NameType t);
|
||||
bool name_type_can_reload(NameType t);
|
||||
bool name_can_reload(Name *n);
|
||||
#define name_can_start(n) name_type_can_start((n)->meta.type)
|
||||
|
||||
NameType name_type_from_string(const char *n);
|
||||
bool name_is_valid(const char *n);
|
||||
|
||||
Name *name_new(Manager *m);
|
||||
void name_free(Name *name);
|
||||
void name_add_to_load_queue(Name *n);
|
||||
int name_merge(Name *name, Name *other);
|
||||
int name_load_fragment_and_dropin(Name *n);
|
||||
int name_load(Name *name);
|
||||
const char* name_id(Name *n);
|
||||
const char *name_description(Name *n);
|
||||
|
||||
int name_add_name(Name *n, const char *text);
|
||||
int name_add_dependency(Name *n, NameDependency d, Name *other);
|
||||
|
||||
void name_add_to_load_queue(Name *n);
|
||||
|
||||
int name_merge(Name *name, Name *other);
|
||||
|
||||
int name_load_fragment_and_dropin(Name *n);
|
||||
int name_load(Name *name);
|
||||
|
||||
const char* name_id(Name *n);
|
||||
const char *name_description(Name *n);
|
||||
|
||||
NameActiveState name_active_state(Name *name);
|
||||
|
||||
void name_dump(Name *n, FILE *f, const char *prefix);
|
||||
|
||||
bool name_can_reload(Name *n);
|
||||
bool name_can_start(Name *n);
|
||||
|
||||
int name_start(Name *n);
|
||||
int name_stop(Name *n);
|
||||
int name_reload(Name *n);
|
||||
@ -231,6 +234,4 @@ char *name_change_suffix(const char *t, const char *suffix);
|
||||
|
||||
bool name_job_is_applicable(Name *n, JobType j);
|
||||
|
||||
int name_add_dependency(Name *n, NameDependency d, Name *other);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user