summaryrefslogtreecommitdiffstats
path: root/libblkid/src/read.c
diff options
context:
space:
mode:
authorSami Kerola2015-01-07 23:05:43 +0100
committerSami Kerola2015-01-07 23:05:43 +0100
commit9385a11d8d5d1468a15e02cb1a74b2472be993bc (patch)
tree94289c3e87052ae33b632b69ed91a62045d3e16a /libblkid/src/read.c
parentipcs: remove FIXME markup (diff)
downloadkernel-qcow2-util-linux-9385a11d8d5d1468a15e02cb1a74b2472be993bc.tar.gz
kernel-qcow2-util-linux-9385a11d8d5d1468a15e02cb1a74b2472be993bc.tar.xz
kernel-qcow2-util-linux-9385a11d8d5d1468a15e02cb1a74b2472be993bc.zip
libblkid: assume strtoull() is available
The strtoull() is part of ISO/IEC 9899:1999 (aka C99) and the function has been happily used in prlimit(1) since 2011-10-19 without anyone complaining compatibility issues. Reference: http://pubs.opengroup.org/onlinepubs/009695399/functions/strtoul.html Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'libblkid/src/read.c')
-rw-r--r--libblkid/src/read.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/libblkid/src/read.c b/libblkid/src/read.c
index 81ab0dfd6..41e564f4e 100644
--- a/libblkid/src/read.c
+++ b/libblkid/src/read.c
@@ -32,13 +32,6 @@
# include <stdlib.h>
#endif
-#ifdef HAVE_STRTOULL
-#define STRTOULL strtoull /* defined in stdlib.h if you try hard enough */
-#else
-/* FIXME: need to support real strtoull here */
-#define STRTOULL strtoul
-#endif
-
#ifdef TEST_PROGRAM
#define blkid_debug_dump_dev(dev) (debug_dump_dev(dev))
static void debug_dump_dev(blkid_dev dev);
@@ -330,14 +323,14 @@ static int parse_tag(blkid_cache cache, blkid_dev dev, char **cp)
/* Some tags are stored directly in the device struct */
if (!strcmp(name, "DEVNO"))
- dev->bid_devno = STRTOULL(value, 0, 0);
+ dev->bid_devno = strtoull(value, 0, 0);
else if (!strcmp(name, "PRI"))
dev->bid_pri = strtol(value, 0, 0);
else if (!strcmp(name, "TIME")) {
char *end = NULL;
- dev->bid_time = STRTOULL(value, &end, 0);
+ dev->bid_time = strtoull(value, &end, 0);
if (end && *end == '.')
- dev->bid_utime = STRTOULL(end + 1, 0, 0);
+ dev->bid_utime = strtoull(end + 1, 0, 0);
} else
ret = blkid_set_tag(dev, name, value, strlen(value));