Changeset 3663be53 in rtems


Ignore:
Timestamp:
Aug 24, 2017, 3:23:23 PM (2 years ago)
Author:
Daniel Hellstrom <daniel@…>
Branches:
master
Children:
731e68a3
Parents:
8570ad2
git-author:
Daniel Hellstrom <daniel@…> (08/24/17 15:23:23)
git-committer:
Daniel Hellstrom <daniel@…> (08/29/17 06:44:13)
Message:

drvmgr: clean up info_drv print

Fixes #2930

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libdrvmgr/drvmgr_print.c

    r8570ad2 r3663be53  
    335335}
    336336
    337 char *drv_ops_names[DRVMGR_OPS_NUM(struct drvmgr_drv_ops)] = {
    338         "init[1]:",
    339         "init[2]:",
    340         "init[3]:",
    341         "init[4]:",
    342         "remove: ",
    343         "info:   "
    344 };
    345 
    346337void drvmgr_info_drv(struct drvmgr_drv *drv, unsigned int options)
    347338{
    348339        struct drvmgr_dev *dev;
    349         fun_ptr *ppfunc;
    350340        int i;
    351341
     
    356346        printf("  BUS TYPE:    %d\n", drv->bus_type);
    357347        printf("  OPERATIONS:\n");
    358         for (i = 0, ppfunc = (fun_ptr *)&drv->ops->init[0];
    359              i < DRVMGR_OPS_NUM(struct drvmgr_drv_ops); i++)
    360                 printf("   %s    %p\n", drv_ops_names[i], ppfunc[i]);
     348        for (i = 0; i < DRVMGR_LEVEL_MAX; i++)
     349                printf("   init[%d]:    %p\n", i + 1, drv->ops->init[i]);
     350        printf("   remove:     %p\n", drv->ops->remove);
     351        printf("   info:       %p\n", drv->ops->info);
    361352        printf("  NO. DEVICES: %d\n", drv->dev_cnt);
    362353
Note: See TracChangeset for help on using the changeset viewer.