diff options
author | jkh <jkh@FreeBSD.org> | 1999-09-04 16:01:15 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1999-09-04 16:01:15 +0000 |
commit | 101b5429b35890e216ab09cb682af79180f96353 (patch) | |
tree | 65bdcc4ed2696e6d41cbe1bead2991bd8cb85c73 /usr.sbin | |
parent | 5e3e53cfb3692a343a529ee1c71e3fef162c91db (diff) | |
download | FreeBSD-src-101b5429b35890e216ab09cb682af79180f96353.zip FreeBSD-src-101b5429b35890e216ab09cb682af79180f96353.tar.gz |
o Catch up with pnp changes - kget no longer saves pnp data.
o Catch up with ncurses updates - some internal function names have changed.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/sade/install.c | 1 | ||||
-rw-r--r-- | usr.sbin/sade/system.c | 5 | ||||
-rw-r--r-- | usr.sbin/sysinstall/install.c | 1 | ||||
-rw-r--r-- | usr.sbin/sysinstall/kget.c | 60 | ||||
-rw-r--r-- | usr.sbin/sysinstall/network.c | 1 | ||||
-rw-r--r-- | usr.sbin/sysinstall/system.c | 5 |
6 files changed, 8 insertions, 65 deletions
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c index 841dd1a..a96451f 100644 --- a/usr.sbin/sade/install.c +++ b/usr.sbin/sade/install.c @@ -50,6 +50,7 @@ #include <sys/stat.h> #include <sys/sysctl.h> #include <unistd.h> +#include <termios.h> static void create_termcap(void); static void fixit_common(void); diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c index fc57fe3..b0c6c66 100644 --- a/usr.sbin/sade/system.c +++ b/usr.sbin/sade/system.c @@ -18,6 +18,7 @@ #include "sysinstall.h" #include <signal.h> +#include <termios.h> #include <sys/reboot.h> #include <machine/console.h> #include <sys/fcntl.h> @@ -257,15 +258,12 @@ void systemChangeTerminal(char *color, const u_char c_term[], char *mono, const u_char m_term[]) { - extern void init_acs(void); - if (OnVTY) { if (ColorDisplay) { setenv("TERM", color, 1); setenv("TERMCAP", c_term, 1); reset_shell_mode(); setterm(color); - init_acs(); cbreak(); noecho(); } else { @@ -273,7 +271,6 @@ systemChangeTerminal(char *color, const u_char c_term[], setenv("TERMCAP", m_term, 1); reset_shell_mode(); setterm(mono); - init_acs(); cbreak(); noecho(); } } diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index 841dd1a..a96451f 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -50,6 +50,7 @@ #include <sys/stat.h> #include <sys/sysctl.h> #include <unistd.h> +#include <termios.h> static void create_termcap(void); static void fixit_common(void); diff --git a/usr.sbin/sysinstall/kget.c b/usr.sbin/sysinstall/kget.c index 7748b2c..20bf4b5 100644 --- a/usr.sbin/sysinstall/kget.c +++ b/usr.sbin/sysinstall/kget.c @@ -38,7 +38,6 @@ kget(char *out) #include "sysinstall.h" #include <sys/sysctl.h> #include <i386/isa/isa_device.h> -#include <i386/isa/pnp.h> int kget(char *out) @@ -46,11 +45,9 @@ kget(char *out) int len, i, bytes_written = 0; char *buf; char *mib1 = "machdep.uc_devlist"; - char *mib2 = "machdep.uc_pnplist"; char name[9]; FILE *fout = NULL; struct isa_device *id; - struct pnp_cinfo *c; char *p; /* create the output file; if we end up not writing to it, we'll @@ -66,17 +63,17 @@ kget(char *out) i = sysctlbyname(mib1, NULL, &len, NULL, NULL); if (i) { msgDebug("kget: error buffer sizing\n"); - goto pnp; + goto bail; } if (len <= 0) { msgDebug("kget: mib1 has length of %d\n", len); - goto pnp; + goto bail; } buf = (char *)alloca(len * sizeof(char)); i = sysctlbyname(mib1, buf, &len, NULL, NULL); if (i) { msgDebug("kget: error retrieving data\n"); - goto pnp; + goto bail; } @@ -116,57 +113,6 @@ kget(char *out) i += sizeof(struct isa_device) + 8; } -pnp: - /* Now, print the changes to PnP override table */ - i = sysctlbyname(mib2, NULL, &len, NULL, NULL); - if (i) { - /* Possibly our kernel doesn't support PnP. Ignore the error. */ - msgDebug("kget: can't get PnP data - skipping...\n"); - goto bail; - } - if (len <= 0) { - msgDebug("kget: PnP data has length of %d\n", len); - goto bail; - } - buf = (char *)alloca(len * sizeof(char)); - i = sysctlbyname(mib2, buf, &len, NULL, NULL); - if (i) { - msgDebug("kget: error retrieving data mib2\n"); - goto bail; - } - /* Print the PnP override table. Taken from userconfig.c */ - - i = 0; - do { - c = (struct pnp_cinfo *)(buf + i); - if (c->csn >0 && c->csn != 255) { - int pmax, mmax; - - if (c->enable == 0) { - bytes_written += fprintf(fout, "pnp %d %d disable\n", - c->csn, c->ldn); - continue; - } - bytes_written += fprintf(fout, "pnp %d %d %s irq0 %d irq1 %d drq0 %d drq1 %d", - c->csn, c->ldn, c->override ? "os":"bios", - c->irq[0], c->irq[1], c->drq[0], c->drq[1]); - if (c->flags) - bytes_written += fprintf(fout, " flags 0x%lx", c->flags); - pmax = 0; - while (c->port[pmax] != 0 && pmax < 8) { - bytes_written += fprintf(fout, " port%d %d", pmax, c->port[pmax]); - pmax++; - } - mmax = 0; - while (c->mem[mmax].base != 0 && mmax < 8) { - bytes_written += fprintf(fout, " mem%d %d", - mmax, (int)c->mem[mmax].base); - mmax++; - } - bytes_written += fprintf(fout,"\n"); - } - } while ((i += sizeof(struct pnp_cinfo)) < len); - bail: if (bytes_written) fprintf(fout, "q\n"); diff --git a/usr.sbin/sysinstall/network.c b/usr.sbin/sysinstall/network.c index 9d70278..adffa4d 100644 --- a/usr.sbin/sysinstall/network.c +++ b/usr.sbin/sysinstall/network.c @@ -39,6 +39,7 @@ #include "sysinstall.h" #include <signal.h> +#include <termios.h> #include <sys/fcntl.h> #include <sys/ioctl.h> #include <sys/stat.h> diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c index fc57fe3..b0c6c66 100644 --- a/usr.sbin/sysinstall/system.c +++ b/usr.sbin/sysinstall/system.c @@ -18,6 +18,7 @@ #include "sysinstall.h" #include <signal.h> +#include <termios.h> #include <sys/reboot.h> #include <machine/console.h> #include <sys/fcntl.h> @@ -257,15 +258,12 @@ void systemChangeTerminal(char *color, const u_char c_term[], char *mono, const u_char m_term[]) { - extern void init_acs(void); - if (OnVTY) { if (ColorDisplay) { setenv("TERM", color, 1); setenv("TERMCAP", c_term, 1); reset_shell_mode(); setterm(color); - init_acs(); cbreak(); noecho(); } else { @@ -273,7 +271,6 @@ systemChangeTerminal(char *color, const u_char c_term[], setenv("TERMCAP", m_term, 1); reset_shell_mode(); setterm(mono); - init_acs(); cbreak(); noecho(); } } |