Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Mar 2018 03:54:38 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r330788 - in head/stand/mips/beri: boot2 common loader
Message-ID:  <201803120354.w2C3scFa097651@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Mon Mar 12 03:54:38 2018
New Revision: 330788
URL: https://svnweb.freebsd.org/changeset/base/330788

Log:
  beri loader: Replace getc/putc with beri_ prefixed versions
  
  This matches a convention that we use, at least in ubldr, to prefix
  getc/putc with a loader-specific prefix to avoid collisions. This was
  encountered while trying to build the beri loader with MK_LOADER_LUA=yes.
  
  No objection from:	brooks
  Reported by:	emaste

Modified:
  head/stand/mips/beri/boot2/boot2.c
  head/stand/mips/beri/common/altera_jtag_uart.c
  head/stand/mips/beri/common/cons.h
  head/stand/mips/beri/loader/beri_console.c

Modified: head/stand/mips/beri/boot2/boot2.c
==============================================================================
--- head/stand/mips/beri/boot2/boot2.c	Mon Mar 12 01:41:16 2018	(r330787)
+++ head/stand/mips/beri/boot2/boot2.c	Mon Mar 12 03:54:38 2018	(r330788)
@@ -627,7 +627,7 @@ static int
 xputc(int c)
 {
     if (ioctrl & IO_KEYBOARD)
-	putc(c);
+	beri_putc(c);
 #if 0
     if (ioctrl & IO_SERIAL)
 	sio_putc(c);
@@ -642,7 +642,7 @@ xgetc(int fn)
 	return 0;
     for (;;) {
 	if (ioctrl & IO_KEYBOARD && keyhit(0))
-	    return fn ? 1 : getc();
+	    return fn ? 1 : beri_getc();
 #if 0
 	if (ioctrl & IO_SERIAL && sio_ischar())
 	    return fn ? 1 : sio_getc();

Modified: head/stand/mips/beri/common/altera_jtag_uart.c
==============================================================================
--- head/stand/mips/beri/common/altera_jtag_uart.c	Mon Mar 12 01:41:16 2018	(r330787)
+++ head/stand/mips/beri/common/altera_jtag_uart.c	Mon Mar 12 03:54:38 2018	(r330788)
@@ -159,7 +159,7 @@ keyhit(int seconds)
 }
 
 int
-getc(void)
+beri_getc(void)
 {
 
 	while (!(uart_readable()));
@@ -168,7 +168,7 @@ getc(void)
 }
 
 void
-putc(int ch)
+beri_putc(int ch)
 {
 
 	uart_data_write(ch);

Modified: head/stand/mips/beri/common/cons.h
==============================================================================
--- head/stand/mips/beri/common/cons.h	Mon Mar 12 01:41:16 2018	(r330787)
+++ head/stand/mips/beri/common/cons.h	Mon Mar 12 03:54:38 2018	(r330788)
@@ -33,8 +33,8 @@
 #ifndef _CONS_H_
 #define	_CONS_H_
 
-int	getc(void);
+int	beri_getc(void);
 int	keyhit(int);
-void	putc(int);
+void	beri_putc(int);
 
 #endif

Modified: head/stand/mips/beri/loader/beri_console.c
==============================================================================
--- head/stand/mips/beri/loader/beri_console.c	Mon Mar 12 01:41:16 2018	(r330787)
+++ head/stand/mips/beri/loader/beri_console.c	Mon Mar 12 03:54:38 2018	(r330788)
@@ -72,14 +72,14 @@ static void
 c_out(int c)
 {
 
-	putc(c);
+	beri_putc(c);
 }
 
 static int
 c_in(void)
 {
 
-	return (getc());
+	return (beri_getc());
 }
 
 static int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803120354.w2C3scFa097651>