diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-11-11 12:56:29 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-11-14 16:25:11 +0100 |
commit | 0221d68a1317407960ea6f88bd4ebc1781999332 (patch) | |
tree | aa6f7d5c2280c44df790b7c042756c8302a4e788 /src/delta | |
parent | 8e143a123276a9636987b08f555603927ca9e186 (diff) | |
download | systemd-0221d68a1317407960ea6f88bd4ebc1781999332.tar.gz systemd-0221d68a1317407960ea6f88bd4ebc1781999332.tar.bz2 systemd-0221d68a1317407960ea6f88bd4ebc1781999332.zip |
basic/pager: convert the pager options to a flags argument
Pretty much everything uses just the first argument, and this doesn't make this
common pattern more complicated, but makes it simpler to pass multiple options.
Diffstat (limited to 'src/delta')
-rw-r--r-- | src/delta/delta.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/delta/delta.c b/src/delta/delta.c index 0cda1df2a3..399d438667 100644 --- a/src/delta/delta.c +++ b/src/delta/delta.c @@ -52,7 +52,7 @@ static const char have_dropins[] = "systemd/system\0" "systemd/user\0"; -static bool arg_no_pager = false; +static PagerFlags arg_pager_flags = 0; static int arg_diff = -1; static enum { @@ -596,7 +596,7 @@ static int parse_argv(int argc, char *argv[]) { return version(); case ARG_NO_PAGER: - arg_no_pager = true; + arg_pager_flags |= PAGER_DISABLE; break; case 't': { @@ -654,7 +654,7 @@ int main(int argc, char *argv[]) { else if (arg_diff) arg_flags |= SHOW_OVERRIDDEN; - (void) pager_open(arg_no_pager, false); + (void) pager_open(arg_pager_flags); if (optind < argc) { int i; |