fprintf(stderr, ...); is used across the tools to notify the user about
something that went wrong and needs to abort. Similarly, printf() is
used to print information, may continue with the code execution.
This patch adds helper macro err(), info(), that can replace messaging
printing to stderr/stdout, making code readable and compact.
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
#define cgroup_info(x...) cgroup_log(CGROUP_LOG_INFO, "Info: " x)
#define cgroup_dbg(x...) cgroup_log(CGROUP_LOG_DEBUG, x)
+#define err(x...) fprintf(stderr, x)
+#define info(x...) fprintf(stdout, x)
+
/**
* Auxiliary specifier of group, used to store parsed command line options.
*/