Using %ms looks a bit fishy in Vala. While it does transpile this as a char*, this is an internal implementation detail, and I'm not sure whether Vala's garbage collector gets along with those "behind the back" allocations.

It might be more robust and also easier to read to parse the file line by line, as in e. g. set_property(): You can use a DataInputStream and then read_line(), or keep the # filtering from above and check if dev_header matches Regex("^@DEV (.*)(?>\n|$)") and if so, use its .fetch(1) to get the device name.