Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Side by Side Diff: firmware/lib/stateful_util.c

Issue 3173035: Make sure that our version of certain utility function implementations gets used in the firmware. (Closed) Base URL: http://src.chromium.org/git/vboot_reference.git
Patch Set: . Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « firmware/include/utility.h ('k') | firmware/lib/utility.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 * 4 *
5 * Stub implementations of utility functions which call their linux-specific 5 * Implementations of stateful memory operations.
6 * equivalents.
7 */ 6 */
8 7
9 #include "stateful_util.h" 8 #include "stateful_util.h"
10 9
11 #include "utility.h" 10 #include "utility.h"
12 11
13 void* StatefulSkip(MemcpyState* state, uint64_t len) { 12 void* StatefulSkip(MemcpyState* state, uint64_t len) {
14 if (state->overrun) 13 if (state->overrun)
15 return NULL; 14 return NULL;
16 if (len > state->remaining_len) { 15 if (len > state->remaining_len) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 return NULL; 55 return NULL;
57 if (len > state->remaining_len) { 56 if (len > state->remaining_len) {
58 state->overrun = 1; 57 state->overrun = 1;
59 return NULL; 58 return NULL;
60 } 59 }
61 Memset(state->remaining_buf, val, len); 60 Memset(state->remaining_buf, val, len);
62 state->remaining_buf += len; 61 state->remaining_buf += len;
63 state->remaining_len -= len; 62 state->remaining_len -= len;
64 return state; // have to return something non-NULL 63 return state; // have to return something non-NULL
65 } 64 }
OLDNEW
« no previous file with comments | « firmware/include/utility.h ('k') | firmware/lib/utility.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698