make this build again.

This commit is contained in:
christos 2018-01-26 09:38:26 +00:00
parent 516181531f
commit a3bd874609
2 changed files with 18 additions and 19 deletions

View File

@ -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(&current_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;

View File

@ -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*);