Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/luna68k/stand/boot Don't call internal cngetc() and...



details:   https://anonhg.NetBSD.org/src/rev/611cb5c3094a
branches:  trunk
changeset: 784155:611cb5c3094a
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Jan 20 07:32:45 2013 +0000

description:
Don't call internal cngetc() and cnputc() directly.
Use public getchar() and putchar() instead.

diffstat:

 sys/arch/luna68k/stand/boot/getline.c |  15 +++++++--------
 sys/arch/luna68k/stand/boot/scsi.c    |   4 ++--
 2 files changed, 9 insertions(+), 10 deletions(-)

diffs (63 lines):

diff -r 5491db244e3f -r 611cb5c3094a sys/arch/luna68k/stand/boot/getline.c
--- a/sys/arch/luna68k/stand/boot/getline.c     Sun Jan 20 03:40:55 2013 +0000
+++ b/sys/arch/luna68k/stand/boot/getline.c     Sun Jan 20 07:32:45 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: getline.c,v 1.1 2013/01/05 17:44:24 tsutsui Exp $      */
+/*     $NetBSD: getline.c,v 1.2 2013/01/20 07:32:45 tsutsui Exp $      */
 
 /*
  * Copyright (c) 1992 OMRON Corporation.
@@ -87,29 +87,28 @@
        printf("%s", prompt);
 
        for(;;) {
-               c = cngetc() & 0x7F;
+               c = getchar() & 0x7F;
 
                switch (c) {
                case 0x0a:
                case 0x0d:
-                       cnputc('\r');
-                       cnputc('\n');
+                       putchar('\n');
                        *p = '\0';
                        goto outloop;
 
                case 0x08:
                case 0x7f:
                        if (p > buff) {
-                               cnputc(0x08);
-                               cnputc(' ');
-                               cnputc(0x08);
+                               putchar(0x08);
+                               putchar(' ');
+                               putchar(0x08);
                                p--;
                        }
                        break;
 
                default:
                        *p++ = c;
-                       cnputc(c);
+                       putchar(c);
                        break;
                }
        }
diff -r 5491db244e3f -r 611cb5c3094a sys/arch/luna68k/stand/boot/scsi.c
--- a/sys/arch/luna68k/stand/boot/scsi.c        Sun Jan 20 03:40:55 2013 +0000
+++ b/sys/arch/luna68k/stand/boot/scsi.c        Sun Jan 20 07:32:45 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: scsi.c,v 1.1 2013/01/05 17:44:24 tsutsui Exp $ */
+/*     $NetBSD: scsi.c,v 1.2 2013/01/20 07:32:45 tsutsui Exp $ */
 
 /*
  * Copyright (c) 1992 OMRON Corporation.
@@ -174,7 +174,7 @@
                while (i == 0) {
                        printf("Do you really want to format SCSI %d device ? [y/n]: ",
                               scsi_device);
-                       i = cngetc();
+                       i = getchar();
                        printf("\n");
                        if ((i != 'y') && (i != 'Y') && (i != 'n') && (i != 'N'))
                                i = 0;



Home | Main Index | Thread Index | Old Index