diff options
| author | riastradh <riastradh@NetBSD.org> | 2023-04-11 13:17:32 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2023-04-11 13:17:32 +0000 |
| commit | 11d7d9a2747f7cd150a3cce40410bb3c438c2c3a (patch) | |
| tree | fceeedba376466fe50acfadd2878cb55c04247c1 /sbin | |
| parent | a2497da00736884aee15fe62f6f046e3124166c7 (diff) | |
rndctl(8): Take omitted name/type as empty device name.
This can now be used to change flags for all sources at once.
XXX pullup-10
Diffstat (limited to 'sbin')
| -rw-r--r-- | sbin/rndctl/rndctl.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/sbin/rndctl/rndctl.c b/sbin/rndctl/rndctl.c index 752c6d490f1..e5b61cfa01e 100644 --- a/sbin/rndctl/rndctl.c +++ b/sbin/rndctl/rndctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: rndctl.c,v 1.40 2021/04/04 13:37:17 nia Exp $ */ +/* $NetBSD: rndctl.c,v 1.41 2023/04/11 13:17:32 riastradh Exp $ */ /*- * Copyright (c) 1997 Michael Graff. @@ -31,7 +31,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: rndctl.c,v 1.40 2021/04/04 13:37:17 nia Exp $"); +__RCSID("$NetBSD: rndctl.c,v 1.41 2023/04/11 13:17:32 riastradh Exp $"); #endif #include <sys/param.h> @@ -570,7 +570,7 @@ main(int argc, char **argv) rndctl_t rctl; int ch, cmd, lflag, mflag, sflag; u_int32_t type; - char name[16]; + char name[16] = ""; const char *filename = NULL; if (SHA3_Selftest() != 0) @@ -695,12 +695,6 @@ main(int argc, char **argv) usage(); /* - * If not listing, we need a device name or a type. - */ - if (lflag == 0 && cmd == 0 && sflag == 0) - usage(); - - /* * Modify request. */ if (mflag != 0) { |
