summaryrefslogtreecommitdiffstats
path: root/libblkid/src/probe.c
diff options
context:
space:
mode:
authorKarel Zak2019-01-22 12:33:19 +0100
committerKarel Zak2019-01-22 12:33:19 +0100
commitc2435b946f574880201cb41d989d8d63d4bbf87d (patch)
tree575d06df11b0e1ff28a0a337ad32440b62b5bac9 /libblkid/src/probe.c
parentsetarch: don't return address of automatic variable (diff)
downloadkernel-qcow2-util-linux-c2435b946f574880201cb41d989d8d63d4bbf87d.tar.gz
kernel-qcow2-util-linux-c2435b946f574880201cb41d989d8d63d4bbf87d.tar.xz
kernel-qcow2-util-linux-c2435b946f574880201cb41d989d8d63d4bbf87d.zip
libblkid: remove dependence on libuuid
Currently we use libuuid to print UUID only. This code is possible to replace by one snprintf(). It seems better to duplicate this one snprintf than force all distros to keep libuuid together with libblkid. Note, this scenario has been already supported on --disable-libuuid. Reported-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid/src/probe.c')
-rw-r--r--libblkid/src/probe.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c
index 96aecf38b..7f0f0eaf5 100644
--- a/libblkid/src/probe.c
+++ b/libblkid/src/probe.c
@@ -1886,13 +1886,6 @@ struct blkid_prval *__blkid_probe_lookup_value(blkid_probe pr, const char *name)
/* converts DCE UUID (uuid[16]) to human readable string
* - the @len should be always 37 */
-#ifdef HAVE_LIBUUID
-void blkid_unparse_uuid(const unsigned char *uuid, char *str,
- size_t len __attribute__((__unused__)))
-{
- uuid_unparse(uuid, str);
-}
-#else
void blkid_unparse_uuid(const unsigned char *uuid, char *str, size_t len)
{
snprintf(str, len,
@@ -1903,7 +1896,6 @@ void blkid_unparse_uuid(const unsigned char *uuid, char *str, size_t len)
uuid[8], uuid[9],
uuid[10], uuid[11], uuid[12], uuid[13], uuid[14],uuid[15]);
}
-#endif
/* like uuid_is_null() from libuuid, but works with arbitrary size of UUID */
int blkid_uuid_is_empty(const unsigned char *buf, size_t len)