From a3bd874609f474229440e3f932c61f54ed233782 Mon Sep 17 00:00:00 2001 From: christos Date: Fri, 26 Jan 2018 09:38:26 +0000 Subject: [PATCH] make this build again. --- usr.sbin/memswitch/memswitch.c | 16 ++++++++-------- usr.sbin/memswitch/memswitch.h | 21 ++++++++++----------- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/usr.sbin/memswitch/memswitch.c b/usr.sbin/memswitch/memswitch.c index 308854057982..2d61c660fd81 100644 --- a/usr.sbin/memswitch/memswitch.c +++ b/usr.sbin/memswitch/memswitch.c @@ -1,4 +1,4 @@ -/* $NetBSD: memswitch.c,v 1.14 2018/01/23 22:40:06 sevan Exp $ */ +/* $NetBSD: memswitch.c,v 1.15 2018/01/26 09:38:26 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -41,11 +41,11 @@ #include -#ifndef DEBUG +#ifndef SRAMDEBUG #include #else /* - * DEBUG -- works on other (faster) platforms; + * SRAMDEBUG -- works on other (faster) platforms; * store in a regular file instead of actual non-volatile static RAM. */ #define PATH_RAMFILE "/tmp/sramfile" @@ -290,7 +290,7 @@ alloc_modified_values(void) void alloc_current_values(void) { -#ifndef DEBUG +#ifndef SRAMDEBUG int i; int sramfd = 0; struct sram_io buffer; @@ -367,7 +367,7 @@ flush(void) { int i; int sramfd = 0; -#ifndef DEBUG +#ifndef SRAMDEBUG struct sram_io buffer; #endif @@ -380,7 +380,7 @@ flush(void) /* Not modified at all. */ return; -#ifndef DEBUG +#ifndef SRAMDEBUG /* Assume SRAM_IO_SIZE = n * 16. */ for (i = 0; i < 256; i += SRAM_IO_SIZE) { if (memcmp(¤t_values[i], &modified_values[i], @@ -414,7 +414,7 @@ flush(void) int save(const char *name) { -#ifndef DEBUG +#ifndef SRAMDEBUG int fd; alloc_current_values(); @@ -442,7 +442,7 @@ save(const char *name) int restore(const char *name) { -#ifndef DEBUG +#ifndef SRAMDEBUG int sramfd, fd, i; struct sram_io buffer; diff --git a/usr.sbin/memswitch/memswitch.h b/usr.sbin/memswitch/memswitch.h index 2767d10ab1ab..e591c67a33bb 100644 --- a/usr.sbin/memswitch/memswitch.h +++ b/usr.sbin/memswitch/memswitch.h @@ -1,4 +1,4 @@ -/* $NetBSD: memswitch.h,v 1.4 2018/01/24 14:45:44 sevan Exp $ */ +/* $NetBSD: memswitch.h,v 1.5 2018/01/26 09:38:26 christos Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -79,13 +79,12 @@ extern char *progname; extern u_int8_t *current_values; extern u_int8_t *modified_values; -static void usage(void) __dead; -void show_single(const char*)); -void show_all(void)); -void modify_single(const char*)); -void help_single(const char*)); -void alloc_current_values(void)); -void alloc_modified_values(void)); -void flush(void)); -int save(const char*)); -int restore(const char*)); +void show_single(const char*); +void show_all(void); +void modify_single(const char*); +void help_single(const char*); +void alloc_current_values(void); +void alloc_modified_values(void); +void flush(void); +int save(const char*); +int restore(const char*);