Hi David,

most likely the app does not contain the package which would implement
that specific command. Only subset of newtmgr commands are implemented
inside newtmgr package.
I.e. if ‘image list’ does not work, imgmgr package is not there.

There is no feedback that command does not have registered handler on the
target side. That is annoying, and we should fix that.

> On Jul 14, 2016, at 9:07 AM, David G. Simmons <[email protected]> wrote:
> 
> 
> 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.
> 
> 

Reply via email to