Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nuttx-apps
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
f4grx
nuttx-apps
Commits
fd083ee9
Commit
fd083ee9
authored
9 years ago
by
Gregory Nutt
Browse files
Options
Downloads
Patches
Plain Diff
Revert "NSH: All nsh_output strings tagged with IOBJ so that they may be stored in FLASH on AVR"
This reverts commit
cb6a914d
.
parent
691bd07f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
nshlib/nsh.h
+23
-23
23 additions, 23 deletions
nshlib/nsh.h
nshlib/nsh_console.c
+15
-6
15 additions, 6 deletions
nshlib/nsh_console.c
nshlib/nsh_console.h
+1
-1
1 addition, 1 deletion
nshlib/nsh_console.h
nshlib/nsh_parse.c
+24
-24
24 additions, 24 deletions
nshlib/nsh_parse.c
with
63 additions
and
54 deletions
nshlib/nsh.h
+
23
−
23
View file @
fd083ee9
...
...
@@ -797,31 +797,31 @@ typedef CODE int (*nsh_direntry_handler_t)(FAR struct nsh_vtbl_s *vtbl,
* Public Data
****************************************************************************/
extern
const
IOBJ
char
g_nshgreeting
[];
extern
const
char
g_nshgreeting
[];
#if defined(CONFIG_NSH_TELNET_LOGIN) && defined(CONFIG_NSH_TELNET)
extern
const
IOBJ
char
g_telnetgreeting
[];
extern
const
IOBJ
char
g_userprompt
[];
extern
const
IOBJ
char
g_passwordprompt
[];
extern
const
IOBJ
char
g_loginsuccess
[];
extern
const
IOBJ
char
g_badcredentials
[];
extern
const
IOBJ
char
g_loginfailure
[];
#endif
extern
const
IOBJ
char
g_nshprompt
[];
extern
const
IOBJ
char
g_nshsyntax
[];
extern
const
IOBJ
char
g_fmtargrequired
[];
extern
const
IOBJ
char
g_fmtnomatching
[];
extern
const
IOBJ
char
g_fmtarginvalid
[];
extern
const
IOBJ
char
g_fmtargrange
[];
extern
const
IOBJ
char
g_fmtcmdnotfound
[];
extern
const
IOBJ
char
g_fmtnosuch
[];
extern
const
IOBJ
char
g_fmttoomanyargs
[];
extern
const
IOBJ
char
g_fmtdeepnesting
[];
extern
const
IOBJ
char
g_fmtcontext
[];
extern
const
IOBJ
char
g_fmtcmdfailed
[];
extern
const
IOBJ
char
g_fmtcmdoutofmemory
[];
extern
const
IOBJ
char
g_fmtinternalerror
[];
extern
const
char
g_telnetgreeting
[];
extern
const
char
g_userprompt
[];
extern
const
char
g_passwordprompt
[];
extern
const
char
g_loginsuccess
[];
extern
const
char
g_badcredentials
[];
extern
const
char
g_loginfailure
[];
#endif
extern
const
char
g_nshprompt
[];
extern
const
char
g_nshsyntax
[];
extern
const
char
g_fmtargrequired
[];
extern
const
char
g_fmtnomatching
[];
extern
const
char
g_fmtarginvalid
[];
extern
const
char
g_fmtargrange
[];
extern
const
char
g_fmtcmdnotfound
[];
extern
const
char
g_fmtnosuch
[];
extern
const
char
g_fmttoomanyargs
[];
extern
const
char
g_fmtdeepnesting
[];
extern
const
char
g_fmtcontext
[];
extern
const
char
g_fmtcmdfailed
[];
extern
const
char
g_fmtcmdoutofmemory
[];
extern
const
char
g_fmtinternalerror
[];
#ifndef CONFIG_DISABLE_SIGNALS
extern
const
IOBJ
char
g_fmtsignalrecvd
[];
extern
const
char
g_fmtsignalrecvd
[];
#endif
/****************************************************************************
...
...
This diff is collapsed.
Click to expand it.
nshlib/nsh_console.c
+
15
−
6
View file @
fd083ee9
...
...
@@ -53,6 +53,10 @@
#include
"nsh.h"
#include
"nsh_console.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/****************************************************************************
* Private Types
****************************************************************************/
...
...
@@ -89,6 +93,14 @@ static void nsh_consoleundirect(FAR struct nsh_vtbl_s *vtbl,
static
void
nsh_consoleexit
(
FAR
struct
nsh_vtbl_s
*
vtbl
,
int
exitstatus
)
noreturn_function
;
/****************************************************************************
* Private Data
****************************************************************************/
/****************************************************************************
* Public Data
****************************************************************************/
/****************************************************************************
* Private Functions
****************************************************************************/
...
...
@@ -161,8 +173,7 @@ static void nsh_closeifnotclosed(struct console_stdio_s *pstate)
*
****************************************************************************/
static
ssize_t
nsh_consolewrite
(
FAR
struct
nsh_vtbl_s
*
vtbl
,
FAR
const
void
*
buffer
,
size_t
nbytes
)
static
ssize_t
nsh_consolewrite
(
FAR
struct
nsh_vtbl_s
*
vtbl
,
FAR
const
void
*
buffer
,
size_t
nbytes
)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR
struct
console_stdio_s
*
pstate
=
(
FAR
struct
console_stdio_s
*
)
vtbl
;
...
...
@@ -203,7 +214,7 @@ static ssize_t nsh_consolewrite(FAR struct nsh_vtbl_s *vtbl,
****************************************************************************/
static
int
nsh_consoleoutput
(
FAR
struct
nsh_vtbl_s
*
vtbl
,
FAR
const
IPTR
char
*
fmt
,
...)
FAR
const
char
*
fmt
,
...)
{
#if CONFIG_NFILE_DESCRIPTORS > 0
FAR
struct
console_stdio_s
*
pstate
=
(
FAR
struct
console_stdio_s
*
)
vtbl
;
...
...
@@ -431,9 +442,7 @@ static void nsh_consoleexit(FAR struct nsh_vtbl_s *vtbl, int exitstatus)
FAR
struct
console_stdio_s
*
nsh_newconsole
(
void
)
{
FAR
struct
console_stdio_s
*
pstate
=
(
FAR
struct
console_stdio_s
*
)
zalloc
(
sizeof
(
struct
console_stdio_s
));
struct
console_stdio_s
*
pstate
=
(
struct
console_stdio_s
*
)
zalloc
(
sizeof
(
struct
console_stdio_s
));
if
(
pstate
)
{
/* Initialize the call table */
...
...
This diff is collapsed.
Click to expand it.
nshlib/nsh_console.h
+
1
−
1
View file @
fd083ee9
...
...
@@ -116,7 +116,7 @@ struct nsh_vtbl_s
#endif
ssize_t
(
*
write
)(
FAR
struct
nsh_vtbl_s
*
vtbl
,
FAR
const
void
*
buffer
,
size_t
nbytes
);
int
(
*
output
)(
FAR
struct
nsh_vtbl_s
*
vtbl
,
FAR
const
IPTR
char
*
fmt
,
...);
int
(
*
output
)(
FAR
struct
nsh_vtbl_s
*
vtbl
,
FAR
const
char
*
fmt
,
...);
FAR
char
*
(
*
linebuffer
)(
FAR
struct
nsh_vtbl_s
*
vtbl
);
#if CONFIG_NFILE_DESCRIPTORS > 0
void
(
*
redirect
)(
FAR
struct
nsh_vtbl_s
*
vtbl
,
int
fd
,
FAR
uint8_t
*
save
);
...
...
This diff is collapsed.
Click to expand it.
nshlib/nsh_parse.c
+
24
−
24
View file @
fd083ee9
...
...
@@ -219,47 +219,47 @@ static const char g_nullstring[] = "";
*/
#if CONFIG_VERSION_MAJOR != 0 || CONFIG_VERSION_MINOR != 0
const
IOBJ
char
g_nshgreeting
[]
=
"
\n
NuttShell (NSH) NuttX-"
CONFIG_VERSION_STRING
"
\n
"
;
const
char
g_nshgreeting
[]
=
"
\n
NuttShell (NSH) NuttX-"
CONFIG_VERSION_STRING
"
\n
"
;
#else
const
IOBJ
char
g_nshgreeting
[]
=
"
\n
NuttShell (NSH)
\n
"
;
const
char
g_nshgreeting
[]
=
"
\n
NuttShell (NSH)
\n
"
;
#endif
/* Telnet login prompts */
#if defined(CONFIG_NSH_TELNET_LOGIN) && defined(CONFIG_NSH_TELNET)
const
IOBJ
char
g_telnetgreeting
[]
=
"
\n
Welcome to NuttShell(NSH) Telnet Server...
\n
"
;
const
IOBJ
char
g_userprompt
[]
=
"login: "
;
const
IOBJ
char
g_passwordprompt
[]
=
"password: "
;
const
IOBJ
char
g_loginsuccess
[]
=
"
\n
User Logged-in!
\n
"
;
const
IOBJ
char
g_badcredentials
[]
=
"
\n
Invalid username or password
\n
"
;
const
IOBJ
char
g_loginfailure
[]
=
"Login failed!
\n
"
;
const
char
g_telnetgreeting
[]
=
"
\n
Welcome to NuttShell(NSH) Telnet Server...
\n
"
;
const
char
g_userprompt
[]
=
"login: "
;
const
char
g_passwordprompt
[]
=
"password: "
;
const
char
g_loginsuccess
[]
=
"
\n
User Logged-in!
\n
"
;
const
char
g_badcredentials
[]
=
"
\n
Invalid username or password
\n
"
;
const
char
g_loginfailure
[]
=
"Login failed!
\n
"
;
#endif
/* The NSH prompt */
const
IOBJ
char
g_nshprompt
[]
=
"nsh> "
;
const
char
g_nshprompt
[]
=
"nsh> "
;
/* Common, message formats */
const
IOBJ
char
g_nshsyntax
[]
=
"nsh: %s: syntax error
\n
"
;
const
IOBJ
char
g_fmtargrequired
[]
=
"nsh: %s: missing required argument(s)
\n
"
;
const
IOBJ
char
g_fmtnomatching
[]
=
"nsh: %s: no matching %s
\n
"
;
const
IOBJ
char
g_fmtarginvalid
[]
=
"nsh: %s: argument invalid
\n
"
;
const
IOBJ
char
g_fmtargrange
[]
=
"nsh: %s: value out of range
\n
"
;
const
IOBJ
char
g_fmtcmdnotfound
[]
=
"nsh: %s: command not found
\n
"
;
const
IOBJ
char
g_fmtnosuch
[]
=
"nsh: %s: no such %s: %s
\n
"
;
const
IOBJ
char
g_fmttoomanyargs
[]
=
"nsh: %s: too many arguments
\n
"
;
const
IOBJ
char
g_fmtdeepnesting
[]
=
"nsh: %s: nesting too deep
\n
"
;
const
IOBJ
char
g_fmtcontext
[]
=
"nsh: %s: not valid in this context
\n
"
;
const
char
g_nshsyntax
[]
=
"nsh: %s: syntax error
\n
"
;
const
char
g_fmtargrequired
[]
=
"nsh: %s: missing required argument(s)
\n
"
;
const
char
g_fmtnomatching
[]
=
"nsh: %s: no matching %s
\n
"
;
const
char
g_fmtarginvalid
[]
=
"nsh: %s: argument invalid
\n
"
;
const
char
g_fmtargrange
[]
=
"nsh: %s: value out of range
\n
"
;
const
char
g_fmtcmdnotfound
[]
=
"nsh: %s: command not found
\n
"
;
const
char
g_fmtnosuch
[]
=
"nsh: %s: no such %s: %s
\n
"
;
const
char
g_fmttoomanyargs
[]
=
"nsh: %s: too many arguments
\n
"
;
const
char
g_fmtdeepnesting
[]
=
"nsh: %s: nesting too deep
\n
"
;
const
char
g_fmtcontext
[]
=
"nsh: %s: not valid in this context
\n
"
;
#ifdef CONFIG_NSH_STRERROR
const
IOBJ
char
g_fmtcmdfailed
[]
=
"nsh: %s: %s failed: %s
\n
"
;
const
char
g_fmtcmdfailed
[]
=
"nsh: %s: %s failed: %s
\n
"
;
#else
const
IOBJ
char
g_fmtcmdfailed
[]
=
"nsh: %s: %s failed: %d
\n
"
;
const
char
g_fmtcmdfailed
[]
=
"nsh: %s: %s failed: %d
\n
"
;
#endif
const
IOBJ
char
g_fmtcmdoutofmemory
[]
=
"nsh: %s: out of memory
\n
"
;
const
IOBJ
char
g_fmtinternalerror
[]
=
"nsh: %s: Internal error
\n
"
;
const
char
g_fmtcmdoutofmemory
[]
=
"nsh: %s: out of memory
\n
"
;
const
char
g_fmtinternalerror
[]
=
"nsh: %s: Internal error
\n
"
;
#ifndef CONFIG_DISABLE_SIGNALS
const
IOBJ
char
g_fmtsignalrecvd
[]
=
"nsh: %s: Interrupted by signal
\n
"
;
const
char
g_fmtsignalrecvd
[]
=
"nsh: %s: Interrupted by signal
\n
"
;
#endif
/****************************************************************************
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment