Revert yamon_getenv() so it returns char *. While this is suboptimal, it is

the only convenient way to use the returned value with numerous library
routines which have not been altered to properly use constified char *.

This was found to be necessary when I extended yamon to hold a string
describing a video mode for use with my experimental radeonfb.
This commit is contained in:
gdamore 2006-07-13 21:06:18 +00:00
parent 4c3c91e691
commit ccee3fc76f
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: yamon.c,v 1.6 2006/03/21 21:49:47 gdamore Exp $ */
/* $NetBSD: yamon.c,v 1.7 2006/07/13 21:06:18 gdamore Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@ -38,7 +38,7 @@
/* XXX move to arch/mips/yamon/yamon.c or similar? */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: yamon.c,v 1.6 2006/03/21 21:49:47 gdamore Exp $");
__KERNEL_RCSID(0, "$NetBSD: yamon.c,v 1.7 2006/07/13 21:06:18 gdamore Exp $");
#include <sys/param.h>
#include <sys/device.h>
@ -92,7 +92,7 @@ yamonputc(dev_t dev, int c)
YAMON_PRINT_COUNT(&chr, 1);
}
const char *
char *
yamon_getenv(const char *name)
{
yamon_env_var *yev = yamon_envp;

View File

@ -1,4 +1,4 @@
/* $NetBSD: yamon.h,v 1.5 2006/03/21 21:49:47 gdamore Exp $ */
/* $NetBSD: yamon.h,v 1.6 2006/07/13 21:06:18 gdamore Exp $ */
/*
* Copyright 2002 Wasabi Systems, Inc.
@ -86,7 +86,7 @@ typedef struct {
#define SYSCON_BOARD_BUS_CLOCK_FREQ_ID 35 /* UINT32 */
#define SYSCON_BOARD_PCI_FREQ_KHZ_ID 36 /* UINT32 */
const char *yamon_getenv(const char *);
char *yamon_getenv(const char *);
void yamon_print(const char *);
void yamon_exit(uint32_t);
int yamon_setcpufreq(int);