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

Side by Side Diff: helpers.h

Issue 3530001: first cut: establishes base helper classes and main (Closed) Base URL: http://git.chromium.org/git/cros_boot_mode.git
Patch Set: truncation is bad, m'kay. . . Created 10 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « developer_switch_unittest.cc ('k') | helpers.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4 //
5 // Provides basic file reading and parsing helpers for use in PlatformReader
6 // and PlatformReader derived classes. Nothing fancy.
7
8 #ifndef CROS_BOOT_MODE_HELPERS_H_
9 #define CROS_BOOT_MODE_HELPERS_H_
10
11 #include <sys/types.h>
12
13 namespace cros_boot_mode {
14 namespace helpers {
15
16 // atoi, using sscanf
17 int to_int(const char *str, size_t length);
18
19 // very simple wrapper of fopen,fread,fclose.
20 size_t read_file(const char *path, char *buf, size_t max_bytes);
21
22 } // namespace helpers
23 } // namespace cros_boot_mode
24 #endif // CROS_BOOT_MODE_HELPERS_H_
OLDNEW
« no previous file with comments | « developer_switch_unittest.cc ('k') | helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698