Lines Matching full:record

81 static int efi_pstore_read_func(struct pstore_record *record,  in efi_pstore_read_func()  argument
94 &record->type, &part, &cnt, &time, &data_type) == 5) { in efi_pstore_read_func()
95 record->id = generic_id(time, part, cnt); in efi_pstore_read_func()
96 record->part = part; in efi_pstore_read_func()
97 record->count = cnt; in efi_pstore_read_func()
98 record->time.tv_sec = time; in efi_pstore_read_func()
99 record->time.tv_nsec = 0; in efi_pstore_read_func()
101 record->compressed = true; in efi_pstore_read_func()
103 record->compressed = false; in efi_pstore_read_func()
104 record->ecc_notice_size = 0; in efi_pstore_read_func()
106 &record->type, &part, &cnt, &time) == 4) { in efi_pstore_read_func()
107 record->id = generic_id(time, part, cnt); in efi_pstore_read_func()
108 record->part = part; in efi_pstore_read_func()
109 record->count = cnt; in efi_pstore_read_func()
110 record->time.tv_sec = time; in efi_pstore_read_func()
111 record->time.tv_nsec = 0; in efi_pstore_read_func()
112 record->compressed = false; in efi_pstore_read_func()
113 record->ecc_notice_size = 0; in efi_pstore_read_func()
115 &record->type, &part, &time) == 3) { in efi_pstore_read_func()
121 record->id = generic_id(time, part, 0); in efi_pstore_read_func()
122 record->part = part; in efi_pstore_read_func()
123 record->count = 0; in efi_pstore_read_func()
124 record->time.tv_sec = time; in efi_pstore_read_func()
125 record->time.tv_nsec = 0; in efi_pstore_read_func()
126 record->compressed = false; in efi_pstore_read_func()
127 record->ecc_notice_size = 0; in efi_pstore_read_func()
131 record->buf = kmalloc(size, GFP_KERNEL); in efi_pstore_read_func()
132 if (!record->buf) in efi_pstore_read_func()
136 &size, record->buf); in efi_pstore_read_func()
138 kfree(record->buf); in efi_pstore_read_func()
148 record->priv = kmemdup(varname, wlen, GFP_KERNEL); in efi_pstore_read_func()
149 if (!record->priv) { in efi_pstore_read_func()
150 kfree(record->buf); in efi_pstore_read_func()
157 static ssize_t efi_pstore_read(struct pstore_record *record) in efi_pstore_read() argument
159 efi_char16_t *varname = record->psi->data; in efi_pstore_read()
183 * store varname in record->psi->data. Given that we only in efi_pstore_read()
185 * need to record the guid return value. in efi_pstore_read()
198 return efi_pstore_read_func(record, varname); in efi_pstore_read()
202 static int efi_pstore_write(struct pstore_record *record) in efi_pstore_write() argument
209 record->id = generic_id(record->time.tv_sec, record->part, in efi_pstore_write()
210 record->count); in efi_pstore_write()
216 record->type, record->part, record->count, in efi_pstore_write()
217 (long long)record->time.tv_sec, in efi_pstore_write()
218 record->compressed ? 'C' : 'D'); in efi_pstore_write()
227 record->size, record->psi->buf, in efi_pstore_write()
233 static int efi_pstore_erase(struct pstore_record *record) in efi_pstore_erase() argument
237 status = efivar_set_variable(record->priv, &LINUX_EFI_CRASH_GUID, in efi_pstore_erase()