mirror of
https://github.com/upa/mscp.git
synced 2026-02-16 10:54:47 +08:00
refactor error message-related functions
split message print fuctions (mpr_*), strerrno, and mscp_get/set_error into print.c/h and strerrno.c/h. ToDo: revise usages of priv_set_errv and pr_* functions.
This commit is contained in:
19
src/print.c
Normal file
19
src/print.c
Normal file
@@ -0,0 +1,19 @@
|
||||
/* SPDX-License-Identifier: GPL-3.0-only */
|
||||
|
||||
#include <print.h>
|
||||
|
||||
/* message print functions */
|
||||
static int __print_severity = MSCP_SEVERITY_WARN;
|
||||
|
||||
void set_print_severity(int serverity)
|
||||
{
|
||||
if (serverity < 0)
|
||||
__print_severity = -1; /* no print */
|
||||
__print_severity = serverity;
|
||||
}
|
||||
|
||||
int get_print_severity()
|
||||
{
|
||||
return __print_severity;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user