Donny9 commented on PR #3057:
URL: https://github.com/apache/nuttx-apps/pull/3057#issuecomment-2816693000

   > Thanks @Donny9 :-) My remarks below (marked as RC until discussion / vote 
is resolved on the mailing list):
   > 
   > * Is it really necessary to remove built-in nsh/dd? What are the benefits 
over breaking build compatibility with os and apps?
   
   @cederom Firstly, we need to ensure that only one implementation of dd is 
retained in NuttX, because having two implementations would increase complexity 
for developers in terms of choosing which one to use. Moreover, if there are 
two versions, it could lead to misalignment in dd functionality, resulting in 
more maintenance work and complaints.
   
   I understand that the original reason for introducing the built-app version 
of dd was that it allowed for independent stack space settings, making it 
convenient to observe the stack consumption by the file system(If the stack 
consumed by dd is excessively large, it will result in a larger stack for nsh, 
thereby reducing the available memory for the system. Therefore, a built-app 
approach would be preferable).
   
   In reality, there is no significant difference for developers between the 
built-app dd and the command-line dd. Furthermore, there are indeed many other 
commands in the system that exist as built-apps, such as tar, ssh, scp, sb, rb, 
etc.
   
   >  It is impossible to keep both (i.e. nsh/dd as minimalistic and 
apps/system/dd as fully featured) as exclusive selections?
   > Why not extend nsh/dd with new features while keep the minimal as default?
   
   As mentioned above, having two implementations of dd is highly undesirable. 
As for the extent to which the simplified version of dd lacks functionality 
compared to the full version, it is difficult to gauge.
   
   >  Aside question did NuttX consider `/usr/bin/dd` versus built-in `dd` 
(something like built-in `time` versus `/usr/bin/time` in Unix)?
   
   In my opinion, their main differences are as follows: 
   1. The startup methods differ. In the former case, after parsing via 
nsh_parse, dd is executed directly through a function call. In the latter case, 
a new task is initiated via posix_spawn, and the corresponding executable 
binary is executed to accomplish the functionality of dd. 
   2. The execution contexts differ. The former operates within the context of 
nsh, while the latter runs as an independent new task.
   
   
   > * Documentation needs an update in either case :-P
   
   Done
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to