Lines Matching full:var

124 efi_var_reset(struct efi_var_ioc *var)  in efi_var_reset()  argument
126 var->name = NULL; in efi_var_reset()
127 var->namesize = 0; in efi_var_reset()
128 memset(&var->vendor, 0, sizeof(var->vendor)); in efi_var_reset()
129 var->attrib = 0; in efi_var_reset()
130 var->data = NULL; in efi_var_reset()
131 var->datasize = 0; in efi_var_reset()
165 struct efi_var_ioc var; in efi_get_variable() local
172 efi_var_reset(&var); in efi_get_variable()
173 rv = utf8_to_ucs2(name, &var.name, &var.namesize); in efi_get_variable()
176 var.vendor = guid; in efi_get_variable()
177 var.data = buf; in efi_get_variable()
178 var.datasize = sizeof(buf); in efi_get_variable()
179 rv = ioctl(efi_fd, EFIIOC_VAR_GET, &var); in efi_get_variable()
181 *data_size = var.datasize; in efi_get_variable()
185 *attributes = var.attrib; in efi_get_variable()
187 free(var.name); in efi_get_variable()
215 struct efi_var_ioc var; in efi_get_next_variable_name() local
234 efi_var_reset(&var); in efi_get_next_variable_name()
235 var.name = buf; in efi_get_next_variable_name()
236 var.namesize = buflen; in efi_get_next_variable_name()
241 rv = utf8_to_ucs2(*name, &var.name, &size); in efi_get_next_variable_name()
244 var.vendor = **guid; in efi_get_next_variable_name()
246 rv = ioctl(efi_fd, EFIIOC_VAR_NEXT, &var); in efi_get_next_variable_name()
247 if (rv == 0 && var.name == NULL) { in efi_get_next_variable_name()
252 void *new = realloc(buf, var.namesize + sizeof(efi_char)); in efi_get_next_variable_name()
258 buflen = var.namesize; in efi_get_next_variable_name()
266 var.name[var.namesize / sizeof(efi_char)] = 0; /* EFI doesn't NUL terminate */ in efi_get_next_variable_name()
267 rv = ucs2_to_utf8(var.name, name); in efi_get_next_variable_name()
270 retguid = var.vendor; in efi_get_next_variable_name()
360 struct efi_var_ioc var; in efi_set_variable() local
366 efi_var_reset(&var); in efi_set_variable()
367 rv = utf8_to_ucs2(name, &var.name, &var.namesize); in efi_set_variable()
370 var.vendor = guid; in efi_set_variable()
371 var.data = data; in efi_set_variable()
372 var.datasize = data_size; in efi_set_variable()
373 var.attrib = attributes; in efi_set_variable()
374 rv = ioctl(efi_fd, EFIIOC_VAR_SET, &var); in efi_set_variable()
376 free(var.name); in efi_set_variable()