diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-04-29 18:39:12 -0300 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-04-30 08:36:01 -0300 |
commit | aa96c6cb44a6eeccc506ae055aae2519a7f914e1 (patch) | |
tree | 7ddc766397769008a014b1777661bbaf94311de8 /man | |
parent | 6886b0449dbf264f6b7db2a93a1cfee0e4d4080a (diff) |
id128: when taking user input for a 128bit ID, validate syntax
Also, always accept both our simple hexdump syntax and UUID syntax.
Diffstat (limited to 'man')
-rw-r--r-- | man/sd_id128_to_string.xml | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/man/sd_id128_to_string.xml b/man/sd_id128_to_string.xml index ec8b263e0d..593d0752d5 100644 --- a/man/sd_id128_to_string.xml +++ b/man/sd_id128_to_string.xml @@ -59,7 +59,7 @@ <funcprototype> <funcdef>int <function>sd_id128_from_string</function></funcdef> - <paramdef>const char <parameter>s</parameter>[33], sd_id128_t* <parameter>ret</parameter></paramdef> + <paramdef>const char* <parameter>s</parameter>, sd_id128_t* <parameter>ret</parameter></paramdef> </funcprototype> </funcsynopsis> @@ -77,14 +77,19 @@ <para><function>sd_id128_from_string()</function> implements the reverse operation: it takes a 33 - character array with 32 hexadecimal digits - (terminated by NUL) and parses them back into an - 128 bit ID returned in - <parameter>ret</parameter>.</para> + character string with 32 hexadecimal digits + (either lowercase or uppercase, terminated by NUL) and parses them back into an 128 + bit ID returned in + <parameter>ret</parameter>. Alternatively, this call + can also parse a 37 character string with a 128bit ID + formatted as RFC UUID.</para> <para>For more information about the <literal>sd_id128_t</literal> type see - <citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para> + <citerefentry><refentrytitle>sd-id128</refentrytitle><manvolnum>3</manvolnum></citerefentry>. Note + that these calls operate the same way on all + architectures, i.e. the results do not depend on + endianess.</para> <para>When formatting a 128 bit ID into a string it is often easier to use a format string for |