Revert previous DPRINTF changes since gcc3 properly removes text strings
in while(0) statements during optimization.
This commit is contained in:
parent
604d3c43a9
commit
3fb3c2b562
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: boot.c,v 1.8 2003/04/19 21:30:14 tsutsui Exp $ */
|
||||
/* $NetBSD: boot.c,v 1.9 2003/11/21 19:44:53 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1999 Izumi Tsutsui. All rights reserved.
|
||||
|
@ -45,9 +45,9 @@ char *devs[] = { "hd", "fh", "fd", NULL, NULL, "rd", "st" };
|
|||
char *kernels[] = { "/netbsd", "/netbsd.gz", NULL };
|
||||
|
||||
#ifdef BOOT_DEBUG
|
||||
# define DPRINTF(x) printf x
|
||||
# define DPRINTF printf
|
||||
#else
|
||||
# define DPRINTF(x)
|
||||
# define DPRINTF while (0) printf
|
||||
#endif
|
||||
|
||||
void
|
||||
|
@ -71,10 +71,10 @@ boot(d4, d5, d6, d7)
|
|||
strcmp(netbsd, "/boot") == 0)
|
||||
netbsd = "";
|
||||
|
||||
DPRINTF(("howto = 0x%x\n", d7));
|
||||
DPRINTF(("bootdev = 0x%x\n", bootdev));
|
||||
DPRINTF(("bootname = %s\n", netbsd));
|
||||
DPRINTF(("maxmem = 0x%x\n", d4));
|
||||
DPRINTF("howto = 0x%x\n", d7);
|
||||
DPRINTF("bootdev = 0x%x\n", bootdev);
|
||||
DPRINTF("bootname = %s\n", netbsd);
|
||||
DPRINTF("maxmem = 0x%x\n", d4);
|
||||
|
||||
#define SET_MAGIC(bootdev, magic) ((bootdev & 0x0fffffff)| (magic << 28))
|
||||
/* PROM monitor passes 0xa, but NEWS-OS /boot passed 0x5... */
|
||||
|
@ -103,7 +103,7 @@ boot(d4, d5, d6, d7)
|
|||
|
||||
for (i = 0; kernels[i]; i++) {
|
||||
sprintf(file, "%s%s", devname, kernels[i]);
|
||||
DPRINTF(("trying %s...\n", file));
|
||||
DPRINTF("trying %s...\n", file);
|
||||
fd = loadfile(file, marks, LOAD_KERNEL);
|
||||
if (fd != -1)
|
||||
break;
|
||||
|
@ -117,9 +117,9 @@ boot(d4, d5, d6, d7)
|
|||
#endif
|
||||
}
|
||||
|
||||
DPRINTF(("entry = 0x%x\n", (int)marks[MARK_ENTRY]));
|
||||
DPRINTF(("ssym = 0x%x\n", (int)marks[MARK_SYM]));
|
||||
DPRINTF(("esym = 0x%x\n", (int)marks[MARK_END]));
|
||||
DPRINTF("entry = 0x%x\n", (int)marks[MARK_ENTRY]);
|
||||
DPRINTF("ssym = 0x%x\n", (int)marks[MARK_SYM]);
|
||||
DPRINTF("esym = 0x%x\n", (int)marks[MARK_END]);
|
||||
|
||||
entry = (void *)marks[MARK_ENTRY];
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: devopen.c,v 1.4 2002/12/20 16:56:23 tsutsui Exp $ */
|
||||
/* $NetBSD: devopen.c,v 1.5 2003/11/21 19:44:53 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1999 Tsubai Masanari. All rights reserved.
|
||||
|
@ -34,9 +34,9 @@
|
|||
#include <machine/romcall.h>
|
||||
|
||||
#ifdef BOOT_DEBUG
|
||||
# define DPRINTF(x) printf x
|
||||
# define DPRINTF printf
|
||||
#else
|
||||
# define DPRINTF(x)
|
||||
# define DPRINTF while (0) printf
|
||||
#endif
|
||||
|
||||
int dkopen(struct open_file *, ...);
|
||||
|
@ -69,14 +69,14 @@ devopen(f, fname, file)
|
|||
char devname[32];
|
||||
char *cp;
|
||||
|
||||
DPRINTF(("devopen: %s\n", fname));
|
||||
DPRINTF("devopen: %s\n", fname);
|
||||
|
||||
strcpy(devname, fname);
|
||||
cp = strchr(devname, ')') + 1;
|
||||
*cp = 0;
|
||||
fd = rom_open(devname, 0);
|
||||
|
||||
DPRINTF(("devname = %s, fd = %d\n", devname, fd));
|
||||
DPRINTF("devname = %s, fd = %d\n", devname, fd);
|
||||
if (fd == -1)
|
||||
return -1;
|
||||
|
||||
|
@ -92,7 +92,7 @@ devopen(f, fname, file)
|
|||
int
|
||||
dkopen(struct open_file *f, ...)
|
||||
{
|
||||
DPRINTF(("dkopen\n"));
|
||||
DPRINTF("dkopen\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ dkclose(f)
|
|||
{
|
||||
struct romdev *dev = f->f_devdata;
|
||||
|
||||
DPRINTF(("dkclose\n"));
|
||||
DPRINTF("dkclose\n");
|
||||
rom_close(dev->fd);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bootxx.c,v 1.4 2002/05/20 14:05:22 lukem Exp $ */
|
||||
/* $NetBSD: bootxx.c,v 1.5 2003/11/21 19:44:53 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1999 Izumi Tsutsui. All rights reserved.
|
||||
|
@ -47,9 +47,9 @@ void (*entry_point)(u_int32_t, u_int32_t, u_int32_t, u_int32_t) =
|
|||
(void *)DEFAULT_ENTRY_POINT;
|
||||
|
||||
#ifdef BOOTXX_DEBUG
|
||||
# define DPRINTF(x) printf x
|
||||
# define DPRINTF printf
|
||||
#else
|
||||
# define DPRINTF(x)
|
||||
# define DPRINTF while (0) printf
|
||||
#endif
|
||||
|
||||
char *devs[] = { "hd", "fh", "fd", NULL, NULL, "rd", "st" };
|
||||
|
@ -67,15 +67,15 @@ bootxx(d4, d5, d6, d7)
|
|||
|
||||
printf("NetBSD/news68k Primary Boot\n");
|
||||
|
||||
DPRINTF(("\n"));
|
||||
DPRINTF(("d4 %x\n", d4));
|
||||
DPRINTF(("d5 %x (%s)\n", d5, (char *)d5));
|
||||
DPRINTF(("d6 %x\n", d6));
|
||||
DPRINTF(("d7 %x\n", d7));
|
||||
DPRINTF("\n");
|
||||
DPRINTF("d4 %x\n", d4);
|
||||
DPRINTF("d5 %x (%s)\n", d5, (char *)d5);
|
||||
DPRINTF("d6 %x\n", d6);
|
||||
DPRINTF("d7 %x\n", d7);
|
||||
|
||||
DPRINTF(("block_size = %d\n", bbinfo.bbi_block_size));
|
||||
DPRINTF(("block_count = %d\n", bbinfo.bbi_block_count));
|
||||
DPRINTF(("entry_point = %p\n", entry_point));
|
||||
DPRINTF("block_size = %d\n", bbinfo.bbi_block_size);
|
||||
DPRINTF("block_count = %d\n", bbinfo.bbi_block_count);
|
||||
DPRINTF("entry_point = %p\n", entry_point);
|
||||
|
||||
/* sd(ctlr, lun, part, bus?, host) */
|
||||
|
||||
|
@ -99,19 +99,19 @@ bootxx(d4, d5, d6, d7)
|
|||
|
||||
addr = (char *)entry_point;
|
||||
bs = bbinfo.bbi_block_size;
|
||||
DPRINTF(("reading block:"));
|
||||
DPRINTF("reading block:");
|
||||
for (i = 0; i < bbinfo.bbi_block_count; i++) {
|
||||
blk = bbinfo.bbi_block_table[i];
|
||||
|
||||
DPRINTF((" %d", blk));
|
||||
DPRINTF(" %d", blk);
|
||||
|
||||
rom_lseek(fd, blk * 512, 0);
|
||||
rom_read(fd, addr, bs);
|
||||
addr += bs;
|
||||
}
|
||||
DPRINTF((" done\n"));
|
||||
DPRINTF(" done\n");
|
||||
rom_close(fd);
|
||||
|
||||
(*entry_point)(d4, d5, d6, d7);
|
||||
DPRINTF(("bootxx returned?\n"));
|
||||
DPRINTF("bootxx returned?\n");
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: boot.c,v 1.12 2002/11/22 16:27:07 tsutsui Exp $ */
|
||||
/* $NetBSD: boot.c,v 1.13 2003/11/21 19:44:53 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1999 Tsubai Masanari. All rights reserved.
|
||||
|
@ -54,9 +54,9 @@ char *devs[] = { "sd", "fh", "fd", NULL, NULL, "rd", "st" };
|
|||
char *kernels[] = { "/netbsd", "/netbsd.gz", NULL };
|
||||
|
||||
#ifdef BOOT_DEBUG
|
||||
# define DPRINTF(x) printf x
|
||||
# define DPRINTF printf
|
||||
#else
|
||||
# define DPRINTF(x)
|
||||
# define DPRINTF while (0) printf
|
||||
#endif
|
||||
|
||||
void
|
||||
|
@ -100,21 +100,21 @@ boot(a0, a1, a2, a3, a4, a5)
|
|||
int argc = a2;
|
||||
char **argv = (char **)a3;
|
||||
|
||||
DPRINTF(("APbus-based system\n"));
|
||||
DPRINTF("APbus-based system\n");
|
||||
|
||||
DPRINTF(("argc = %d\n", argc));
|
||||
DPRINTF("argc = %d\n", argc);
|
||||
for (i = 0; i < argc; i++) {
|
||||
DPRINTF(("argv[%d] = %s\n", i, argv[i]));
|
||||
DPRINTF("argv[%d] = %s\n", i, argv[i]);
|
||||
if (argv[i][0] != '-' && *netbsd == 0)
|
||||
netbsd = argv[i];
|
||||
}
|
||||
maxmem = _sip->apbsi_memsize;
|
||||
maxmem -= 0x100000; /* reserve 1MB for ROM monitor */
|
||||
|
||||
DPRINTF(("howto = 0x%x\n", a0));
|
||||
DPRINTF(("bootdev = %s\n", (char *)a1));
|
||||
DPRINTF(("bootname = %s\n", netbsd));
|
||||
DPRINTF(("maxmem = 0x%x\n", maxmem));
|
||||
DPRINTF("howto = 0x%x\n", a0);
|
||||
DPRINTF("bootdev = %s\n", (char *)a1);
|
||||
DPRINTF("bootname = %s\n", netbsd);
|
||||
DPRINTF("maxmem = 0x%x\n", maxmem);
|
||||
|
||||
/* XXX use "sonic()" instead of "tftp()" */
|
||||
if (strncmp(bootdev, "tftp", 4) == 0)
|
||||
|
@ -128,17 +128,17 @@ boot(a0, a1, a2, a3, a4, a5)
|
|||
char *bootname = (char *)a2;
|
||||
int ctlr, unit, part, type;
|
||||
|
||||
DPRINTF(("HB system.\n"));
|
||||
DPRINTF("HB system.\n");
|
||||
|
||||
/* bootname is "/boot" by default on HB system. */
|
||||
if (bootname && strcmp(bootname, "/boot") != 0)
|
||||
netbsd = bootname;
|
||||
maxmem = a3;
|
||||
|
||||
DPRINTF(("howto = 0x%x\n", a0));
|
||||
DPRINTF(("bootdev = 0x%x\n", a1));
|
||||
DPRINTF(("bootname = %s\n", netbsd));
|
||||
DPRINTF(("maxmem = 0x%x\n", maxmem));
|
||||
DPRINTF("howto = 0x%x\n", a0);
|
||||
DPRINTF("bootdev = 0x%x\n", a1);
|
||||
DPRINTF("bootname = %s\n", netbsd);
|
||||
DPRINTF("maxmem = 0x%x\n", maxmem);
|
||||
|
||||
ctlr = BOOTDEV_CTLR(bootdev);
|
||||
unit = BOOTDEV_UNIT(bootdev);
|
||||
|
@ -165,7 +165,7 @@ boot(a0, a1, a2, a3, a4, a5)
|
|||
|
||||
for (i = 0; kernels[i]; i++) {
|
||||
sprintf(file, "%s%s", devname, kernels[i]);
|
||||
DPRINTF(("trying %s...\n", file));
|
||||
DPRINTF("trying %s...\n", file);
|
||||
fd = loadfile(file, marks, LOAD_KERNEL);
|
||||
if (fd != -1)
|
||||
break;
|
||||
|
@ -173,9 +173,9 @@ boot(a0, a1, a2, a3, a4, a5)
|
|||
if (kernels[i] == NULL)
|
||||
_rtt();
|
||||
|
||||
DPRINTF(("entry = 0x%x\n", (int)marks[MARK_ENTRY]));
|
||||
DPRINTF(("ssym = 0x%x\n", (int)marks[MARK_SYM]));
|
||||
DPRINTF(("esym = 0x%x\n", (int)marks[MARK_END]));
|
||||
DPRINTF("entry = 0x%x\n", (int)marks[MARK_ENTRY]);
|
||||
DPRINTF("ssym = 0x%x\n", (int)marks[MARK_SYM]);
|
||||
DPRINTF("esym = 0x%x\n", (int)marks[MARK_END]);
|
||||
|
||||
bi_init(BOOTINFO_ADDR);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: devopen.c,v 1.5 2002/11/22 16:27:08 tsutsui Exp $ */
|
||||
/* $NetBSD: devopen.c,v 1.6 2003/11/21 19:44:53 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1999 Tsubai Masanari. All rights reserved.
|
||||
|
@ -38,9 +38,9 @@
|
|||
#include <promdev.h>
|
||||
|
||||
#ifdef BOOT_DEBUG
|
||||
# define DPRINTF(x) printf x
|
||||
# define DPRINTF printf
|
||||
#else
|
||||
# define DPRINTF(x)
|
||||
# define DPRINTF while (0) printf
|
||||
#endif
|
||||
|
||||
int dkopen __P((struct open_file *, ...));
|
||||
|
@ -86,7 +86,7 @@ devopen(f, fname, file)
|
|||
char *cp;
|
||||
int error = 0;
|
||||
|
||||
DPRINTF(("devopen: %s\n", fname));
|
||||
DPRINTF("devopen: %s\n", fname);
|
||||
|
||||
strcpy(romdev.devname, fname);
|
||||
cp = strchr(romdev.devname, ')') + 1;
|
||||
|
@ -96,7 +96,7 @@ devopen(f, fname, file)
|
|||
else
|
||||
fd = rom_open(romdev.devname, 2);
|
||||
|
||||
DPRINTF(("devname = %s, fd = %d\n", romdev.devname, fd));
|
||||
DPRINTF("devname = %s, fd = %d\n", romdev.devname, fd);
|
||||
if (fd == -1)
|
||||
return -1;
|
||||
|
||||
|
@ -135,7 +135,7 @@ devopen(f, fname, file)
|
|||
int
|
||||
dkopen(struct open_file *f, ...)
|
||||
{
|
||||
DPRINTF(("dkopen\n"));
|
||||
DPRINTF("dkopen\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -145,7 +145,7 @@ dkclose(f)
|
|||
{
|
||||
struct romdev *dev = f->f_devdata;
|
||||
|
||||
DPRINTF(("dkclose\n"));
|
||||
DPRINTF("dkclose\n");
|
||||
if (apbus)
|
||||
apcall_close(dev->fd);
|
||||
else
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bootxx.c,v 1.5 2002/11/22 16:27:09 tsutsui Exp $ */
|
||||
/* $NetBSD: bootxx.c,v 1.6 2003/11/21 19:44:53 tsutsui Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (C) 1999 Tsubai Masanari. All rights reserved.
|
||||
|
@ -50,9 +50,9 @@ void (*entry_point) __P((u_int32_t, u_int32_t, u_int32_t, u_int32_t, void *)) =
|
|||
(void *)DEFAULT_ENTRY_POINT;
|
||||
|
||||
#ifdef BOOTXX_DEBUG
|
||||
# define DPRINTF(x) printf x
|
||||
# define DPRINTF printf
|
||||
#else
|
||||
# define DPRINTF(x)
|
||||
# define DPRINTF while (0) printf
|
||||
#endif
|
||||
|
||||
char *devs[] = { "sd", "fh", "fd", NULL, NULL, "rd", "st" };
|
||||
|
@ -82,17 +82,17 @@ bootxx(a0, a1, a2, a3, a4, a5)
|
|||
|
||||
printf("NetBSD/newsmips Primary Boot\n");
|
||||
|
||||
DPRINTF(("\n"));
|
||||
DPRINTF(("a0 %x\n", a0));
|
||||
DPRINTF(("a1 %x\n", a1));
|
||||
DPRINTF(("a2 %x (%s)\n", a2, (char *)a2));
|
||||
DPRINTF(("a3 %x\n", a3));
|
||||
DPRINTF(("a4 %x\n", a4));
|
||||
DPRINTF(("a5 %x\n", a5));
|
||||
DPRINTF("\n");
|
||||
DPRINTF("a0 %x\n", a0);
|
||||
DPRINTF("a1 %x\n", a1);
|
||||
DPRINTF("a2 %x (%s)\n", a2, (char *)a2);
|
||||
DPRINTF("a3 %x\n", a3);
|
||||
DPRINTF("a4 %x\n", a4);
|
||||
DPRINTF("a5 %x\n", a5);
|
||||
|
||||
DPRINTF(("block_size = %d\n", bbinfo.bbi_block_size));
|
||||
DPRINTF(("block_count = %d\n", bbinfo.bbi_block_count));
|
||||
DPRINTF(("entry_point = %p\n", entry_point));
|
||||
DPRINTF("block_size = %d\n", bbinfo.bbi_block_size);
|
||||
DPRINTF("block_count = %d\n", bbinfo.bbi_block_count);
|
||||
DPRINTF("entry_point = %p\n", entry_point);
|
||||
|
||||
if (apbus) {
|
||||
strcpy(devname, (char *)a1);
|
||||
|
@ -120,11 +120,11 @@ bootxx(a0, a1, a2, a3, a4, a5)
|
|||
|
||||
addr = (char *)entry_point;
|
||||
bs = bbinfo.bbi_block_size;
|
||||
DPRINTF(("reading block:"));
|
||||
DPRINTF("reading block:");
|
||||
for (i = 0; i < bbinfo.bbi_block_count; i++) {
|
||||
blk = bbinfo.bbi_block_table[i];
|
||||
|
||||
DPRINTF((" %d", blk));
|
||||
DPRINTF(" %d", blk);
|
||||
|
||||
if (apbus) {
|
||||
apcall_lseek(fd, blk * 512, 0);
|
||||
|
@ -135,7 +135,7 @@ bootxx(a0, a1, a2, a3, a4, a5)
|
|||
}
|
||||
addr += bs;
|
||||
}
|
||||
DPRINTF((" done\n"));
|
||||
DPRINTF(" done\n");
|
||||
if (apbus)
|
||||
apcall_close(fd);
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue