Changeset 5d96f427 in mainline for uspace/srv/bd/hr/raid4.c


Ignore:
Timestamp:
2024-11-15T16:44:25Z (6 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
733564a
Parents:
bd51105
git-author:
Miroslav Cimerman <mc@…> (2024-11-15 16:08:11)
git-committer:
Miroslav Cimerman <mc@…> (2024-11-15 16:44:25)
Message:

hr: use DPRINTF and ERR_PRINTF macros from util.h

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/hr/raid4.c

    rbd51105 r5d96f427  
    109109        case 0:
    110110                if (old_state != HR_VOL_ONLINE) {
    111                         log_msg(LOG_DEFAULT, LVL_ERROR,
    112                             "RAID 4 has all extents online, "
     111                        DPRINTF("RAID 4 has all extents online, "
    113112                            "marking \"%s\" (%lu) as ONLINE",
    114113                            vol->devname, vol->svc_id);
     
    118117        case 1:
    119118                if (old_state != HR_VOL_DEGRADED) {
    120                         log_msg(LOG_DEFAULT, LVL_ERROR,
    121                             "RAID 4 array \"%s\" (%lu) has 1 extent inactive, "
    122                             "marking as DEGRADED",
     119                        ERR_PRINTF("RAID 4 array \"%s\" (%lu) has 1 extent "
     120                            "inactive, marking as DEGRADED",
    123121                            vol->devname, vol->svc_id);
    124122                        vol->status = HR_VOL_DEGRADED;
     
    127125        default:
    128126                if (old_state != HR_VOL_FAULTY) {
    129                         log_msg(LOG_DEFAULT, LVL_ERROR,
    130                             "RAID 4 array \"%s\" (%lu) has more than one 1 "
    131                             "extent inactive, marking as FAULTY",
     127                        ERR_PRINTF("RAID 4 array \"%s\" (%lu) has more "
     128                            "than one 1 extent inactive, marking as FAULTY",
    132129                            vol->devname, vol->svc_id);
    133130                        vol->status = HR_VOL_FAULTY;
     
    324321static errno_t hr_raid4_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
    325322{
    326         log_msg(LOG_DEFAULT, LVL_NOTE, "hr_bd_open()");
     323        DPRINTF("hr_bd_open()\n");
    327324        return EOK;
    328325}
     
    330327static errno_t hr_raid4_bd_close(bd_srv_t *bd)
    331328{
    332         log_msg(LOG_DEFAULT, LVL_NOTE, "hr_bd_close()");
     329        DPRINTF("hr_bd_close()\n");
    333330        return EOK;
    334331}
     
    495492
    496493        if (new_volume->dev_no < 3) {
    497                 log_msg(LOG_DEFAULT, LVL_ERROR,
    498                     "RAID 4 array needs at least 3 devices");
     494                ERR_PRINTF("RAID 4 array needs at least 3 devices");
    499495                return EINVAL;
    500496        }
Note: See TracChangeset for help on using the changeset viewer.