From 1421211924ff05af3b0c0d52f1c84472d0307456 Mon Sep 17 00:00:00 2001 From: Shawn Landden Date: Fri, 3 Aug 2012 17:22:09 -0700 Subject: continue work with error messages, log_oom() Adds messages for formally silent errors: new "Failed on cmdline argument %s: %s". Removes some specific error messages for -ENOMEM in mount-setup.c. A few specific ones have been left in other binaries. --- src/core/mount-setup.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/core/mount-setup.c') diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c index 07794df049..c10c6dad1c 100644 --- a/src/core/mount-setup.c +++ b/src/core/mount-setup.c @@ -190,8 +190,7 @@ int mount_cgroup_controllers(char ***join_controllers) { controllers = set_new(string_hash_func, string_compare_func); if (!controllers) { - r = -ENOMEM; - log_error("Failed to allocate controller set."); + r = log_oom(); goto finish; } @@ -262,9 +261,8 @@ int mount_cgroup_controllers(char ***join_controllers) { options = strv_join(*k, ","); if (!options) { - log_error("Failed to join options"); free(controller); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -275,9 +273,8 @@ int mount_cgroup_controllers(char ***join_controllers) { where = strappend("/sys/fs/cgroup/", options); if (!where) { - log_error("Failed to build path"); free(options); - r = -ENOMEM; + r = log_oom(); goto finish; } @@ -306,8 +303,7 @@ int mount_cgroup_controllers(char ***join_controllers) { t = strappend("/sys/fs/cgroup/", *i); if (!t) { - log_error("Failed to build path"); - r = -ENOMEM; + r = log_oom(); free(options); goto finish; } -- cgit v1.2.3-54-g00ecf