1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

mapping: add missing header fields

This commit is contained in:
Steffen Vogel 2017-08-30 16:37:19 +02:00
parent d780b84e5f
commit ec2fad2fac
2 changed files with 6 additions and 0 deletions

View file

@ -70,6 +70,8 @@ struct mapping_entry {
enum header_type {
MAPPING_HDR_LENGTH,
MAPPING_HDR_SEQUENCE,
MAPPING_HDR_ID,
MAPPING_HDR_FORMAT
} id;
} hdr;

View file

@ -105,6 +105,10 @@ int mapping_parse_str(struct mapping_entry *e, const char *str, struct list *nod
e->hdr.id = MAPPING_HDR_SEQUENCE;
else if (!strcmp(field, "length"))
e->hdr.id = MAPPING_HDR_LENGTH;
else if (!strcmp(field, "id"))
e->hdr.id = MAPPING_HDR_ID;
else if (!strcmp(field, "format"))
e->hdr.id = MAPPING_HDR_FORMAT;
else
goto invalid_format;
}