Print this page
3117 aac forgets C isn't math


3550                 for (dvp = &softs->containers[count];
3551                     dvp < &softs->containers[softs->container_count]; dvp++) {
3552                         if (!AAC_DEV_IS_VALID(&dvp->dev))
3553                                 continue;
3554                         AACDB_PRINT(softs, CE_NOTE, ">>> Container %d deleted",
3555                             dvp->cid);
3556                         dvp->dev.flags &= ~AAC_DFLAG_VALID;
3557                         (void) aac_handle_dr(softs, dvp->cid, -1,
3558                             AAC_CFG_DELETE);
3559                 }
3560         }
3561 
3562         softs->container_count = count;
3563         AACDB_PRINT(softs, CE_CONT, "?Total %d container(s) found", total);
3564         return (AACOK);
3565 }
3566 
3567 static int
3568 aac_probe_jbod(struct aac_softstate *softs, int tgt, int event)
3569 {
3570         ASSERT(AAC_MAX_LD <= tgt < AAC_MAX_DEV(softs));

3571         struct aac_device *dvp;
3572         dvp = AAC_DEV(softs, tgt);
3573 
3574         switch (event) {
3575         case AAC_CFG_ADD:
3576                 AACDB_PRINT(softs, CE_NOTE,
3577                     ">>> Jbod %d added", tgt - AAC_MAX_LD);
3578                 dvp->flags |= AAC_DFLAG_VALID;
3579                 dvp->type = AAC_DEV_PD;
3580                 break;
3581         case AAC_CFG_DELETE:
3582                 AACDB_PRINT(softs, CE_NOTE,
3583                     ">>> Jbod %d deleted", tgt - AAC_MAX_LD);
3584                 dvp->flags &= ~AAC_DFLAG_VALID;
3585                 break;
3586         default:
3587                 return (AACERR);
3588         }
3589         (void) aac_handle_dr(softs, tgt, 0, event);
3590         return (AACOK);




3550                 for (dvp = &softs->containers[count];
3551                     dvp < &softs->containers[softs->container_count]; dvp++) {
3552                         if (!AAC_DEV_IS_VALID(&dvp->dev))
3553                                 continue;
3554                         AACDB_PRINT(softs, CE_NOTE, ">>> Container %d deleted",
3555                             dvp->cid);
3556                         dvp->dev.flags &= ~AAC_DFLAG_VALID;
3557                         (void) aac_handle_dr(softs, dvp->cid, -1,
3558                             AAC_CFG_DELETE);
3559                 }
3560         }
3561 
3562         softs->container_count = count;
3563         AACDB_PRINT(softs, CE_CONT, "?Total %d container(s) found", total);
3564         return (AACOK);
3565 }
3566 
3567 static int
3568 aac_probe_jbod(struct aac_softstate *softs, int tgt, int event)
3569 {
3570         ASSERT(AAC_MAX_LD <= tgt);
3571         ASSERT(tgt < AAC_MAX_DEV(softs));
3572         struct aac_device *dvp;
3573         dvp = AAC_DEV(softs, tgt);
3574 
3575         switch (event) {
3576         case AAC_CFG_ADD:
3577                 AACDB_PRINT(softs, CE_NOTE,
3578                     ">>> Jbod %d added", tgt - AAC_MAX_LD);
3579                 dvp->flags |= AAC_DFLAG_VALID;
3580                 dvp->type = AAC_DEV_PD;
3581                 break;
3582         case AAC_CFG_DELETE:
3583                 AACDB_PRINT(softs, CE_NOTE,
3584                     ">>> Jbod %d deleted", tgt - AAC_MAX_LD);
3585                 dvp->flags &= ~AAC_DFLAG_VALID;
3586                 break;
3587         default:
3588                 return (AACERR);
3589         }
3590         (void) aac_handle_dr(softs, tgt, 0, event);
3591         return (AACOK);