src/dird/ua_cmds.c
static int create_cmd(UAContext *ua, const char *cmd)
{
   POOL *pool;

   if (!open_client_db(ua)) {
      return 1;
   }

   pool = get_pool_resource(ua);
   if (!pool) {
      return 1;
   }

   switch (create_pool(ua->jcr, ua->db, pool, POOL_OP_CREATE)) {
   case 0:
      ua->error_msg(_("Error: Pool %s already exists.\n"
               "Use update to change it.\n"), pool->name());
      break;

   case -1:
      ua->error_msg("%s", db_strerror(ua->db));
      break;

   default:
     break;
   }
   ua->send_msg(_("Pool %s created.\n"), pool->name());
   return 1;
}
/*
 * Create a Pool Record in the database.
 *  It is always created from the Resource record.
 */
Create a Pool Record in the database.
It is always created from the Resource record.
Create a Pool Record in the database . It is always created from the Resource record .
static int create_cmd(UAContext *ua, const char *cmd)
{
   POOL *pool;
   if (!open_client_db(ua)) {
      return 1;
   }
   pool = get_pool_resource(ua);
   if (!pool) {
      return 1;
   }
   switch (create_pool(ua->jcr, ua->db, pool, POOL_OP_CREATE)) {
   case 0:
      ua->error_msg(_("Error: Pool %s already exists.\n"
               "Use update to change it.\n"), pool->name());
      break;
   case -1:
      ua->error_msg("%s", db_strerror(ua->db));
      break;
   default:
     break;
   }
   ua->send_msg(_("Pool %s created.\n"), pool->name());
   return 1;
}
static int create_cmd ( UAContext * ua , const char * cmd ) { POOL * pool ; if ( ! open_client_db ( ua ) ) { return 1 ; } pool = get_pool_resource ( ua ) ; if ( ! pool ) { return 1 ; } switch ( create_pool ( ua -> jcr , ua -> db , pool , POOL_OP_CREATE ) ) { case 0 : ua -> error_msg ( _ ( " \n " " \n " ) , pool -> name ( ) ) ; break ; case -1 : ua -> error_msg ( " " , db_strerror ( ua -> db ) ) ; break ; default : break ; } ua -> send_msg ( _ ( " \n " ) , pool -> name ( ) ) ; return 1 ; }
Create a Pool Record in the database.
Create a Pool Record in the database .