Changeset 50bed55d in mainline for uspace/lib


Ignore:
Timestamp:
2024-10-18T14:30:56Z (12 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
fad91b9
Parents:
6d55e39
Message:

hr: rename levels to upper case

Location:
uspace/lib/device
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/device/include/hr.h

    r6d55e39 r50bed55d  
    4646#define HR_DEVNAME_LEN 32
    4747
     48typedef enum hr_level {
     49        HR_LVL_0        = 0x00, /* striping, no redundancy */
     50        HR_LVL_1        = 0x01, /* n-way mirroring */
     51        HR_LVL_4        = 0x04, /* dedicated parity */
     52        HR_LVL_5        = 0x05, /* distributed parity */
     53        HR_LVL_UNKNOWN  = 0xFF
     54} hr_level_t;
     55
    4856typedef struct hr {
    4957        async_sess_t *sess;
    5058} hr_t;
    51 
    52 typedef enum hr_level {
    53         hr_l_0 = 0,
    54         hr_l_1 = 1,
    55         hr_l_4 = 4,
    56         hr_l_5 = 5,
    57         hr_l_linear = 254,
    58         hr_l_empty = 255
    59 } hr_level_t;
    6059
    6160typedef struct hr_config {
  • uspace/lib/device/src/hr.c

    r6d55e39 r50bed55d  
    131131
    132132        printf("level: %d\n", vol_info->level);
    133         if (vol_info->level == hr_l_0 || vol_info->level == hr_l_4) {
     133        if (vol_info->level == HR_LVL_0 || vol_info->level == HR_LVL_4) {
    134134                if (vol_info->strip_size / 1024 < 1)
    135135                        printf("strip size in bytes: %u\n",
     
    144144        printf("block size: %zu\n", vol_info->bsize);
    145145
    146         if (vol_info->level == hr_l_4)
     146        if (vol_info->level == HR_LVL_4)
    147147                printf("extents: [P] [status] [index] [devname]\n");
    148148        else
     
    153153                if (rc != EOK)
    154154                        return rc;
    155                 if (i == 0 && vol_info->level == hr_l_4)
     155                if (i == 0 && vol_info->level == HR_LVL_4)
    156156                        printf("          P   %d        %zu       %s\n", ext->status, i, devname);
    157                 else if (vol_info->level == hr_l_4)
     157                else if (vol_info->level == HR_LVL_4)
    158158                        printf("              %d        %zu       %s\n", ext->status, i, devname);
    159159                else
Note: See TracChangeset for help on using the changeset viewer.