Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
|
Randall Spangler
2011/02/09 19:42:14
move this to host/include.
On second thought, put
Che-Liang Chiou
2011/02/10 09:11:03
Done.
| |
| 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 | |
| 4 * found in the LICENSE file. | |
| 5 */ | |
| 6 | |
| 7 #ifndef __FMAP_H__ | |
| 8 #define __FMAP_H__ | |
| 9 | |
| 10 #include <inttypes.h> | |
| 11 #include <stddef.h> | |
| 12 | |
| 13 /* FMAP structs. See http://code.google.com/p/flashmap/wiki/FmapSpec */ | |
| 14 #define FMAP_SIGLEN 8 | |
| 15 #define FMAP_NAMELEN 32 | |
| 16 #define FMAP_SEARCH_STRIDE 4 | |
| 17 typedef struct _FmapHeader { | |
| 18 char fmap_signature[FMAP_SIGLEN]; /* avoiding endian issues */ | |
|
gauravsh
2011/02/09 19:58:22
this comment is unclear? what does it mean?
Che-Liang Chiou
2011/02/10 09:11:03
I am not sure. I didn't write this comment; I refa
| |
| 19 uint8_t fmap_ver_major; | |
| 20 uint8_t fmap_ver_minor; | |
| 21 uint64_t fmap_base; | |
| 22 uint32_t fmap_size; | |
| 23 char fmap_name[FMAP_NAMELEN]; | |
| 24 uint16_t fmap_nareas; | |
| 25 } __attribute__((packed)) FmapHeader; | |
| 26 | |
| 27 typedef struct _AreaHeader { | |
| 28 uint32_t area_offset; | |
| 29 uint32_t area_size; | |
| 30 char area_name[FMAP_NAMELEN]; | |
| 31 uint16_t area_flags; | |
| 32 } __attribute__((packed)) AreaHeader; | |
|
Randall Spangler
2011/02/09 19:42:14
FmapAreaHeader (using Fmap prefix will avoid namin
Che-Liang Chiou
2011/02/10 09:11:03
Done.
| |
| 33 | |
| 34 | |
| 35 /* Return NULL if fail */ | |
|
Randall Spangler
2011/02/09 19:42:14
1) More description needed.
2) Use const char*; y
Che-Liang Chiou
2011/02/10 09:11:03
Done.
| |
| 36 char *find_fmap(char *ptr, size_t size); | |
|
gauravsh
2011/02/09 19:58:22
comment about what it returns, what is ptr, what i
Che-Liang Chiou
2011/02/10 09:11:03
Done.
| |
| 37 | |
| 38 #endif /*__FMAP_H__ */ | |
| OLD | NEW |