Index: c/src/lib/libbsp/i386/pc386/ChangeLog
===================================================================
--- c/src/lib/libbsp/i386/pc386/ChangeLog	(revision 1235164645bb0b1810a05a5868a128d16abd1440)
+++ c/src/lib/libbsp/i386/pc386/ChangeLog	(revision c613270df6836c41503ceb010975d9d05a5dbc2e)
@@ -1,2 +1,6 @@
+2007-09-10	Joel Sherrill <joel.sherrill@OARcorp.com>
+
+	* console/vt.c: Changed tabs to spaces.
+
 2007-09-10	Joel Sherrill <joel.sherrill@OARcorp.com>
 
Index: c/src/lib/libbsp/i386/pc386/console/vt.c
===================================================================
--- c/src/lib/libbsp/i386/pc386/console/vt.c	(revision 1235164645bb0b1810a05a5868a128d16abd1440)
+++ c/src/lib/libbsp/i386/pc386/console/vt.c	(revision c613270df6836c41503ceb010975d9d05a5dbc2e)
@@ -15,5 +15,5 @@
  */
 
-#include <string.h>	/* memcpy */
+#include <string.h>  /* memcpy */
 #include <sys/types.h>
 #include <errno.h>
@@ -61,7 +61,7 @@
 kd_nosound(unsigned long ignored)
 {
-	/* disable counter 2 */
-	outb(inb_p(0x61)&0xFC, 0x61);
-	return;
+  /* disable counter 2 */
+  outb(inb_p(0x61)&0xFC, 0x61);
+  return;
 }
 
@@ -72,29 +72,29 @@
   int level;
 
-	if (hz > 20 && hz < 32767)
-		count = 1193180 / hz;
-
-	 _CPU_ISR_Disable(level);
-/*	del_timer(&sound_timer);  */
-	if (count) {
-		/* enable counter 2 */
-		outb_p(inb_p(0x61)|3, 0x61);
-		/* set command for counter 2, 2 byte write */
-		outb_p(0xB6, 0x43);
-		/* select desired HZ */
-		outb_p(count & 0xff, 0x42);
-		outb((count >> 8) & 0xff, 0x42);
-
-/*
-		if (ticks) {
-			sound_timer.expires = jiffies+ticks;
-			add_timer(&sound_timer);
-		}
+  if (hz > 20 && hz < 32767)
+    count = 1193180 / hz;
+
+   _CPU_ISR_Disable(level);
+/*  del_timer(&sound_timer);  */
+  if (count) {
+    /* enable counter 2 */
+    outb_p(inb_p(0x61)|3, 0x61);
+    /* set command for counter 2, 2 byte write */
+    outb_p(0xB6, 0x43);
+    /* select desired HZ */
+    outb_p(count & 0xff, 0x42);
+    outb((count >> 8) & 0xff, 0x42);
+
+/*
+    if (ticks) {
+      sound_timer.expires = jiffies+ticks;
+      add_timer(&sound_timer);
+    }
 */
-	} else
-		kd_nosound(0);
-
-	 _CPU_ISR_Enable (level);
-	return;
+  } else
+    kd_nosound(0);
+
+   _CPU_ISR_Enable (level);
+  return;
 }
 
@@ -116,27 +116,27 @@
 do_kdsk_ioctl(int cmd, struct kbentry *user_kbe, int perm, struct kbd_struct *kbd)
 {
-	struct kbentry tmp;
-	ushort *key_map, val;
-
-	tmp = *user_kbe;
-	if (i >= NR_KEYS)  /*  s cannot be >= MAX_NR_KEYMAPS */
-		return -EINVAL;
-
-	switch (cmd) {
-	case KDGKBENT:
-		key_map = key_maps[s];
-		if (key_map) {
-		    val = U(key_map[i]);
-		    if (kbd->kbdmode != VC_UNICODE && KTYP(val) >= NR_TYPES)
-			val = K_HOLE;
-		} else
-		    val = (i ? K_HOLE : K_NOSUCHMAP);
-		user_kbe->kb_value = val;
-		return 0;
-
-	case KDSKBENT:
-		return -EINVAL;
-	}
-	return 0;
+  struct kbentry tmp;
+  ushort *key_map, val;
+
+  tmp = *user_kbe;
+  if (i >= NR_KEYS)  /*  s cannot be >= MAX_NR_KEYMAPS */
+    return -EINVAL;
+
+  switch (cmd) {
+  case KDGKBENT:
+    key_map = key_maps[s];
+    if (key_map) {
+        val = U(key_map[i]);
+        if (kbd->kbdmode != VC_UNICODE && KTYP(val) >= NR_TYPES)
+      val = K_HOLE;
+    } else
+        val = (i ? K_HOLE : K_NOSUCHMAP);
+    user_kbe->kb_value = val;
+    return 0;
+
+  case KDSKBENT:
+    return -EINVAL;
+  }
+  return 0;
 }
 #undef i
@@ -149,21 +149,21 @@
 do_kbkeycode_ioctl(int cmd, struct kbkeycode *user_kbkc, int perm)
 {
-	struct kbkeycode tmp;
-	int kc = 0;
-
-	tmp = *user_kbkc;
-	switch (cmd) {
-	case KDGETKEYCODE:
-		kc = getkeycode(tmp.scancode);
-		if (kc >= 0)
-			user_kbkc->keycode = kc;
-		break;
-	case KDSETKEYCODE:
-		if (!perm)
-			return -EPERM;
-		kc = setkeycode(tmp.scancode, tmp.keycode);
-		break;
-	}
-	return kc;
+  struct kbkeycode tmp;
+  int kc = 0;
+
+  tmp = *user_kbkc;
+  switch (cmd) {
+  case KDGETKEYCODE:
+    kc = getkeycode(tmp.scancode);
+    if (kc >= 0)
+      user_kbkc->keycode = kc;
+    break;
+  case KDSETKEYCODE:
+    if (!perm)
+      return -EPERM;
+    kc = setkeycode(tmp.scancode, tmp.keycode);
+    break;
+  }
+  return kc;
 }
 
@@ -171,5 +171,5 @@
 do_kdgkb_ioctl(int cmd, struct kbsentry *user_kdgkb, int perm)
 {
-	return -EINVAL;
+  return -EINVAL;
 }
 
@@ -180,168 +180,168 @@
 int vt_ioctl( unsigned int cmd, unsigned long arg)
 {
-	int perm;
-	unsigned int console;
-	unsigned char ucval;
-	struct kbd_struct * kbd;
+  int perm;
+  unsigned int console;
+  unsigned char ucval;
+  struct kbd_struct * kbd;
 
    console = 0;
-	/*
-	 * To have permissions to do most of the vt ioctls, we either have
-	 * to be the owner of the tty, or super-user.
-	 */
-	perm = 1;
-	kbd = kbd_table + console;
-	switch (cmd) {
-	case KIOCSOUND:
-		if (!perm)
-			return -EPERM;
-		if (arg)
-			arg = 1193180 / arg;
-		kd_mksound(arg, 0);
-		return 0;
-
-	case KDMKTONE:
-		if (!perm)
-			return -EPERM;
-	{
-		unsigned int ticks, count;
-
-		/*
-		 * Generate the tone for the appropriate number of ticks.
-		 * If the time is zero, turn off sound ourselves.
-		 */
-		ticks = HZ * ((arg >> 16) & 0xffff) / 1000;
-		count = ticks ? (arg & 0xffff) : 0;
-		if (count)
-			count = 1193180 / count;
-		kd_mksound(count, ticks);
-		return 0;
-	}
-
-	case KDGKBTYPE:
-		/*
-		 * this is naive.
-		 */
-		ucval = keyboard_type;
-		goto setchar;
-
-	case KDSETMODE:
-	case KDGETMODE:
-		return -EINVAL;
-
-	case KDSKBMODE:
-		if (!perm)
-			return -EPERM;
-		switch(arg) {
-		  case K_RAW:
-			kbd->kbdmode = VC_RAW;
-			break;
-		  case K_MEDIUMRAW:
-			kbd->kbdmode = VC_MEDIUMRAW;
-			break;
-		  case K_XLATE:
-			kbd->kbdmode = VC_XLATE;
-			compute_shiftstate();
-			break;
-		  case K_UNICODE:
-			kbd->kbdmode = VC_UNICODE;
-			compute_shiftstate();
-			break;
-		  default:
-			return -EINVAL;
-		}
-		return 0;
-
-	case KDGKBMODE:
-		ucval = ((kbd->kbdmode == VC_RAW) ? K_RAW :
-				 (kbd->kbdmode == VC_MEDIUMRAW) ? K_MEDIUMRAW :
-				 (kbd->kbdmode == VC_UNICODE) ? K_UNICODE :
-				 K_XLATE);
-		goto setint;
-
-	/* this could be folded into KDSKBMODE, but for compatibility
-	   reasons it is not so easy to fold KDGKBMETA into KDGKBMODE */
-	case KDSKBMETA:
-		switch(arg) {
-		  case K_METABIT:
-			clr_vc_kbd_mode(kbd, VC_META);
-			break;
-		  case K_ESCPREFIX:
-			set_vc_kbd_mode(kbd, VC_META);
-			break;
-		  default:
-			return -EINVAL;
-		}
-		return 0;
-
-	case KDGKBMETA:
-		ucval = (vc_kbd_mode(kbd, VC_META) ? K_ESCPREFIX : K_METABIT);
-	setint:
-		*(int *)arg = ucval;
-		return 0;
-
-	case KDGETKEYCODE:
-	case KDSETKEYCODE:
-		return do_kbkeycode_ioctl(cmd, (struct kbkeycode *)arg, perm);
-
-	case KDGKBENT:
-	case KDSKBENT:
-		return do_kdsk_ioctl(cmd, (struct kbentry *)arg, perm, kbd);
-
-	case KDGKBDIACR:
-	{
-		struct kbdiacrs *a = (struct kbdiacrs *)arg;
-		a->kb_cnt = accent_table_size;
-		memcpy( a->kbdiacr, accent_table, accent_table_size*sizeof(struct kbdiacr) );
-		return 0;
-	}
-
-	case KDSKBDIACR:
-	{
-		struct kbdiacrs *a = (struct kbdiacrs *)arg;
-		unsigned int ct;
-
-		if (!perm)
-			return -EPERM;
-		ct = a->kb_cnt;
-		if (ct >= MAX_DIACR)
-			return -EINVAL;
-		accent_table_size = ct;
-		memcpy(accent_table, a->kbdiacr, ct*sizeof(struct kbdiacr));
-		return 0;
-	}
-
-	/* the ioctls below read/set the flags usually shown in the leds */
-	/* don't use them - they will go away without warning */
-	case KDGKBLED:
-		ucval = kbd->ledflagstate | (kbd->default_ledflagstate << 4);
-		goto setchar;
-
-	case KDSKBLED:
-		if (!perm)
-			return -EPERM;
-		if (arg & ~0x77)
-			return -EINVAL;
-		kbd->ledflagstate = (arg & 7);
-		kbd->default_ledflagstate = ((arg >> 4) & 7);
-		set_leds();
-		return 0;
-
-	/* the ioctls below only set the lights, not the functions */
-	/* for those, see KDGKBLED and KDSKBLED above */
-	case KDGETLED:
-		ucval = getledstate();
-	setchar:
-		*(char*)arg = ucval;
+  /*
+   * To have permissions to do most of the vt ioctls, we either have
+   * to be the owner of the tty, or super-user.
+   */
+  perm = 1;
+  kbd = kbd_table + console;
+  switch (cmd) {
+  case KIOCSOUND:
+    if (!perm)
+      return -EPERM;
+    if (arg)
+      arg = 1193180 / arg;
+    kd_mksound(arg, 0);
+    return 0;
+
+  case KDMKTONE:
+    if (!perm)
+      return -EPERM;
+  {
+    unsigned int ticks, count;
+
+    /*
+     * Generate the tone for the appropriate number of ticks.
+     * If the time is zero, turn off sound ourselves.
+     */
+    ticks = HZ * ((arg >> 16) & 0xffff) / 1000;
+    count = ticks ? (arg & 0xffff) : 0;
+    if (count)
+      count = 1193180 / count;
+    kd_mksound(count, ticks);
+    return 0;
+  }
+
+  case KDGKBTYPE:
+    /*
+     * this is naive.
+     */
+    ucval = keyboard_type;
+    goto setchar;
+
+  case KDSETMODE:
+  case KDGETMODE:
+    return -EINVAL;
+
+  case KDSKBMODE:
+    if (!perm)
+      return -EPERM;
+    switch(arg) {
+      case K_RAW:
+      kbd->kbdmode = VC_RAW;
+      break;
+      case K_MEDIUMRAW:
+      kbd->kbdmode = VC_MEDIUMRAW;
+      break;
+      case K_XLATE:
+      kbd->kbdmode = VC_XLATE;
+      compute_shiftstate();
+      break;
+      case K_UNICODE:
+      kbd->kbdmode = VC_UNICODE;
+      compute_shiftstate();
+      break;
+      default:
+      return -EINVAL;
+    }
+    return 0;
+
+  case KDGKBMODE:
+    ucval = ((kbd->kbdmode == VC_RAW) ? K_RAW :
+         (kbd->kbdmode == VC_MEDIUMRAW) ? K_MEDIUMRAW :
+         (kbd->kbdmode == VC_UNICODE) ? K_UNICODE :
+         K_XLATE);
+    goto setint;
+
+  /* this could be folded into KDSKBMODE, but for compatibility
+     reasons it is not so easy to fold KDGKBMETA into KDGKBMODE */
+  case KDSKBMETA:
+    switch(arg) {
+      case K_METABIT:
+      clr_vc_kbd_mode(kbd, VC_META);
+      break;
+      case K_ESCPREFIX:
+      set_vc_kbd_mode(kbd, VC_META);
+      break;
+      default:
+      return -EINVAL;
+    }
+    return 0;
+
+  case KDGKBMETA:
+    ucval = (vc_kbd_mode(kbd, VC_META) ? K_ESCPREFIX : K_METABIT);
+  setint:
+    *(int *)arg = ucval;
+    return 0;
+
+  case KDGETKEYCODE:
+  case KDSETKEYCODE:
+    return do_kbkeycode_ioctl(cmd, (struct kbkeycode *)arg, perm);
+
+  case KDGKBENT:
+  case KDSKBENT:
+    return do_kdsk_ioctl(cmd, (struct kbentry *)arg, perm, kbd);
+
+  case KDGKBDIACR:
+  {
+    struct kbdiacrs *a = (struct kbdiacrs *)arg;
+    a->kb_cnt = accent_table_size;
+    memcpy( a->kbdiacr, accent_table, accent_table_size*sizeof(struct kbdiacr) );
+    return 0;
+  }
+
+  case KDSKBDIACR:
+  {
+    struct kbdiacrs *a = (struct kbdiacrs *)arg;
+    unsigned int ct;
+
+    if (!perm)
+      return -EPERM;
+    ct = a->kb_cnt;
+    if (ct >= MAX_DIACR)
+      return -EINVAL;
+    accent_table_size = ct;
+    memcpy(accent_table, a->kbdiacr, ct*sizeof(struct kbdiacr));
+    return 0;
+  }
+
+  /* the ioctls below read/set the flags usually shown in the leds */
+  /* don't use them - they will go away without warning */
+  case KDGKBLED:
+    ucval = kbd->ledflagstate | (kbd->default_ledflagstate << 4);
+    goto setchar;
+
+  case KDSKBLED:
+    if (!perm)
+      return -EPERM;
+    if (arg & ~0x77)
+      return -EINVAL;
+    kbd->ledflagstate = (arg & 7);
+    kbd->default_ledflagstate = ((arg >> 4) & 7);
+    set_leds();
+    return 0;
+
+  /* the ioctls below only set the lights, not the functions */
+  /* for those, see KDGKBLED and KDSKBLED above */
+  case KDGETLED:
+    ucval = getledstate();
+  setchar:
+    *(char*)arg = ucval;
       return 0;
 
-	case KDSETLED:
-		if (!perm)
-		  return -EPERM;
-		setledstate(kbd, arg);
-		return 0;
-
-	default:
-		return -EINVAL;
-	}
-}
+  case KDSETLED:
+    if (!perm)
+      return -EPERM;
+    setledstate(kbd, arg);
+    return 0;
+
+  default:
+    return -EINVAL;
+  }
+}
