Module Name: src
Committed By: christos
Date: Fri Jan 26 09:38:26 UTC 2018
Modified Files:
src/usr.sbin/memswitch: memswitch.c memswitch.h
Log Message:
make this build again.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.sbin/memswitch/memswitch.c
cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/memswitch/memswitch.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/memswitch/memswitch.c
diff -u src/usr.sbin/memswitch/memswitch.c:1.14 src/usr.sbin/memswitch/memswitch.c:1.15
--- src/usr.sbin/memswitch/memswitch.c:1.14 Tue Jan 23 17:40:06 2018
+++ src/usr.sbin/memswitch/memswitch.c Fri Jan 26 04:38:26 2018
@@ -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 <sys/ioctl.h>
-#ifndef DEBUG
+#ifndef SRAMDEBUG
#include <machine/sram.h>
#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;
Index: src/usr.sbin/memswitch/memswitch.h
diff -u src/usr.sbin/memswitch/memswitch.h:1.4 src/usr.sbin/memswitch/memswitch.h:1.5
--- src/usr.sbin/memswitch/memswitch.h:1.4 Wed Jan 24 09:45:44 2018
+++ src/usr.sbin/memswitch/memswitch.h Fri Jan 26 04:38:26 2018
@@ -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*);