All, I'm seeing some odd behavior in newtmgr and wonder if someone could clarify.
First, as I mentioned yesterday, newtmgr barfs if a command expects arguments
and they are not provided. It just panics. That being said, when I DO provide
the proper arguments, some commands don't actually do anything. For instance,
newtmgr -c myconn image list just hangs forever. I suspect that some of the
newtmgr commands are not actually implemented in the newtmgr code running on
the device, and indeed when I look, I see:
/* ORDER MATTERS HERE.
* Each element represents the command ID, referenced from newtmgr.
*/
static const struct nmgr_handler nmgr_def_group_handlers[] = {
[NMGR_ID_ECHO] = {nmgr_def_echo, nmgr_def_echo},
[NMGR_ID_CONS_ECHO_CTRL] = {nmgr_def_console_echo, nmgr_def_console_echo},
[NMGR_ID_TASKSTATS] = {nmgr_def_taskstat_read, NULL},
[NMGR_ID_MPSTATS] = {nmgr_def_mpstat_read, NULL},
[NMGR_ID_DATETIME_STR] = {nmgr_datetime_get, nmgr_datetime_set},
[NMGR_ID_RESET] = {NULL, nmgr_reset},
};
Which seems to imply that only echo, taskstats, mpstats, and datetime are
actually implemented. Indeed, those commands all work, while others listed do
not. This is all from the develop branch.
Am I correct in assuming that since these commands aren't implemented in
newtmgr.c that issuing them from newtmgr will have undefined behavior?
Thanks,
dg
--
David G. Simmons
(919) 534-5099
Web <https://davidgs.com/> • Blog <https://davidgs.com/davidgs_blog> • Linkedin
<http://linkedin.com/in/davidgsimmons> • Twitter
<http://twitter.com/TechEvangelist1> • GitHub <http://github.com/davidgs>
/** Message digitally signed for security and authenticity.
* If you cannot read the PGP.sig attachment, please go to
* http://www.gnupg.com/ <http://www.gnupg.com/> Secure your email!!!
* Public key available at keyserver.pgp.com <http://keyserver.pgp.com/>
**/
♺ This email uses 100% recycled electrons. Don't blow it by printing!
There are only 2 hard things in computer science: Cache invalidation, naming
things, and off-by-one errors.
signature.asc
Description: Message signed with OpenPGP using GPGMail
