Module Name: src Committed By: riastradh Date: Tue Apr 11 13:17:32 UTC 2023
Modified Files: src/sbin/rndctl: rndctl.c Log Message: 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 To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sbin/rndctl/rndctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/rndctl/rndctl.c diff -u src/sbin/rndctl/rndctl.c:1.40 src/sbin/rndctl/rndctl.c:1.41 --- src/sbin/rndctl/rndctl.c:1.40 Sun Apr 4 13:37:17 2021 +++ src/sbin/rndctl/rndctl.c Tue Apr 11 13:17:32 2023 @@ -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) {