Fix device-parsing

Signed-off-by: Steven Barth <steven@midlink.org>