*/
#include <common.h>
-
-#ifdef CONFIG_NETCONSOLE
-
#include <command.h>
-#include <devices.h>
+#include <stdio_dev.h>
#include <net.h>
DECLARE_GLOBAL_DATA_PTR;
eth_halt ();
}
-int nc_start (void)
+static int nc_start(void)
{
int netmask, our_ip;
return 0;
}
-void nc_putc (char c)
+static void nc_putc(char c)
{
if (output_recursion)
return;
output_recursion = 0;
}
-void nc_puts (const char *s)
+static void nc_puts(const char *s)
{
int len;
output_recursion = 0;
}
-int nc_getc (void)
+static int nc_getc(void)
{
uchar c;
return c;
}
-int nc_tstc (void)
+static int nc_tstc(void)
{
struct eth_device *eth;
int drv_nc_init (void)
{
- device_t dev;
+ struct stdio_dev dev;
int rc;
memset (&dev, 0, sizeof (dev));
dev.getc = nc_getc;
dev.tstc = nc_tstc;
- rc = device_register (&dev);
+ rc = stdio_register (&dev);
return (rc == 0) ? 1 : rc;
}
-
-#endif /* CONFIG_NETCONSOLE */