-int main(void)
-{
- void *ctx = NULL;
- int rc, errno_value;
- size_t size;
- uint8_t *data = NULL;
- uint32_t attr = DEF_ATTR;
- char *path = NULL;
-
- if(!probe())
- return ENOENT;
-
- talloc_new(ctx);
- size = strlen(test_data) + 1;
- rc = efi_set_variable(ctx, test_efivar_guid, test_varname,
- (uint8_t *)test_data, size, attr);
-
- rc = efi_get_variable(ctx, test_efivar_guid, test_varname,
- &data, &size, &attr);
-
- assert(data != NULL);
- rc = strcmp((char *)data, test_data);
- if (rc) {
- talloc_free(ctx);
- assert(0);
- }