]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/basic/device-nodes.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
8 #include "stdio-util.h"
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
);
13 #define DEV_NUM_PATH_MAX \
14 (STRLEN("/dev/block/") + DECIMAL_STR_MAX(dev_t) + 1 + DECIMAL_STR_MAX(dev_t))
15 #define xsprintf_dev_num_path(buf, type, devno) \
16 xsprintf(buf, "/dev/%s/%u:%u", type, major(devno), minor(devno))