OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. | 2 * Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 * | 5 * |
6 * Alternatively, this software may be distributed under the terms of the | 6 * Alternatively, this software may be distributed under the terms of the |
7 * GNU General Public License ("GPL") version 2 as published by the Free | 7 * GNU General Public License ("GPL") version 2 as published by the Free |
8 * Software Foundation. | 8 * Software Foundation. |
9 */ | 9 */ |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 uint8_t *firmware_body[2]; | 65 uint8_t *firmware_body[2]; |
66 } firmware_storage_t; | 66 } firmware_storage_t; |
67 | 67 |
68 /* Initialize fields for talking to GetFirmwareBody(). */ | 68 /* Initialize fields for talking to GetFirmwareBody(). */ |
69 void GetFirmwareBody_setup(firmware_storage_t *f, | 69 void GetFirmwareBody_setup(firmware_storage_t *f, |
70 off_t firmware_data_offset_0, off_t firmware_data_offset_1); | 70 off_t firmware_data_offset_0, off_t firmware_data_offset_1); |
71 | 71 |
72 /* Dispose fields that are used for communicating with GetFirmwareBody(). */ | 72 /* Dispose fields that are used for communicating with GetFirmwareBody(). */ |
73 void GetFirmwareBody_dispose(firmware_storage_t *f); | 73 void GetFirmwareBody_dispose(firmware_storage_t *f); |
74 | 74 |
| 75 /* |
| 76 * Read <count> bytes, starting from <offset>, from firmware storage |
| 77 * device <file> into buffer <buf>. |
| 78 * |
| 79 * Return 0 on success, non-zero on error. |
| 80 */ |
| 81 int read_firmware_device(firmware_storage_t *file, off_t offset, void *buf, |
| 82 size_t count); |
| 83 |
75 #endif /* __FIRMWARE_STORAGE_H_ */ | 84 #endif /* __FIRMWARE_STORAGE_H_ */ |
OLD | NEW |