Skip to content

Commit 6379e53

Browse files
tmediccicederom
authored andcommitted
system/irtest: Set irtest command line size to CONFIG_LINE_MAX
Let `irtest` command line size be equal to CONFIG_LINE_MAX so that bigger (or smaller) commands can be set. Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
1 parent 9b6b760 commit 6379e53

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

system/irtest/main.cxx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,17 @@
2424
* Included Files
2525
****************************************************************************/
2626

27+
#include <nuttx/config.h>
28+
2729
#include <stdio.h>
2830

2931
#include "system/readline.h"
3032
#include "cmd.hpp"
3133

34+
#ifndef CONFIG_LINE_MAX
35+
# define CONFIG_LINE_MAX 512
36+
#endif
37+
3238
/****************************************************************************
3339
* Private Functions
3440
****************************************************************************/
@@ -48,7 +54,7 @@ extern "C"
4854
{
4955
int main(int argc, char *argv[])
5056
{
51-
char cmdline[512];
57+
char cmdline[CONFIG_LINE_MAX];
5258

5359
init_device();
5460

0 commit comments

Comments
 (0)