Skip to content

[BREAKING] system/dd: using system dd to instead nsh dd, avoid duplicate code #3057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion nshlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ if(CONFIG_NSH_LIBRARY)
nsh_system.c
nsh_command.c
nsh_fscmds.c
nsh_ddcmd.c
nsh_proccmds.c
nsh_mmcmds.c
nsh_timcmds.c
Expand Down
9 changes: 0 additions & 9 deletions nshlib/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,6 @@ config NSH_DISABLE_DATE
bool "Disable date"
default DEFAULT_SMALL || !RTC

config NSH_DISABLE_DD
bool "Disable dd"
default DEFAULT_SMALL

config NSH_DISABLE_DF
bool "Disable df"
default DEFAULT_SMALL
Expand Down Expand Up @@ -787,11 +783,6 @@ config NSH_VARS
variables variables
============== =========================== ===========================

config NSH_CMDOPT_DD_STATS
bool "dd: Support transfer statistics"
default n
depends on !NSH_DISABLE_DD

config NSH_CODECS_BUFSIZE
int "File buffer size used by CODEC commands"
default 128
Expand Down
2 changes: 1 addition & 1 deletion nshlib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ include $(APPDIR)/Make.defs
# NSH Library

CSRCS = nsh_init.c nsh_parse.c nsh_console.c nsh_script.c nsh_system.c
CSRCS += nsh_command.c nsh_fscmds.c nsh_ddcmd.c nsh_proccmds.c nsh_mmcmds.c
CSRCS += nsh_command.c nsh_fscmds.c nsh_proccmds.c nsh_mmcmds.c
CSRCS += nsh_timcmds.c nsh_envcmds.c nsh_syscmds.c nsh_dbgcmds.c nsh_prompt.c

CSRCS += nsh_session.c
Expand Down
3 changes: 0 additions & 3 deletions nshlib/nsh.h
Original file line number Diff line number Diff line change
Expand Up @@ -975,9 +975,6 @@ int cmd_irqinfo(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv);
#ifndef CONFIG_NSH_DISABLE_CMP
int cmd_cmp(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv);
#endif
#ifndef CONFIG_NSH_DISABLE_DD
int cmd_dd(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv);
#endif
#ifndef CONFIG_NSH_DISABLE_HEXDUMP
int cmd_hexdump(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv);
#endif
Expand Down
6 changes: 0 additions & 6 deletions nshlib/nsh_command.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,6 @@ static const struct cmdmap_s g_cmdmap[] =
1, 4, "[-s \"MMM DD HH:MM:SS YYYY\"] [-u] [+format]"),
#endif

#ifndef CONFIG_NSH_DISABLE_DD
CMD_MAP("dd", cmd_dd, 1, 7,
"if=<infile> of=<outfile> [bs=<sectsize>] [count=<sectors>] "
"[skip=<sectors>] [seek=<sectors>] [verify] [conv=<nocreat,notrunc>]"),
#endif

#if defined(CONFIG_NET) && defined(CONFIG_NET_ROUTE) && !defined(CONFIG_NSH_DISABLE_DELROUTE)
CMD_MAP("delroute", cmd_delroute, 2, 3, "<target> [<netmask>]"),
#endif
Expand Down
Loading
Loading