Commit 0bbea921 authored by Alessandro Rubini's avatar Alessandro Rubini

general: get rid of old pp_diag_verbosity

We are already not using "const" verbosity in wrpc-sw, which is our most
size-constrained architecture. So remove this legacy support.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 8bd9b76e
......@@ -19,7 +19,7 @@ build_diags () {
unset USER_CFLAGS
build_one "$msg, printf xint" CONFIG_PRINTF_XINT=y
# then build with all diagnostics, and default printf
export USER_CFLAGS="-DVERB_LOG_MSGS -DCONFIG_PPSI_RUNTIME_VERBOSITY"
export USER_CFLAGS="-DVERB_LOG_MSGS"
build_one "$msg, all messages"
}
......
......@@ -9,7 +9,7 @@
ARCH ?= unix
# Also, you can set USER_CFLAGS, like this (or on the command line)
# USER_CFLAGS = -DVERB_LOG_MSGS -DCONFIG_PPSI_RUNTIME_VERBOSITY
# USER_CFLAGS = -DVERB_LOG_MSGS
#### In theory, users should not change stuff below this line (but please read)
......
......@@ -2,7 +2,7 @@
# All files are under A (short for ARCH): I'm lazy
A := arch-$(ARCH)
CFLAGS += -DCONFIG_PPSI_RUNTIME_VERBOSITY -Itools
CFLAGS += -Itools
LIBARCH := $A/libarch.a
......
......@@ -22,8 +22,6 @@
#include <ppsi/ppsi.h>
#include "ppsi-unix.h"
CONST_VERBOSITY int pp_diag_verbosity = 0;
/* ppg and fields */
static struct pp_globals ppg_static;
static DSDefault defaultDS;
......
......@@ -27,9 +27,6 @@ extern int32_t cal_phase_transition;
int ptp_mode = WRC_MODE_UNKNOWN;
static int ptp_enabled = 0, ptp_forced_stop = 0;
CONST_VERBOSITY int pp_diag_verbosity = 0;
/*ppi fields*/
static DSDefault defaultDS;
static DSCurrent currentDS;
......
# All files are under A (short for ARCH): I'm lazy
A := arch-$(ARCH)
CFLAGS += -DCONFIG_PPSI_RUNTIME_VERBOSITY -Itools
CFLAGS += -Itools
LIBARCH := $A/libarch.a
......
......@@ -26,8 +26,6 @@
#include <ppsi-wrs.h>
#include "../proto-ext-whiterabbit/wr-api.h"
CONST_VERBOSITY int pp_diag_verbosity = 0;
/* ppg and fields */
static struct pp_globals ppg_static;
static DSDefault defaultDS;
......
......@@ -897,11 +897,6 @@ a list of the other ones please see the help message.
@table @t
@item -V
Increase verbosity. This is used for the @i{old} diagnostics (see
@ref{Older Diagnostics}). You may want to use it once or twice.
@item -d
Diagnostics. This options receives the string of diagnostic
......
......@@ -2,32 +2,8 @@
* Macros for diagnostic prints.
*/
/*
* We still have support for compile-time settings, in order to remove
* quite a few kilobytes of stuff from the compiled binary. This first
* part of the file is the previous way, which is still used in
* several files. I plan to phase it out slowly, but let's avoid
* massive changes at this point.
*
* This verbosity argument, that can be changed at run time
* or not. If it can be changed, stuff works like this, depending on
* an integer value somewhere (it is incremented by each -V on a host run).
*
* BTW, Host build always have CONFIG_PPSI_RUNTIME_VERBOSITY set, because we
* have no size problems there (bare build don't have it, in order to
* easily test how stuff work on real freestanding environments.
*/
#ifdef CONFIG_PPSI_RUNTIME_VERBOSITY
#define CONST_VERBOSITY /* nothing: use "int pp_diag_verbosity" */
#else /* no runtime verbosity */
#define CONST_VERBOSITY const /* use "const int pp_diag_verbosity */
#endif /* CONFIG_PPSI_RUNTIME_VERBOSITY */
extern CONST_VERBOSITY int pp_diag_verbosity;
#define pp_error(...) \
if (pp_diag_verbosity) pp_printf("ERROR: " __VA_ARGS__)
#define pp_error(...) pp_printf("ERROR: " __VA_ARGS__)
/*
* The "new" diagnostics is based on flags: there are per-instance flags
......
......@@ -24,7 +24,6 @@ void ppsi_clear_bss(void)
static struct pp_globals ppg_static;
static struct pp_instance ppi_static;
CONST_VERBOSITY int pp_diag_verbosity = 0;
/* ppg fields */
static DSDefault defaultDS;
......@@ -40,8 +39,7 @@ int ppsi_main(int argc, char **argv)
struct pp_instance *ppi = &ppi_static; /* no malloc, one instance */
struct bare_timex t;
if (pp_diag_verbosity)
pp_printf("ppsi starting. Built on %s\n", __DATE__);
pp_printf("ppsi starting. Built on %s\n", __DATE__);
ppi->glbs = ppg;
ppg->defaultDS = &defaultDS;
......
......@@ -5,7 +5,6 @@
* Released according to the GNU LGPL, version 2.1 or any later version.
*/
#define CONFIG_PPSI_RUNTIME_VERBOSITY 1
#include <ppsi/ppsi.h>
#define CMD_LINE_SEPARATOR {"", ""}
......@@ -26,7 +25,6 @@ static struct cmd_line_opt cmd_line_list[] = {
{"-C CONFIG_ITEM", "set configuration options as stated in CONFIG_ITEM\n\t"
"CONFIG_ITEM must be a valid config string, enclosed by \" \""},
{"-f FILE", "read configuration file"},
{"-V", "run in verbose mode"},
{"-d STRING", "diagnostic level (see diag-macros.h)"},
CMD_LINE_SEPARATOR,
{"-x", "do not reset the clock if off by more than one second"},
......@@ -109,9 +107,6 @@ int pp_parse_cmdline(struct pp_globals *ppg, int argc, char **argv)
}
switch (a[1]) {
case 'V':
pp_diag_verbosity++;
break;
case 'd':
/* Use the general flags, per-instance TBD */
a = argv[++i];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment