diff options
author | Peter Rajnoha <prajnoha@redhat.com> | 2012-02-15 11:27:01 +0000 |
---|---|---|
committer | Peter Rajnoha <prajnoha@redhat.com> | 2012-02-15 11:27:01 +0000 |
commit | 55761e14af4c167f79e9d7d4f6cfa28bb84be51d (patch) | |
tree | 446bb56866cb76005f00425e0ba0b2ed6fae4bad /libdm/libdm-common.h | |
parent | c64d7cd38121772f3f62c7c08bedb3289f3a1ecd (diff) | |
download | lvm2-55761e14af4c167f79e9d7d4f6cfa28bb84be51d.tar.gz lvm2-55761e14af4c167f79e9d7d4f6cfa28bb84be51d.tar.xz lvm2-55761e14af4c167f79e9d7d4f6cfa28bb84be51d.zip |
Mangle device name on dm_task_set_name/newname call if necessary.
If dm_task_set_name/newname is called, the name provided will be
automatically translated to correct encoded form with the hex enconding
so any character not on udev whitelist will be mangled with \xNN
format where NN is hex value of the character used.
By default, the name mangling mode used is the one set during
configure with the '--with-default-name-mangling' option.
Diffstat (limited to 'libdm/libdm-common.h')
-rw-r--r-- | libdm/libdm-common.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libdm/libdm-common.h b/libdm/libdm-common.h index 618b0649..1e290a2a 100644 --- a/libdm/libdm-common.h +++ b/libdm/libdm-common.h @@ -18,6 +18,9 @@ #include "libdevmapper.h" +int mangle_name(const char *str, size_t len, char *buf, + size_t buf_len, dm_string_mangling_t mode); + struct target *create_target(uint64_t start, uint64_t len, const char *type, const char *params); |