summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2015-08-01 00:44:07 +0900
committerNamhyung Kim <namhyung@gmail.com>2015-08-01 02:20:47 +0900
commitcbfa6a41317b72553433f4ebe250dd0d34bf058f (patch)
tree323fdcdf3b7256ea615dbdcbfd13e5216d1c960f /src/libsystemd
parentd28ebe27f2f77264a4090ae6566d3eaa407151ea (diff)
busctl: fix assertion failure on --size option
Using --size option triggers an assert failure below because parse_size() requires the second argument, base, being either 1000 or 1024. As it's for a packet size, it'd be better using IEC binary suffix (base 1024) IMHO. $ busctl --size 2048 Assertion 'base == 1000 || base == 1024' failed at src/basic/util.c:2222, function parse_size(). Aborting. Aborted (core dumped)
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-bus/busctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/busctl.c b/src/libsystemd/sd-bus/busctl.c
index 8e0b374b57..1724292bbb 100644
--- a/src/libsystemd/sd-bus/busctl.c
+++ b/src/libsystemd/sd-bus/busctl.c
@@ -1825,7 +1825,7 @@ static int parse_argv(int argc, char *argv[]) {
case ARG_SIZE: {
off_t o;
- r = parse_size(optarg, 0, &o);
+ r = parse_size(optarg, 1024, &o);
if (r < 0) {
log_error("Failed to parse size: %s", optarg);
return r;