add reboot as a synonym for reset
PATCH 1/1 add reboot as a synonym for reset
Add 'reboot' as a synonym for 'reset' at the u-boot command line.
This saves me confusion when switching back and forth between linux and u-boot about which command to use by making u-boot accept both.
--- common/cmd_boot.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
common/cmd_boot.c +6 -0
@@ -76,3 +76,9 @@ U_BOOT_CMD("reset - Perform RESET of the CPU\n" ,NULL ); + +U_BOOT_CMD ( + reboot,1 ,0 , do_reset, +"reboot - Perform RESET of the CPU\n" , +NULL +);
Signature · 1 line
1.5.4.3
PATCH 1/1 add reboot as a synonym for reset
Dear Andrew Dyer,
Quoted 1 line · In message <[email protected]> you wrote:
Add 'reboot' as a synonym for 'reset' at the u-boot command line.
I tend to reject this change, because I think it is actually wrong. 'reboot' and 'reset' are two different things - the former includes an ordered shut-down of running services while the latter just performs what the name says: a hardware reset.
This is a difference which some may consider small, but I think it is important enough not to confuse terminology.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de It's hard to make a program foolproof because fools are so ingenious.
PATCH 1/1 add reboot as a synonym for reset
Quoted 9 lines · Wolfgang Denk
Dear Andrew Dyer,
Quoted 1 line · In message <[email protected]> you wrote:
Add 'reboot' as a synonym for 'reset' at the u-boot command line.
I tend to reject this change, because I think it is actually wrong. 'reboot' and 'reset' are two different things - the former includes an ordered shut-down of running services while the latter just performs what the name says: a hardware reset.
I'm fine with your decision, it was just a convenience for me, so I'll keep it in my local tree, but I would ask in the context of u-boot where there are essentially no 'services' or state that needs to be saved, what's the real difference?
For a hypothetical do_reboot(), I suppose one could extract some of the code of do_bootm() (shut off interrupts, usb, maybe caches) into a common function, run an optional platform hook and then do_reset(), but it doesn't seem like it would make much difference for the vast majority of cases, once the hardware reset comes through.
Signature · 2 lines
Hardware, n.: The parts of a computer system that can be kicked.
PATCH 1/1 add reboot as a synonym for reset
Dear Andrew,
Quoted 5 lines · In message <[email protected]> you…
I'm fine with your decision, it was just a convenience for me, so I'll keep it in my local tree, but I would ask in the context of u-boot where there are essentially no 'services' or state that needs to be saved, what's the real difference?
For U-Boot,it makes no difference. The problem is with Linux, when you get used to using an incorrect or at least imprecise terminology. When I ask: "Is it OK to reset the server?" that is pretty different from "Is it OK to reboot the server?".
My motivation was purely educational :-)
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de ...when fits of creativity run strong, more than one programmer or writer has been known to abandon the desktop for the more spacious floor. - Fred Brooks, Jr.