diff options
author | Philip Prindeville | 2017-08-28 21:20:55 +0200 |
---|---|---|
committer | Karel Zak | 2017-09-05 11:49:21 +0200 |
commit | b443c1779e39bb056b6045b81ba655c875b45747 (patch) | |
tree | e3ec49667aec5cf95a4d655db7818a24d386e721 /libblkid/src/superblocks | |
parent | libuuid: add support for hash-based UUIDs (diff) | |
download | kernel-qcow2-util-linux-b443c1779e39bb056b6045b81ba655c875b45747.tar.gz kernel-qcow2-util-linux-b443c1779e39bb056b6045b81ba655c875b45747.tar.xz kernel-qcow2-util-linux-b443c1779e39bb056b6045b81ba655c875b45747.zip |
misc: replace magic number 37 with UUID_STR_LEN
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Diffstat (limited to 'libblkid/src/superblocks')
-rw-r--r-- | libblkid/src/superblocks/superblocks.c | 2 | ||||
-rw-r--r-- | libblkid/src/superblocks/superblocks.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/libblkid/src/superblocks/superblocks.c b/libblkid/src/superblocks/superblocks.c index e631e90ac..6b025ee1f 100644 --- a/libblkid/src/superblocks/superblocks.c +++ b/libblkid/src/superblocks/superblocks.c @@ -768,7 +768,7 @@ int blkid_probe_set_uuid_as(blkid_probe pr, unsigned char *uuid, const char *nam if (!v) return -ENOMEM; - v->len = 37; + v->len = UUID_STR_LEN; v->data = calloc(1, v->len); if (!v->data) rc = -ENOMEM; diff --git a/libblkid/src/superblocks/superblocks.h b/libblkid/src/superblocks/superblocks.h index 695c3b783..3dea7b881 100644 --- a/libblkid/src/superblocks/superblocks.h +++ b/libblkid/src/superblocks/superblocks.h @@ -9,6 +9,10 @@ #include "blkidP.h" +#ifndef UUID_STR_LEN +#define UUID_STR_LEN 37 +#endif + extern const struct blkid_idinfo cramfs_idinfo; extern const struct blkid_idinfo swap_idinfo; extern const struct blkid_idinfo swsuspend_idinfo; |