]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
src/abstraction-common.c: remove log level prefix
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Sat, 19 Mar 2022 14:14:29 +0000 (19:44 +0530)
committerTom Hromatka <tom.hromatka@oracle.com>
Mon, 21 Mar 2022 14:28:30 +0000 (08:28 -0600)
With commit 97a0e195ddd7 ("log: add log level string prefix to
logging functions"), log level prefixes gets added to message
printed by cgroup_{err,warn,info} functions, remove them from
message passed to these functions.

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/abstraction-common.c

index 60c4f33b790bd33e51006fff681efd7ab883715b..ef006594d8709bb02ac898d55776a2cbe06873ee 100644 (file)
@@ -26,7 +26,7 @@ int cgroup_strtol(const char * const in_str, int base,
        int ret = 0;
 
        if (out_value == NULL) {
-               cgroup_err("Error: Invalid parameter to %s\n", __func__);
+               cgroup_err("Invalid parameter to %s\n", __func__);
                ret = ECGINVAL;
                goto out;
        }
@@ -38,14 +38,13 @@ int cgroup_strtol(const char * const in_str, int base,
        if ((errno == ERANGE &&
             (*out_value == LONG_MAX || *out_value == LONG_MIN))
            || (errno != 0 && *out_value == 0)) {
-               cgroup_err("Error: Failed to convert %s from strtol: %s\n",
-                          in_str);
+               cgroup_err("Failed to convert %s from strtol: %s\n", in_str);
                ret = ECGFAIL;
                goto out;
        }
 
        if (endptr == in_str) {
-               cgroup_err("Error: No long value found in %s\n",
+               cgroup_err("No long value found in %s\n",
                           in_str);
                ret = ECGFAIL;
                goto out;
@@ -88,7 +87,7 @@ int cgroup_convert_int(struct cgroup_controller * const dst_cgc,
                ret = snprintf(out_value_str, OUT_VALUE_STR_LEN, "%ld", out_value);
                if (ret == OUT_VALUE_STR_LEN) {
                        /* we ran out of room in the string. throw an error */
-                       cgroup_err("Error: output value too large for string: %d\n",
+                       cgroup_err("output value too large for string: %d\n",
                                   out_value);
                        ret = ECGFAIL;
                        goto out;