From d1b72a27b72317790124f1790b5f6f823bae21bf Mon Sep 17 00:00:00 2001 From: Ori Bernstein Date: Thu, 12 Dec 2024 20:35:58 +0000 Subject: [PATCH] walk: error on mutually exclusive flags --- sys/src/cmd/walk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/src/cmd/walk.c b/sys/src/cmd/walk.c index 5296c310d..47a3670ff 100644 --- a/sys/src/cmd/walk.c +++ b/sys/src/cmd/walk.c @@ -266,6 +266,9 @@ main(int argc, char **argv) usage(); }ARGEND; + if(!printfiles && !printdirs) + sysfatal("mutually exclusive flags: -f and -d"); + fmtinstall('M', dirmodefmt); if((bout = Bfdopen(1, OWRITE)) == nil)