mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-31 06:16:03 +00:00
parser: convert remaining pwarn() to flag controlled warns
Make all warnings that go through pwarn() controllable by warning flags. This adds several new warning control flags, documented in --help=warn Convert --debug-cache to be unified with warning flags. So it can be set by either --debug-cache or --warn=debug-cache Also add an "all" option to be able to turn on all warnings. MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/600 Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
@@ -84,7 +84,7 @@ int current_lineno = 1;
|
||||
int option = OPTION_ADD;
|
||||
|
||||
dfaflags_t dfaflags = (dfaflags_t)(DFA_CONTROL_TREE_NORMAL | DFA_CONTROL_TREE_SIMPLE | DFA_CONTROL_MINIMIZE | DFA_CONTROL_DIFF_ENCODE);
|
||||
dfaflags_t warnflags = 0;
|
||||
dfaflags_t warnflags = DEFAULT_WARNINGS;
|
||||
|
||||
const char *progname = __FILE__;
|
||||
char *profile_ns = NULL;
|
||||
@@ -99,7 +99,7 @@ int read_implies_exec = 1;
|
||||
int read_implies_exec = 0;
|
||||
#endif
|
||||
|
||||
void pwarn(const char *fmt, ...)
|
||||
void pwarnf(const char *fmt, ...)
|
||||
{
|
||||
va_list arg;
|
||||
char *newfmt;
|
||||
|
Reference in New Issue
Block a user