case 'o':
arg_output = output_mode_from_string(optarg);
if (arg_output < 0) {
- log_error("Unknown output '%s'.", optarg);
+ log_error("Unknown output format '%s'.", optarg);
return -EINVAL;
}
+ if (arg_output == OUTPUT_EXPORT ||
+ arg_output == OUTPUT_JSON ||
+ arg_output == OUTPUT_JSON_PRETTY ||
+ arg_output == OUTPUT_JSON_SSE ||
+ arg_output == OUTPUT_CAT)
+ arg_quiet = true;
+
break;
case 'a':
}
for (;;) {
- for (;;) {
+ while (arg_lines == 0 || arg_follow || n_shown < arg_lines) {
int flags;
- if (arg_lines > 0 && n_shown >= arg_lines) {
- r = 0;
- goto finish;
- }
-
if (need_seek) {
r = sd_journal_next(j);
if (r < 0) {