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