From: Karel Zak Date: Thu, 27 Feb 2020 13:52:06 +0000 (+0100) Subject: libuuid: add uuid_parse_range() to man page and symbol-table X-Git-Tag: v2.36-rc1~205 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=079dc9ddcdd1d04f81b6372e5acb65ee4dcf789f;p=thirdparty%2Futil-linux.git libuuid: add uuid_parse_range() to man page and symbol-table Signed-off-by: Karel Zak --- diff --git a/libuuid/man/uuid_parse.3 b/libuuid/man/uuid_parse.3 index 156d15dddc..ee36c27f7b 100644 --- a/libuuid/man/uuid_parse.3 +++ b/libuuid/man/uuid_parse.3 @@ -36,7 +36,9 @@ uuid_parse \- convert an input UUID string into binary representation .nf .B #include .sp -.BI "int uuid_parse( char *" in ", uuid_t " uu ); +.BI "int uuid_parse(char *" in ", uuid_t " uu ); +.sp +.BI "int uuid_parse_range(char *" in_start ", char *" in_end ", uuid_t " uu ); .fi .SH DESCRIPTION The @@ -47,6 +49,16 @@ into the binary representation. The input UUID is a string of the form 1b4e28ba\-2fa1\-11d2\-883f\-b9a761bde3fb (in .BR printf (3) format "%08x\-%04x\-%04x\-%04x\-%012x", 36 bytes plus the trailing '\e0'). +.PP +The +.B uuid_parse_range +function works like +.B uuid_parse +but parses only range in string specified by +.I in_start +and +.I in_end +pointers. .SH RETURN VALUE Upon successfully parsing the input string, 0 is returned, and the UUID is stored in the location pointed to by diff --git a/libuuid/src/libuuid.sym b/libuuid/src/libuuid.sym index 9e3e80035c..342453368d 100644 --- a/libuuid/src/libuuid.sym +++ b/libuuid/src/libuuid.sym @@ -44,6 +44,15 @@ global: uuid_get_template; } UUID_2.20; +/* + * version(s) since util-linux.2.36 + */ +UUID_2.36 { +global: + uuid_parse_range; +} UUID_2.31; + + /* * __uuid_* this is not part of the official API, this is * uuidd (uuid daemon) specific stuff. Hell. diff --git a/libuuid/src/parse.c b/libuuid/src/parse.c index e4ec44ab3c..536b1ed23c 100644 --- a/libuuid/src/parse.c +++ b/libuuid/src/parse.c @@ -51,7 +51,7 @@ int uuid_parse(const char *in, uuid_t uu) int uuid_parse_range(const char *in_start, const char *in_end, uuid_t uu) { struct uuid uuid; - int i; + int i; const char *cp; char buf[3];