Lines Matching refs:var

78 	struct plpks_var var = {0};  in plpks_get_variable()  local
83 var.name = kcalloc(key_len - 1, sizeof(wchar_t), GFP_KERNEL); in plpks_get_variable()
84 if (!var.name) in plpks_get_variable()
86 rc = utf8s_to_utf16s(key, key_len - 1, UTF16_LITTLE_ENDIAN, (wchar_t *)var.name, in plpks_get_variable()
90 var.namelen = rc * 2; in plpks_get_variable()
92 var.os = PLPKS_VAR_LINUX; in plpks_get_variable()
94 var.data = data; in plpks_get_variable()
95 var.datalen = *data_size; in plpks_get_variable()
97 rc = plpks_read_os_var(&var); in plpks_get_variable()
102 *data_size = var.datalen; in plpks_get_variable()
105 kfree(var.name); in plpks_get_variable()
118 struct plpks_var var = {0}; in plpks_set_variable() local
129 var.name = kcalloc(key_len - 1, sizeof(wchar_t), GFP_KERNEL); in plpks_set_variable()
130 if (!var.name) in plpks_set_variable()
132 rc = utf8s_to_utf16s(key, key_len - 1, UTF16_LITTLE_ENDIAN, (wchar_t *)var.name, in plpks_set_variable()
136 var.namelen = rc * 2; in plpks_set_variable()
141 var.datalen = data_size - sizeof(flags); in plpks_set_variable()
142 var.data = data + sizeof(flags); in plpks_set_variable()
143 var.os = PLPKS_VAR_LINUX; in plpks_set_variable()
144 var.policy = get_policy(key); in plpks_set_variable()
148 rc = plpks_signed_update_var(&var, flags); in plpks_set_variable()
151 kfree(var.name); in plpks_set_variable()
162 struct plpks_var var = {0}; in plpks_secvar_format() local
166 var.component = NULL; in plpks_secvar_format()
168 var.name = "SB_VERSION"; in plpks_secvar_format()
169 var.namelen = strlen(var.name); in plpks_secvar_format()
170 var.datalen = 1; in plpks_secvar_format()
171 var.data = &version; in plpks_secvar_format()
174 ret = plpks_read_fw_var(&var); in plpks_secvar_format()