Changeset fb06476f in mainline for uspace/lib/device/include/hr.h


Ignore:
Timestamp:
2025-04-21T13:20:05Z (3 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
c6d2af8
Parents:
5cb1631
Message:

hr: use enum for RAID layouts

File:
1 edited

Legend:

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

    r5cb1631 rfb06476f  
    5555} hr_level_t;
    5656
    57 /*
    58  * SNIA
    59  * Common RAID Disk Data Format
    60  * Specification
    61  * Version 2.0 Revision 19
    62  */
    63 #define HR_RLQ_RAID4_0  0x00 /* RAID-4 Non-Rotating Parity 0 */
    64 #define HR_RLQ_RAID4_N  0x01 /* RAID-4 Non-Rotating Parity N */
    65 #define HR_RLQ_RAID5_0R 0x00 /* RAID-5 Rotating Parity 0 with Data Restart */
    66 #define HR_RLQ_RAID5_NR 0x02 /* RAID-5 Rotating Parity N with Data Restart */
    67 #define HR_RLQ_RAID5_NC 0x03 /* RAID-5 Rotating Parity N with Data Continuation */
     57typedef enum hr_layout {
     58        HR_RLQ_NONE     = 0,
     59        HR_RLQ_RAID4_0,         /* RAID-4 Non-Rotating Parity 0 */
     60        HR_RLQ_RAID4_N,         /* RAID-4 Non-Rotating Parity N */
     61        HR_RLQ_RAID5_0R,        /* RAID-5 Rotating Parity 0 with Data Restart */
     62        HR_RLQ_RAID5_NR,        /* RAID-5 Rotating Parity N with Data Restart */
     63        HR_RLQ_RAID5_NC         /* RAID-5 Rotating Parity N with Data Continuation */
     64} hr_layout_t;
    6865
    6966typedef enum hr_vol_status {
     
    119116        HR_METADATA_GEOM_MIRROR = 1,
    120117        HR_METADATA_GEOM_STRIPE = 2,
    121         HR_METADATA_LAST_DUMMY  = 3
     118        HR_METADATA_LAST_DUMMY
    122119} hr_metadata_type_t;
    123120
     
    132129extern const char       *hr_get_vol_status_msg(hr_vol_status_t);
    133130extern const char       *hr_get_ext_status_msg(hr_ext_status_t);
    134 extern const char       *hr_get_layout_str(hr_level_t, uint8_t);
     131extern const char       *hr_get_layout_str(hr_layout_t);
    135132extern const char       *hr_get_metadata_type_str(hr_metadata_type_t);
    136133
Note: See TracChangeset for help on using the changeset viewer.