Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
|
Randall Spangler
2011/02/09 19:42:14
Move this to host/lib
Or firmware/lib if you're u
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 #include <errno.h> | |
| 8 #include <stdio.h> | |
| 9 #include <string.h> | |
| 10 | |
| 11 #include "fmap.h" | |
| 12 | |
| 13 /* Return NULL if fail */ | |
| 14 char *find_fmap(char *ptr, size_t size) | |
|
gauravsh
2011/02/09 19:58:22
since this is just a library, move to */lib
Che-Liang Chiou
2011/02/10 09:11:03
Done.
| |
| 15 { | |
| 16 size_t i; | |
| 17 for (i=0; i<size; i += FMAP_SEARCH_STRIDE) { | |
| 18 if (0 == strncmp(ptr, "__FMAP__", 8)) | |
| 19 return ptr; | |
| 20 ptr += FMAP_SEARCH_STRIDE; | |
| 21 } | |
| 22 return NULL; | |
| 23 } | |
| OLD | NEW |