summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>1999-01-12 23:05:45 +0000
committermjacob <mjacob@FreeBSD.org>1999-01-12 23:05:45 +0000
commit985ee20964bf5571328b58414da08c623ede44a7 (patch)
tree60eeb3642e8432b79eecd9f1c503051cf896e3b2 /usr.sbin
parent27dd626f9b410888e67af3af11ef796f07ca50d3 (diff)
downloadFreeBSD-src-985ee20964bf5571328b58414da08c623ede44a7.zip
FreeBSD-src-985ee20964bf5571328b58414da08c623ede44a7.tar.gz
fix for compiling on alpha
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/vidcontrol/vidcontrol.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/usr.sbin/vidcontrol/vidcontrol.c b/usr.sbin/vidcontrol/vidcontrol.c
index 7fbc442..6583d9f 100644
--- a/usr.sbin/vidcontrol/vidcontrol.c
+++ b/usr.sbin/vidcontrol/vidcontrol.c
@@ -28,7 +28,7 @@
#ifndef lint
static const char rcsid[] =
- "$Id: vidcontrol.c,v 1.24 1998/10/01 11:40:22 yokota Exp $";
+ "$Id: vidcontrol.c,v 1.25 1999/01/11 03:20:32 yokota Exp $";
#endif /* not lint */
#include <ctype.h>
@@ -289,7 +289,7 @@ video_mode(int argc, char **argv, int *index)
{ "VESA_800x600", SW_VESA_800x600 },
{ NULL },
};
- unsigned long mode;
+ unsigned long mode = 0;
int size[3];
int i;
@@ -373,7 +373,7 @@ set_console(char *arg)
n = atoi(arg);
if (n < 1 || n > 12) {
warnx("console number out of range");
- } else if (ioctl(0,VT_ACTIVATE,(char *)n) == -1)
+ } else if (ioctl(0, VT_ACTIVATE, (caddr_t) (long) n) == -1)
warn("ioctl(VT_ACTIVATE)");
}
@@ -431,7 +431,11 @@ static char
void
show_adapter_info(void)
{
+#ifdef __i386__
struct video_adapter_info ad;
+#else
+ struct video_adapter ad;
+#endif
ad.va_index = 0;
if (ioctl(0, CONS_ADPINFO, &ad)) {
@@ -440,8 +444,12 @@ show_adapter_info(void)
}
printf("fb%d:\n", ad.va_index);
+#ifdef __i386__
printf(" %.*s%d, type:%s%s (%d), flags:0x%x\n",
(int)sizeof(ad.va_name), ad.va_name, ad.va_unit,
+#else
+ printf(" type:%s%s (%d), flags:0x%x\n",
+#endif
(ad.va_flags & V_ADP_VESA) ? "VESA " : "",
adapter_name(ad.va_type), ad.va_type, ad.va_flags);
printf(" initial mode:%d, current mode:%d, BIOS mode:%d\n",
OpenPOWER on IntegriCloud