From: Karel Zak Date: Mon, 20 Jul 2015 10:05:32 +0000 (+0200) Subject: ipcmk: support {K,M,G,...} X-Git-Tag: v2.27-rc1~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79f4c272cf7628e50f562885578061f841c220cd;p=thirdparty%2Futil-linux.git ipcmk: support {K,M,G,...} Signed-off-by: Karel Zak --- diff --git a/sys-utils/ipcmk.1 b/sys-utils/ipcmk.1 index 48e34bff00..19b7532e85 100644 --- a/sys-utils/ipcmk.1 +++ b/sys-utils/ipcmk.1 @@ -18,6 +18,8 @@ Resources can be specified with these options: Create a shared memory segment of .I size bytes. +The \fIsize\fR argument may be followed by the multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so on for GiB, etc. (the +"iB" is optional, e.g., "K" has the same meaning as "KiB") or the suffixes KB (=1000), MB (=1000*1000), and so on for GB, etc. .TP .BR \-Q , " \-\-queue" Create a message queue. diff --git a/sys-utils/ipcmk.c b/sys-utils/ipcmk.c index ff768c701a..d79071c8d9 100644 --- a/sys-utils/ipcmk.c +++ b/sys-utils/ipcmk.c @@ -107,7 +107,7 @@ int main(int argc, char **argv) while((opt = getopt_long(argc, argv, "hM:QS:p:Vh", longopts, NULL)) != -1) { switch(opt) { case 'M': - size = strtou64_or_err(optarg, _("failed to parse size")); + size = strtosize_or_err(optarg, _("failed to parse size")); ask_shm = 1; break; case 'Q':