The libstand's panic() appends its own '\n' to the message, so that users of the API
don't need to supply one. MFC after: 2 weeks
This commit is contained in:
parent
c2c3992b39
commit
55d5c94943
@ -144,7 +144,7 @@ bf_command(FICL_VM *vm)
|
|||||||
printf("%s\n", command_errmsg);
|
printf("%s\n", command_errmsg);
|
||||||
break;
|
break;
|
||||||
case CMD_FATAL:
|
case CMD_FATAL:
|
||||||
panic("%s\n", command_errmsg);
|
panic("%s", command_errmsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(line);
|
free(line);
|
||||||
|
@ -646,7 +646,7 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, size_t size,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (V86_IO_BUFFER_SIZE / BD(dev).bd_sectorsize == 0)
|
if (V86_IO_BUFFER_SIZE / BD(dev).bd_sectorsize == 0)
|
||||||
panic("BUG: Real mode buffer is too small\n");
|
panic("BUG: Real mode buffer is too small");
|
||||||
|
|
||||||
bbuf = PTOV(V86_IO_BUFFER);
|
bbuf = PTOV(V86_IO_BUFFER);
|
||||||
rest = size;
|
rest = size;
|
||||||
|
@ -120,7 +120,7 @@ arpwhohas(struct iodesc *d, struct in_addr addr)
|
|||||||
arpsend, &wbuf.data, sizeof(wbuf.data),
|
arpsend, &wbuf.data, sizeof(wbuf.data),
|
||||||
arprecv, &pkt, (void **)&ah, NULL);
|
arprecv, &pkt, (void **)&ah, NULL);
|
||||||
if (i == -1) {
|
if (i == -1) {
|
||||||
panic("arp: no response for %s\n",
|
panic("arp: no response for %s",
|
||||||
inet_ntoa(addr));
|
inet_ntoa(addr));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,10 +35,10 @@ void
|
|||||||
__assert(const char *func, const char *file, int line, const char *expression)
|
__assert(const char *func, const char *file, int line, const char *expression)
|
||||||
{
|
{
|
||||||
if (func == NULL)
|
if (func == NULL)
|
||||||
panic("Assertion failed: (%s), file %s, line %d.\n",
|
panic("Assertion failed: (%s), file %s, line %d.",
|
||||||
expression, file, line);
|
expression, file, line);
|
||||||
else
|
else
|
||||||
panic(
|
panic(
|
||||||
"Assertion failed: (%s), function %s, file %s, line %d.\n",
|
"Assertion failed: (%s), function %s, file %s, line %d.",
|
||||||
expression, func, file, line);
|
expression, func, file, line);
|
||||||
}
|
}
|
||||||
|
@ -360,7 +360,7 @@ bzf_stat(struct open_file *f, struct stat *sb)
|
|||||||
void
|
void
|
||||||
bz_internal_error(int errorcode)
|
bz_internal_error(int errorcode)
|
||||||
{
|
{
|
||||||
panic("bzipfs: critical error %d in bzip2 library occured\n", errorcode);
|
panic("bzipfs: critical error %d in bzip2 library occured", errorcode);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef REGRESSION
|
#ifdef REGRESSION
|
||||||
|
@ -182,7 +182,7 @@ netif_attach(struct netif *nif, struct iodesc *desc, void *machdep_hint)
|
|||||||
desc->io_netif = nif;
|
desc->io_netif = nif;
|
||||||
#ifdef PARANOID
|
#ifdef PARANOID
|
||||||
if (drv->netif_init == NULL)
|
if (drv->netif_init == NULL)
|
||||||
panic("%s%d: no netif_init support\n", drv->netif_bname,
|
panic("%s%d: no netif_init support", drv->netif_bname,
|
||||||
nif->nif_unit);
|
nif->nif_unit);
|
||||||
#endif
|
#endif
|
||||||
drv->netif_init(desc, machdep_hint);
|
drv->netif_init(desc, machdep_hint);
|
||||||
@ -201,7 +201,7 @@ netif_detach(struct netif *nif)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef PARANOID
|
#ifdef PARANOID
|
||||||
if (drv->netif_end == NULL)
|
if (drv->netif_end == NULL)
|
||||||
panic("%s%d: no netif_end support\n", drv->netif_bname,
|
panic("%s%d: no netif_end support", drv->netif_bname,
|
||||||
nif->nif_unit);
|
nif->nif_unit);
|
||||||
#endif
|
#endif
|
||||||
drv->netif_end(nif);
|
drv->netif_end(nif);
|
||||||
@ -222,7 +222,7 @@ netif_get(struct iodesc *desc, void **pkt, time_t timo)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef PARANOID
|
#ifdef PARANOID
|
||||||
if (drv->netif_get == NULL)
|
if (drv->netif_get == NULL)
|
||||||
panic("%s%d: no netif_get support\n", drv->netif_bname,
|
panic("%s%d: no netif_get support", drv->netif_bname,
|
||||||
nif->nif_unit);
|
nif->nif_unit);
|
||||||
#endif
|
#endif
|
||||||
rv = drv->netif_get(desc, pkt, timo);
|
rv = drv->netif_get(desc, pkt, timo);
|
||||||
@ -249,7 +249,7 @@ netif_put(struct iodesc *desc, void *pkt, size_t len)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef PARANOID
|
#ifdef PARANOID
|
||||||
if (drv->netif_put == NULL)
|
if (drv->netif_put == NULL)
|
||||||
panic("%s%d: no netif_put support\n", drv->netif_bname,
|
panic("%s%d: no netif_put support", drv->netif_bname,
|
||||||
nif->nif_unit);
|
nif->nif_unit);
|
||||||
#endif
|
#endif
|
||||||
rv = drv->netif_put(desc, pkt, len);
|
rv = drv->netif_put(desc, pkt, len);
|
||||||
|
@ -53,7 +53,7 @@ sbrk(int incr)
|
|||||||
char *ret;
|
char *ret;
|
||||||
|
|
||||||
if (heapbase == 0)
|
if (heapbase == 0)
|
||||||
panic("No heap setup\n");
|
panic("No heap setup");
|
||||||
|
|
||||||
if ((heapsize + incr) <= maxheap) {
|
if ((heapsize + incr) <= maxheap) {
|
||||||
ret = (char *)heapbase + heapsize;
|
ret = (char *)heapbase + heapsize;
|
||||||
|
@ -133,7 +133,7 @@ uboot_loadaddr(u_int type, void *data, uint64_t addr)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (biggest_size == 0)
|
if (biggest_size == 0)
|
||||||
panic("Not enough DRAM to load kernel\n");
|
panic("Not enough DRAM to load kernel");
|
||||||
#if 0
|
#if 0
|
||||||
printf("Loading kernel into region 0x%08jx-0x%08jx (%ju MiB)\n",
|
printf("Loading kernel into region 0x%08jx-0x%08jx (%ju MiB)\n",
|
||||||
(uintmax_t)biggest_block,
|
(uintmax_t)biggest_block,
|
||||||
|
@ -324,7 +324,7 @@ net_init(struct iodesc *desc, void *machdep_hint)
|
|||||||
sc = nif->nif_devdata = &uboot_softc;
|
sc = nif->nif_devdata = &uboot_softc;
|
||||||
|
|
||||||
if ((err = ub_dev_open(sc->sc_handle)) != 0)
|
if ((err = ub_dev_open(sc->sc_handle)) != 0)
|
||||||
panic("%s%d: initialisation failed with error %d\n",
|
panic("%s%d: initialisation failed with error %d",
|
||||||
nif->nif_driver->netif_bname, nif->nif_unit, err);
|
nif->nif_driver->netif_bname, nif->nif_unit, err);
|
||||||
|
|
||||||
/* Get MAC address */
|
/* Get MAC address */
|
||||||
@ -359,6 +359,6 @@ net_end(struct netif *nif)
|
|||||||
int err;
|
int err;
|
||||||
|
|
||||||
if ((err = ub_dev_close(sc->sc_handle)) != 0)
|
if ((err = ub_dev_close(sc->sc_handle)) != 0)
|
||||||
panic("%s%d: net_end failed with error %d\n",
|
panic("%s%d: net_end failed with error %d",
|
||||||
nif->nif_driver->netif_bname, nif->nif_unit, err);
|
nif->nif_driver->netif_bname, nif->nif_unit, err);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user