1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

label: move label_ops_reset() up a bit

Let#s move it close to label_ops_set(), since it is somewhat symmetric
to it.
This commit is contained in:
Lennart Poettering 2024-10-22 17:47:22 +02:00
parent 4e4ed4b64d
commit 4ffecbbbee
2 changed files with 5 additions and 6 deletions

View File

@ -18,6 +18,10 @@ int label_ops_set(const LabelOps *ops) {
return 0;
}
void label_ops_reset(void) {
label_ops = NULL;
}
int label_ops_pre(int dir_fd, const char *path, mode_t mode) {
if (!label_ops || !label_ops->pre)
return 0;
@ -31,7 +35,3 @@ int label_ops_post(int dir_fd, const char *path, bool created) {
return label_ops->post(dir_fd, path, created);
}
void label_ops_reset(void) {
label_ops = NULL;
}

View File

@ -10,8 +10,7 @@ typedef struct LabelOps {
} LabelOps;
int label_ops_set(const LabelOps *label_ops);
void label_ops_reset(void);
int label_ops_pre(int dir_fd, const char *path, mode_t mode);
int label_ops_post(int dir_fd, const char *path, bool created);
void label_ops_reset(void);