diff options
Diffstat (limited to 'sys-utils/zramctl.c')
-rw-r--r-- | sys-utils/zramctl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys-utils/zramctl.c b/sys-utils/zramctl.c index 63c2c131a..961dba1d0 100644 --- a/sys-utils/zramctl.c +++ b/sys-utils/zramctl.c @@ -505,11 +505,12 @@ int main(int argc, char **argv) if (act != A_RESET && optind + 1 < argc) errx(EXIT_FAILURE, _("only one <device> at a time is allowed")); + if ((act == A_STATUS || act == A_FINDONLY) && (algorithm || nstreams)) + errx(EXIT_FAILURE, _("options --algorithm and --streams " + "must be combined with --size")); + switch (act) { case A_STATUS: - if (algorithm || find || nstreams) - errx(EXIT_FAILURE, _("options --algorithm, --find and " - "--streams are mutually exclusive")); if (!ncolumns) { /* default columns */ columns[ncolumns++] = COL_NAME; columns[ncolumns++] = COL_ALGORITHM; |