diff options
author | Dave Reisner <dreisner@archlinux.org> | 2014-01-09 14:02:56 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2014-01-09 14:02:56 -0500 |
commit | 855ce449eba82c417c005d17aa680aba2048ed8d (patch) | |
tree | 9c9c5c9cdd30ed2dfbbdef820118124e891b6662 /src/libudev/device-nodes.h | |
parent | 7ed87c74dfb81761cbcefc10cd4f79394a1d36a3 (diff) |
device-nodes: move device node specific code to own file
In the process, rename udev_encode_string which is poorly named
for what it does. It deals specifically with encoding names that
udev creates and has its own rules: utf8 is valid but some ascii
is not (e.g. path separators), and everything else is simply escaped.
Rename it to encode_devnode_name.
Adopted for eudev: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'src/libudev/device-nodes.h')
-rw-r--r-- | src/libudev/device-nodes.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/libudev/device-nodes.h b/src/libudev/device-nodes.h new file mode 100644 index 0000000000..57ed97d326 --- /dev/null +++ b/src/libudev/device-nodes.h @@ -0,0 +1,23 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +/*** + This file is part of eudev, forked from systemd. + + Copyright 2012 Lennart Poettering + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with systemd; If not, see <http://www.gnu.org/licenses/>. +***/ + +int encode_devnode_name(const char *str, char *str_enc, size_t len); +int whitelisted_char_for_devnode(char c, const char *additional); |