aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-07-15 17:47:46 +1000
committerNikunj A Dadhania <nikunj@linux.vnet.ibm.com>2014-10-29 16:17:05 +0530
commit4ca13ddf7f3fb12cf6ba22255ea07ee3e4c7e9b2 (patch)
treed2464bfb313b05003d486eb47bb002d907c3e933
parentb95d82520211c9f403594ff174de47db9eef8562 (diff)
downloadSLOF-4ca13ddf7f3fb12cf6ba22255ea07ee3e4c7e9b2.zip
SLOF-4ca13ddf7f3fb12cf6ba22255ea07ee3e4c7e9b2.tar.gz
SLOF-4ca13ddf7f3fb12cf6ba22255ea07ee3e4c7e9b2.tar.bz2
net-snk: Remove printk() in favor of printf()
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r--clients/net-snk/include/kernel.h2
-rw-r--r--clients/net-snk/kernel/systemcall.c13
-rw-r--r--clients/net-snk/oflib/of.c2
-rw-r--r--clients/net-snk/oflib/rtas.c12
-rw-r--r--other-licence/x86emu/x86emu_changes.diff19
5 files changed, 14 insertions, 34 deletions
diff --git a/clients/net-snk/include/kernel.h b/clients/net-snk/include/kernel.h
index 1e9a1b1..847f296 100644
--- a/clients/net-snk/include/kernel.h
+++ b/clients/net-snk/include/kernel.h
@@ -19,8 +19,6 @@
#include <string.h>
#include <of.h>
-int printk(const char *, ...);
-
uint64_t get_time(void);
int getchar(void);
diff --git a/clients/net-snk/kernel/systemcall.c b/clients/net-snk/kernel/systemcall.c
index 1cc4cdc..055a3f8 100644
--- a/clients/net-snk/kernel/systemcall.c
+++ b/clients/net-snk/kernel/systemcall.c
@@ -22,7 +22,6 @@ extern int vsprintf(char *, const char *, va_list);
extern void _exit(int status);
void exit(int status);
-int printk(const char*, ...);
int open(const char* name, int flags)
{
@@ -35,7 +34,7 @@ int open(const char* name, int flags)
}
}
if (fd == FILEIO_MAX) {
- printk ("Can not open \"%s\" because file descriptor list is full\n", name);
+ printf("Can not open \"%s\" because file descriptor list is full\n", name);
/* there is no free file descriptor available */
return -2;
}
@@ -72,23 +71,23 @@ int socket(int domain, int type, int proto, char *mac_addr)
}
}
if (fd == FILEIO_MAX) {
- printk ("Can not open socket, file descriptor list is full\n");
+ printf("Can not open socket, file descriptor list is full\n");
/* there is no free file descriptor available */
return -2;
}
fd_array[fd].ih = of_interpret_1("my-parent", tmpbuf);
if (fd_array[fd].ih == 0) {
- printk ("Can not open socket, no parent instance\n");
+ printf("Can not open socket, no parent instance\n");
return -1;
}
ph = of_instance_to_package(fd_array[fd].ih);
if (ph == -1) {
- printk ("Can not open socket, no parent package\n");
+ printf("Can not open socket, no parent package\n");
return -1;
}
if (of_get_mac(ph, mac_addr) < 0) {
- printk ("Can not open socket, no MAC address\n");
+ printf("Can not open socket, no MAC address\n");
return -1;
}
fd_array[fd].type = FILEIO_TYPE_SOCKET;
@@ -176,7 +175,7 @@ void exit(int status)
_exit(status);
}
-int printk(const char* fmt, ...)
+int printf(const char* fmt, ...)
{
int count;
va_list ap;
diff --git a/clients/net-snk/oflib/of.c b/clients/net-snk/oflib/of.c
index 9133140..2e85e34 100644
--- a/clients/net-snk/oflib/of.c
+++ b/clients/net-snk/oflib/of.c
@@ -377,7 +377,7 @@ bootmsg_cp(short id)
#define DEBUG_TRANSLATE_ADDRESS 0
#if DEBUG_TRANSLATE_ADDRESS != 0
-#define DEBUG_TR(str...) printk(str)
+#define DEBUG_TR(str...) printf(str)
#else
#define DEBUG_TR(str...)
#endif
diff --git a/clients/net-snk/oflib/rtas.c b/clients/net-snk/oflib/rtas.c
index 88d49c6..c514c70 100644
--- a/clients/net-snk/oflib/rtas.c
+++ b/clients/net-snk/oflib/rtas.c
@@ -100,7 +100,7 @@ instantiate_rtas(void)
_rtas.dev = of_finddevice("/rtas");
if ((long) _rtas.dev < 0) {
- printk("\nCould not open /rtas\n");
+ printf("\nCould not open /rtas\n");
return -1;
}
@@ -108,7 +108,7 @@ instantiate_rtas(void)
sizeof(_rtas.rtas_size));
if (_rtas.rtas_size <= 0) {
- printk("\nSize of rtas (%x) too small to make sense\n",
+ printf("\nSize of rtas (%x) too small to make sense\n",
_rtas.rtas_size);
return -1;
}
@@ -116,14 +116,14 @@ instantiate_rtas(void)
rtas_mem_space = (long long *) malloc_aligned(_rtas.rtas_size, 0x100);
if (!rtas_mem_space) {
- printk("\nFailed to allocated memory for RTAS\n");
+ printf("\nFailed to allocated memory for RTAS\n");
return -1;
}
ihandle = of_open("/rtas");
if ((long) ihandle < 0) {
- printk("Could not open /rtas\n");
+ printf("Could not open /rtas\n");
return -1;
}
@@ -133,11 +133,11 @@ instantiate_rtas(void)
> 0) {
_rtas.rtas_start = rtas_mem_space;
} else {
- printk("instantiate-rtas failed\n");
+ printf("instantiate-rtas failed\n");
return -1;
}
#if 0
- printk("\ninstantiate-rtas at %x size %x entry %x\n",
+ printf("\ninstantiate-rtas at %x size %x entry %x\n",
_rtas.rtas_start, _rtas.rtas_size, _rtas.rtas_entry);
#endif
return 0;
diff --git a/other-licence/x86emu/x86emu_changes.diff b/other-licence/x86emu/x86emu_changes.diff
index aa1a359..b6f931f 100644
--- a/other-licence/x86emu/x86emu_changes.diff
+++ b/other-licence/x86emu/x86emu_changes.diff
@@ -844,15 +844,6 @@ diff -u -u -r1.1 -r1.4
u16 saved_ip;
u16 saved_cs;
int enc_pos;
-@@ -366,7 +370,7 @@
-
- /* Function to log information at runtime */
-
--//void printk(const char *fmt, ...);
-+void printk(const char *fmt, ...);
-
- #ifdef __cplusplus
- } /* End of "C" linkage for C++ */
Index: include/x86emu/x86emu.h
===================================================================
RCS file: /cvs/osdf/cvs/host/other-licence/x86emu/include/x86emu/x86emu.h,v
@@ -861,18 +852,10 @@ retrieving revision 1.3
diff -u -u -r1.1 -r1.3
--- include/x86emu/x86emu.h 7 Sep 2007 10:01:21 -0000 1.1
+++ include/x86emu/x86emu.h 19 Oct 2007 08:42:15 -0000 1.3
-@@ -42,14 +42,6 @@
+@@ -42,6 +42,6 @@
#ifndef __X86EMU_X86EMU_H
#define __X86EMU_X86EMU_H
--/* FIXME: undefine printk for the moment */
--#ifdef LINUXBIOS_VERSION
--#include <console.h>
--#define printk(x...) printk(BIOS_DEBUG, x)
--#else
--#define printk printf
--#endif
--
#ifdef SCITECH
#include "scitech.h"
#define X86API _ASMAPI