Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/nvmectl sprinkle static and death
details: https://anonhg.NetBSD.org/src/rev/a867fcfbf188
branches: trunk
changeset: 353387:a867fcfbf188
user: christos <christos%NetBSD.org@localhost>
date: Wed May 03 01:37:16 2017 +0000
description:
sprinkle static and death
diffstat:
sbin/nvmectl/nvmectl.c | 12 +++++-------
sbin/nvmectl/nvmectl.h | 5 ++---
2 files changed, 7 insertions(+), 10 deletions(-)
diffs (64 lines):
diff -r 9cb6ed3f56a4 -r a867fcfbf188 sbin/nvmectl/nvmectl.c
--- a/sbin/nvmectl/nvmectl.c Wed May 03 00:47:29 2017 +0000
+++ b/sbin/nvmectl/nvmectl.c Wed May 03 01:37:16 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvmectl.c,v 1.3 2017/04/29 00:06:40 nonaka Exp $ */
+/* $NetBSD: nvmectl.c,v 1.4 2017/05/03 01:37:16 christos Exp $ */
/*-
* Copyright (C) 2012-2013 Intel Corporation
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: nvmectl.c,v 1.3 2017/04/29 00:06:40 nonaka Exp $");
+__RCSID("$NetBSD: nvmectl.c,v 1.4 2017/05/03 01:37:16 christos Exp $");
#if 0
__FBSDID("$FreeBSD: head/sbin/nvmecontrol/nvmecontrol.c 314229 2017-02-25 00:09:12Z imp $");
#endif
@@ -70,7 +70,7 @@
{NULL, NULL, NULL},
};
-void
+static __dead void
gen_usage(struct nvme_function *f)
{
@@ -82,15 +82,13 @@
exit(1);
}
-void
+__dead void
dispatch(int argc, char *argv[], struct nvme_function *tbl)
{
struct nvme_function *f = tbl;
- if (argv[1] == NULL) {
+ if (argv[1] == NULL)
gen_usage(tbl);
- return;
- }
while (f->name != NULL) {
if (strcmp(argv[1], f->name) == 0)
diff -r 9cb6ed3f56a4 -r a867fcfbf188 sbin/nvmectl/nvmectl.h
--- a/sbin/nvmectl/nvmectl.h Wed May 03 00:47:29 2017 +0000
+++ b/sbin/nvmectl/nvmectl.h Wed May 03 01:37:16 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nvmectl.h,v 1.3 2017/04/29 00:06:40 nonaka Exp $ */
+/* $NetBSD: nvmectl.h,v 1.4 2017/05/03 01:37:16 christos Exp $ */
/*-
* Copyright (C) 2012-2013 Intel Corporation
@@ -102,8 +102,7 @@
void read_namespace_data(int, int, struct nvm_identify_namespace *);
void print_hex(void *, uint32_t);
void read_logpage(int, uint8_t, int, void *, uint32_t);
-void gen_usage(struct nvme_function *) __dead;
-void dispatch(int argc, char *argv[], struct nvme_function *f);
+__dead void dispatch(int argc, char *argv[], struct nvme_function *f);
void nvme_strvis(uint8_t *, int, const uint8_t *, int);
#endif /* __NVMECTL_H__ */
Home |
Main Index |
Thread Index |
Old Index