r = dev_io(DEV_READ, dev, FS_PROC_NR,
sbbuf, SUPER_BLOCK_BYTES, MIN_BLOCK_SIZE, 0);
if(r != MIN_BLOCK_SIZE) {
- printf("dev_io failed for super block (%d)\n", r);
return EINVAL;
}
memcpy(sp, sbbuf, sizeof(*sp));
* conv4: do byte swapping on a 32-bit long
*/
-#define STACKINFO 1
-
-#if STACKINFO
-#include "symtab.h"
-#endif
-
#include "fs.h"
#include <minix/com.h>
#include <unistd.h>
#include "inode.h"
#include "param.h"
-#if STACKINFO
-
-struct i386_frame {
- struct i386_frame *next;
- int retaddr;
- int arg0;
-};
-
-PUBLIC void
-show_stack(void)
-{
- unsigned long *s;
- int i, t, p = 0;
- s = (unsigned long *) &i;
- for(i = 0; i < 120; i++, s++) {
- char *symname = NULL;
- if(!*s) continue;
-#define ELEMENTS (sizeof(fs_sym_entries)/sizeof(struct fs_sym_entry))
- for(t = 0; t < ELEMENTS-1; t++) {
- if(*s >= fs_sym_entries[t].symoffset &&
- *s < fs_sym_entries[t+1].symoffset) {
- symname = fs_sym_entries[t].symname;
- break;
- }
- }
- if(!symname) continue;
- if(!(p%7)) printf("\n");
- p++;
- printf("%-9s ", symname);
- }
- printf("\n");
-}
-#endif
-
PRIVATE int panicking; /* inhibits recursive panics during sync */
/*===========================================================================*
if (panicking) return; /* do not panic during a sync */
panicking = TRUE; /* prevent another panic during the sync */
-
-#if STACKINFO
- show_stack();
-#endif
printf("File system panic: %s ", format);
if (num != NO_NUM) printf("%d",num);
if (!broadcast_dst(ip_port, ip_hdr->ih_dst))
{
#if !CRAMPED
- printf(
- "ip[%d]: broadcast packet for ip-nonbroadcast addr, src=",
+ /* this message isn't very useful, but is quite annoying on
+ * the console
+ */
+ /*
+ printf("ip[%d]: broadcast packet for ip-nonbroadcast addr, src=",
ip_port->ip_port);
writeIpAddr(ip_hdr->ih_src);
printf(" dst=");
writeIpAddr(ip_hdr->ih_dst);
printf("\n");
+ */
#endif
bf_afree(pack);
return;