From e578b59bf612178d7727c303102049e62676c308 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 25 Oct 2018 14:10:54 +0200 Subject: btrfs-progs: convert strerror to implicit %m Similar to the changes where strerror(errno) was converted, continue with the remaining cases where the argument was stored in another variable. The savings in object size are about 4500 bytes: $ size btrfs.old btrfs.new text data bss dec hex filename 805055 24248 19748 849051 cf49b btrfs.old 804527 24248 19748 848523 cf28b btrfs.new Signed-off-by: David Sterba --- btrfs-select-super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'btrfs-select-super.c') diff --git a/btrfs-select-super.c b/btrfs-select-super.c index e021221e..0764bf01 100644 --- a/btrfs-select-super.c +++ b/btrfs-select-super.c @@ -77,7 +77,8 @@ int main(int argc, char **argv) radix_tree_init(); if((ret = check_mounted(argv[optind])) < 0) { - error("cannot check mount status: %s", strerror(-ret)); + errno = -ret; + error("cannot check mount status: %m"); return ret; } else if(ret) { error("%s is currently mounted, aborting", argv[optind]); -- cgit v1.2.3