Lines Matching full:record
54 static int efi_pstore_read_func(struct pstore_record *record, in efi_pstore_read_func() argument
67 &record->type, &part, &cnt, &time, &data_type) == 5) { in efi_pstore_read_func()
68 record->id = generic_id(time, part, cnt); in efi_pstore_read_func()
69 record->part = part; in efi_pstore_read_func()
70 record->count = cnt; in efi_pstore_read_func()
71 record->time.tv_sec = time; in efi_pstore_read_func()
72 record->time.tv_nsec = 0; in efi_pstore_read_func()
74 record->compressed = true; in efi_pstore_read_func()
76 record->compressed = false; in efi_pstore_read_func()
77 record->ecc_notice_size = 0; in efi_pstore_read_func()
79 &record->type, &part, &cnt, &time) == 4) { in efi_pstore_read_func()
80 record->id = generic_id(time, part, cnt); in efi_pstore_read_func()
81 record->part = part; in efi_pstore_read_func()
82 record->count = cnt; in efi_pstore_read_func()
83 record->time.tv_sec = time; in efi_pstore_read_func()
84 record->time.tv_nsec = 0; in efi_pstore_read_func()
85 record->compressed = false; in efi_pstore_read_func()
86 record->ecc_notice_size = 0; in efi_pstore_read_func()
88 &record->type, &part, &time) == 3) { in efi_pstore_read_func()
94 record->id = generic_id(time, part, 0); in efi_pstore_read_func()
95 record->part = part; in efi_pstore_read_func()
96 record->count = 0; in efi_pstore_read_func()
97 record->time.tv_sec = time; in efi_pstore_read_func()
98 record->time.tv_nsec = 0; in efi_pstore_read_func()
99 record->compressed = false; in efi_pstore_read_func()
100 record->ecc_notice_size = 0; in efi_pstore_read_func()
104 record->buf = kmalloc(size, GFP_KERNEL); in efi_pstore_read_func()
105 if (!record->buf) in efi_pstore_read_func()
109 &size, record->buf); in efi_pstore_read_func()
111 kfree(record->buf); in efi_pstore_read_func()
121 record->priv = kmemdup(varname, wlen, GFP_KERNEL); in efi_pstore_read_func()
122 if (!record->priv) { in efi_pstore_read_func()
123 kfree(record->buf); in efi_pstore_read_func()
130 static ssize_t efi_pstore_read(struct pstore_record *record) in efi_pstore_read() argument
132 efi_char16_t *varname = record->psi->data; in efi_pstore_read()
148 * store varname in record->psi->data. Given that we only in efi_pstore_read()
150 * need to record the guid return value. in efi_pstore_read()
163 return efi_pstore_read_func(record, varname); in efi_pstore_read()
167 static int efi_pstore_write(struct pstore_record *record) in efi_pstore_write() argument
174 record->id = generic_id(record->time.tv_sec, record->part, in efi_pstore_write()
175 record->count); in efi_pstore_write()
181 record->type, record->part, record->count, in efi_pstore_write()
182 (long long)record->time.tv_sec, in efi_pstore_write()
183 record->compressed ? 'C' : 'D'); in efi_pstore_write()
192 record->size, record->psi->buf, in efi_pstore_write()
198 static int efi_pstore_erase(struct pstore_record *record) in efi_pstore_erase() argument
202 status = efivar_set_variable(record->priv, &LINUX_EFI_CRASH_GUID, in efi_pstore_erase()