]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
036ae95a KS |
2 | #pragma once |
3 | ||
8f6ce71f DR |
4 | /*** |
5 | This file is part of systemd. | |
6 | ||
7 | Copyright 2012 Lennart Poettering | |
8f6ce71f DR |
8 | ***/ |
9 | ||
11c3a366 | 10 | #include <stddef.h> |
6550203e LP |
11 | #include <sys/types.h> |
12 | ||
553e15f2 ZJS |
13 | #include "macro.h" |
14 | #include "stdio-util.h" | |
15 | ||
8f6ce71f DR |
16 | int encode_devnode_name(const char *str, char *str_enc, size_t len); |
17 | int whitelisted_char_for_devnode(char c, const char *additional); | |
553e15f2 | 18 | |
c67f84b0 | 19 | #define DEV_NUM_PATH_MAX \ |
fbd0b64f | 20 | (STRLEN("/dev/block/") + DECIMAL_STR_MAX(dev_t) + 1 + DECIMAL_STR_MAX(dev_t)) |
c67f84b0 ZJS |
21 | #define xsprintf_dev_num_path(buf, type, devno) \ |
22 | xsprintf(buf, "/dev/%s/%u:%u", type, major(devno), minor(devno)) |