[PATCH 07/10] ratp: implement ping as a standard ratp command
Aleksander Morgado
aleksander at aleksander.es
Tue Feb 6 08:51:59 PST 2018
On Tue, Feb 6, 2018 at 10:33 AM, Sascha Hauer <s.hauer at pengutronix.de> wrote:
> On Fri, Feb 02, 2018 at 12:14:39PM +0100, Aleksander Morgado wrote:
>> Signed-off-by: Aleksander Morgado <aleksander at aleksander.es>
>> ---
>> commands/Makefile | 1 +
>> commands/ratp-ping.c | 38 ++++++++++++++++++++++++++++++++++++++
>> common/ratp.c | 27 ---------------------------
>
> Can we put the ratp commands to a separate directory like
> common/ratp/commands/ or similar?
> There doesn't seem to be very much code sharing between the regular
> commands and their ratp correspondents. Most good commands are written
> in the way that the functionality is in common code outside the command
> file itself anyway.
>
I actually did that originally, but then implemented "md" for RATP and
decided I could reuse part of the code doing the memory dump. But then
no other command I implemented shared anything with the console
counterpart... so yes, totally agree changing that would be much
better. I did think of moving them to commands/ratp/* instead of
common/ratp/commands/* though. Why do you suggest to have them in
common/? Shouldn't they be closer to the console commands in the
hierarchy?
--
Aleksander
https://aleksander.es
More information about the barebox
mailing list