I haven't looked into efivar in a while. The only case for bringing that in as a library would be if it supports parsing firmware variables other than those exposed in the efifs sysfs (/sys/firmware/efi). Otherwise, like you said, parsing the sysfs structure is way simpler.