summaryrefslogtreecommitdiff
path: root/apps/nshlib/nsh_serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/nshlib/nsh_serial.c')
-rw-r--r--apps/nshlib/nsh_serial.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/nshlib/nsh_serial.c b/apps/nshlib/nsh_serial.c
index ccb25477d..43b5e0f53 100644
--- a/apps/nshlib/nsh_serial.c
+++ b/apps/nshlib/nsh_serial.c
@@ -1,8 +1,8 @@
/****************************************************************************
* apps/nshlib/nsh_serial.c
*
- * Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
- * Author: Gregory Nutt <spudmonkey@racsa.co.cr>
+ * Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -474,6 +474,14 @@ int nsh_consolemain(int argc, char *argv[])
FAR struct serial_s *pstate = nsh_allocstruct();
DEBUGASSERT(pstate);
+ /* If we are using a USB console, then we will have to wait for the USB to
+ * be connected/
+ */
+
+#ifdef HAVE_USB_CONSOLE
+ DEBUGASSERT(nsh_usbconsole() == OK);
+#endif
+
/* Present a greeting */
fputs(g_nshgreeting, pstate->ss_outstream);