]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/label.c
hexdecoct: make unbase64mem and unhexmem always use SIZE_MAX
[thirdparty/systemd.git] / src / basic / label.c
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2
3 #include <errno.h>
4 #include <stddef.h>
5
6 #include "label.h"
7
8 static const LabelOps *label_ops = NULL;
9
10 int label_ops_set(const LabelOps *ops) {
11 if (label_ops)
12 return -EBUSY;
13
14 label_ops = ops;
15 return 0;
16 }
17
18 int label_ops_pre(int dir_fd, const char *path, mode_t mode) {
19 if (!label_ops || !label_ops->pre)
20 return 0;
21
22 return label_ops->pre(dir_fd, path, mode);
23 }
24
25 int label_ops_post(int dir_fd, const char *path) {
26 if (!label_ops || !label_ops->post)
27 return 0;
28
29 return label_ops->post(dir_fd, path);
30 }