cli: suppress printing error messages when -q is specified.
authorYousong Zhou <yszhou4tech@gmail.com>
Mon, 25 May 2015 12:32:40 +0000 (20:32 +0800)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 25 May 2015 21:02:28 +0000 (23:02 +0200)
commita6a884b368409c0c0af1c1c53f6ad4a1b55648b2
tree4fc20c52a1f79c75c9bc6f460d2ffbeb18ab687e
parentf34c2de12f6f79c72c0b0b9a4f3649ed24817bc8
cli: suppress printing error messages when -q is specified.

 - Introduce cli_error() for printing local errors.
 - Convert existing fprintf(stderr, ) and perror() to cli_error().
 - N.B. error messages will still be printed if they occured before -q
   flag was parsed.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
cli.c