src/tools/bpluginfo.c
void dump_pluginfo(progdata * pdata)
{

   ASSERT_NVAL_RET(pdata);

   pluginfo *pinfo = pdata->pinfo;

   ASSERT_NVAL_RET(pinfo);

   plugfuncs *pfuncs = pdata->pfuncs;

   ASSERT_NVAL_RET(pfuncs);

   switch (pdata->bplugtype) {
   case DIRPLUGIN:
      printf("\nPlugin type:\t\tBacula Director plugin\n");
      if (pdata->verbose) {
         printf("Plugin magic:\t\t%s\n", NPRT(pinfo->pdirinfo.plugin_magic));
      }
      printf("Plugin version:\t\t%s\n", pinfo->pdirinfo.plugin_version);
      printf("Plugin release date:\t%s\n", NPRT(pinfo->pdirinfo.plugin_date));
      printf("Plugin author:\t\t%s\n", NPRT(pinfo->pdirinfo.plugin_author));
      printf("Plugin licence:\t\t%s\n", NPRT(pinfo->pdirinfo.plugin_license));
      printf("Plugin description:\t%s\n", NPRT(pinfo->pdirinfo.plugin_description));
      printf("Plugin API version:\t%d\n", pinfo->pdirinfo.version);
      break;
   case FDPLUGIN:
      printf("\nPlugin type:\t\tFile Daemon plugin\n");
      if (pdata->verbose) {
         printf("Plugin magic:\t\t%s\n", NPRT(pinfo->pfdinfo.plugin_magic));
      }
      printf("Plugin version:\t\t%s\n", pinfo->pfdinfo.plugin_version);
      printf("Plugin release date:\t%s\n", NPRT(pinfo->pfdinfo.plugin_date));
      printf("Plugin author:\t\t%s\n", NPRT(pinfo->pfdinfo.plugin_author));
      printf("Plugin licence:\t\t%s\n", NPRT(pinfo->pfdinfo.plugin_license));
      printf("Plugin description:\t%s\n", NPRT(pinfo->pfdinfo.plugin_description));
      printf("Plugin API version:\t%d\n", pinfo->pfdinfo.version);
      break;
   case SDPLUGIN:
      printf("\nPlugin type:\t\tBacula Storage plugin\n");
      if (pdata->verbose) {
         printf("Plugin magic:\t\t%s\n", NPRT(pinfo->psdinfo.plugin_magic));
      }
      printf("Plugin version:\t\t%s\n", pinfo->psdinfo.plugin_version);
      printf("Plugin release date:\t%s\n", NPRT(pinfo->psdinfo.plugin_date));
      printf("Plugin author:\t\t%s\n", NPRT(pinfo->psdinfo.plugin_author));
      printf("Plugin licence:\t\t%s\n", NPRT(pinfo->psdinfo.plugin_license));
      printf("Plugin description:\t%s\n", NPRT(pinfo->psdinfo.plugin_description));
      printf("Plugin API version:\t%d\n", pinfo->psdinfo.version);
      break;
   default:
      printf("\nUnknown plugin type or other Error\n\n");
   }
}
/*
 * prints any available information about a plugin
 *
 * input:
 *    pdata - program data with plugin info structure
 * output:
 *    printed info
 */
prints any available information about a plugin
input:
pdata - program data with plugin info structure
output:
printed info
prints any available information about a plugin input : pdata - program data with plugin info structure output : printed info
void dump_pluginfo(progdata * pdata)
{
   ASSERT_NVAL_RET(pdata);
   pluginfo *pinfo = pdata->pinfo;
   ASSERT_NVAL_RET(pinfo);
   plugfuncs *pfuncs = pdata->pfuncs;
   ASSERT_NVAL_RET(pfuncs);
   switch (pdata->bplugtype) {
   case DIRPLUGIN:
      printf("\nPlugin type:\t\tBacula Director plugin\n");
      if (pdata->verbose) {
         printf("Plugin magic:\t\t%s\n", NPRT(pinfo->pdirinfo.plugin_magic));
      }
      printf("Plugin version:\t\t%s\n", pinfo->pdirinfo.plugin_version);
      printf("Plugin release date:\t%s\n", NPRT(pinfo->pdirinfo.plugin_date));
      printf("Plugin author:\t\t%s\n", NPRT(pinfo->pdirinfo.plugin_author));
      printf("Plugin licence:\t\t%s\n", NPRT(pinfo->pdirinfo.plugin_license));
      printf("Plugin description:\t%s\n", NPRT(pinfo->pdirinfo.plugin_description));
      printf("Plugin API version:\t%d\n", pinfo->pdirinfo.version);
      break;
   case FDPLUGIN:
      printf("\nPlugin type:\t\tFile Daemon plugin\n");
      if (pdata->verbose) {
         printf("Plugin magic:\t\t%s\n", NPRT(pinfo->pfdinfo.plugin_magic));
      }
      printf("Plugin version:\t\t%s\n", pinfo->pfdinfo.plugin_version);
      printf("Plugin release date:\t%s\n", NPRT(pinfo->pfdinfo.plugin_date));
      printf("Plugin author:\t\t%s\n", NPRT(pinfo->pfdinfo.plugin_author));
      printf("Plugin licence:\t\t%s\n", NPRT(pinfo->pfdinfo.plugin_license));
      printf("Plugin description:\t%s\n", NPRT(pinfo->pfdinfo.plugin_description));
      printf("Plugin API version:\t%d\n", pinfo->pfdinfo.version);
      break;
   case SDPLUGIN:
      printf("\nPlugin type:\t\tBacula Storage plugin\n");
      if (pdata->verbose) {
         printf("Plugin magic:\t\t%s\n", NPRT(pinfo->psdinfo.plugin_magic));
      }
      printf("Plugin version:\t\t%s\n", pinfo->psdinfo.plugin_version);
      printf("Plugin release date:\t%s\n", NPRT(pinfo->psdinfo.plugin_date));
      printf("Plugin author:\t\t%s\n", NPRT(pinfo->psdinfo.plugin_author));
      printf("Plugin licence:\t\t%s\n", NPRT(pinfo->psdinfo.plugin_license));
      printf("Plugin description:\t%s\n", NPRT(pinfo->psdinfo.plugin_description));
      printf("Plugin API version:\t%d\n", pinfo->psdinfo.version);
      break;
   default:
      printf("\nUnknown plugin type or other Error\n\n");
   }
}
void dump_pluginfo ( progdata * pdata ) { ASSERT_NVAL_RET ( pdata ) ; pluginfo * pinfo = pdata -> pinfo ; ASSERT_NVAL_RET ( pinfo ) ; plugfuncs * pfuncs = pdata -> pfuncs ; ASSERT_NVAL_RET ( pfuncs ) ; switch ( pdata -> bplugtype ) { case DIRPLUGIN : printf ( " \n \t \t \n " ) ; if ( pdata -> verbose ) { printf ( " \t \t \n " , NPRT ( pinfo -> pdirinfo . plugin_magic ) ) ; } printf ( " \t \t \n " , pinfo -> pdirinfo . plugin_version ) ; printf ( " \t \n " , NPRT ( pinfo -> pdirinfo . plugin_date ) ) ; printf ( " \t \t \n " , NPRT ( pinfo -> pdirinfo . plugin_author ) ) ; printf ( " \t \t \n " , NPRT ( pinfo -> pdirinfo . plugin_license ) ) ; printf ( " \t \n " , NPRT ( pinfo -> pdirinfo . plugin_description ) ) ; printf ( " \t \n " , pinfo -> pdirinfo . version ) ; break ; case FDPLUGIN : printf ( " \n \t \t \n " ) ; if ( pdata -> verbose ) { printf ( " \t \t \n " , NPRT ( pinfo -> pfdinfo . plugin_magic ) ) ; } printf ( " \t \t \n " , pinfo -> pfdinfo . plugin_version ) ; printf ( " \t \n " , NPRT ( pinfo -> pfdinfo . plugin_date ) ) ; printf ( " \t \t \n " , NPRT ( pinfo -> pfdinfo . plugin_author ) ) ; printf ( " \t \t \n " , NPRT ( pinfo -> pfdinfo . plugin_license ) ) ; printf ( " \t \n " , NPRT ( pinfo -> pfdinfo . plugin_description ) ) ; printf ( " \t \n " , pinfo -> pfdinfo . version ) ; break ; case SDPLUGIN : printf ( " \n \t \t \n " ) ; if ( pdata -> verbose ) { printf ( " \t \t \n " , NPRT ( pinfo -> psdinfo . plugin_magic ) ) ; } printf ( " \t \t \n " , pinfo -> psdinfo . plugin_version ) ; printf ( " \t \n " , NPRT ( pinfo -> psdinfo . plugin_date ) ) ; printf ( " \t \t \n " , NPRT ( pinfo -> psdinfo . plugin_author ) ) ; printf ( " \t \t \n " , NPRT ( pinfo -> psdinfo . plugin_license ) ) ; printf ( " \t \n " , NPRT ( pinfo -> psdinfo . plugin_description ) ) ; printf ( " \t \n " , pinfo -> psdinfo . version ) ; break ; default : printf ( " \n \n \n " ) ; } }
prints any available information about a plugin
 input:
    pdata - program data with plugin info structure
 output:
    printed info
prints any available information about a plugin input : pdata - program data with plugin info structure output : printed info