summaryrefslogtreecommitdiff
path: root/nest/attrs.h
diff options
context:
space:
mode:
Diffstat (limited to 'nest/attrs.h')
-rw-r--r--nest/attrs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/nest/attrs.h b/nest/attrs.h
index 37227d9b..4efcff79 100644
--- a/nest/attrs.h
+++ b/nest/attrs.h
@@ -125,6 +125,14 @@ enum ec_subtype {
EC_GENERIC = 0xFFFF,
};
+static inline const char *ec_subtype_str(const enum ec_subtype ecs) {
+ switch (ecs) {
+ case EC_RT: return "rt";
+ case EC_RO: return "ro";
+ default: return NULL;
+ }
+}
+
/* Transitive bit (for first u32 half of EC) */
#define EC_TBIT 0x40000000