aboutsummaryrefslogtreecommitdiffstats
path: root/sys-utils/chmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys-utils/chmem.c')
-rw-r--r--sys-utils/chmem.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys-utils/chmem.c b/sys-utils/chmem.c
index 4105d19695..5ff344fd3c 100644
--- a/sys-utils/chmem.c
+++ b/sys-utils/chmem.c
@@ -146,12 +146,12 @@ static int chmem_size(struct chmem_desc *desc, int enable, int zone_id)
idxtostr(desc, index, str, sizeof(str));
rc = ul_path_writef_string(desc->sysmem, onoff, "%s/state", name);
- if (rc != 0 && desc->verbose) {
+ if (rc != 0) {
if (enable)
- fprintf(stdout, _("%s enable failed\n"), str);
+ warn(_("%s enable failed"), str);
else
- fprintf(stdout, _("%s disable failed\n"), str);
- } else if (rc == 0 && desc->verbose) {
+ warn(_("%s disable failed"), str);
+ } else if (desc->verbose) {
if (enable)
fprintf(stdout, _("%s enabled\n"), str);
else