ref: e88e6c9a3bfdc33c0e9f4388bf61aa4df5220a02
parent: 4636a1e21adfe395c2afdce2145da497b913d1d3
author: aiju <[email protected]>
date: Fri Jul 22 15:46:17 EDT 2011
acid: don't assume mips
--- a/sys/src/cmd/acid/acid.h
+++ b/sys/src/cmd/acid/acid.h
@@ -27,7 +27,6 @@
typedef struct Frtype Frtype;
Extern int kernel;
-Extern int remote;
Extern int text;
Extern int silent;
Extern Fhdr fhdr;
--- a/sys/src/cmd/acid/main.c
+++ b/sys/src/cmd/acid/main.c
@@ -60,19 +60,11 @@
case 'q':
quiet = 0;
break;
- case 'r':
- pid = 1;
- remote++;
- kernel++;
- break;
default:
usage();
}ARGEND
if(argc > 0) {
- if(remote)
- aout = argv[0];
- else
if(isnumeric(argv[0])) {
pid = strtol(argv[0], 0, 0);
snprint(prog, sizeof(prog), "/proc/%d/text", pid);
@@ -89,9 +81,7 @@
}
aout = argv[0];
}
- } else
- if(remote)
- aout = "/mips/9ch";
+ }
fmtinstall('x', xfmt);
fmtinstall('L', Lfmt);
@@ -258,7 +248,6 @@
Value *v;
uvlong length;
Symbol sym;
- extern Machdata mipsmach;
if(mtype != 0){
symmap = newmap(0, 1);
@@ -274,8 +263,6 @@
return;
}
- machdata = &mipsmach;
-
if(!crackhdr(text, &fhdr)) {
print("can't decode file header\n");
return;
@@ -553,15 +540,11 @@
static char *kernel;
cpu = getenv("cputype");
- if(cpu == 0) {
- cpu = "mips";
- print("$cputype not set; assuming %s\n", cpu);
- }
+ if(cpu == 0)
+ sysfatal("$cputype not set");
p = getenv("terminal");
- if(p == 0 || (p=strchr(p, ' ')) == 0 || p[1] == ' ' || p[1] == 0) {
- p = "ch";
- print("missing or bad $terminal; assuming %s\n", p);
- }
+ if(p == 0 || (p=strchr(p, ' ')) == 0 || p[1] == ' ' || p[1] == 0)
+ sysfatal("$terminal not set");
else{
p++;
q = strchr(p, ' ');