OLD | NEW |
(Empty) | |
| 1 /* Copyright (c) 2011 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 |
| 6 #ifndef VBOOT_REFERENCE_CROSSYSTEM_H_ |
| 7 #define VBOOT_REFERENCE_CROSSYSTEM_H_ |
| 8 |
| 9 /* Reads a system property integer. |
| 10 * |
| 11 * Returns the property value, or -1 if error. */ |
| 12 int VbGetSystemPropertyInt(const char* name); |
| 13 |
| 14 /* Read a system property string into a destination buffer of the |
| 15 * specified size. Returned string will be null-terminated. If the |
| 16 * buffer is too small, the returned string will be truncated. |
| 17 * |
| 18 * Returns the passed buffer, or NULL if error. */ |
| 19 const char* VbGetSystemPropertyString(const char* name, char* dest, int size); |
| 20 |
| 21 /* Sets a system property integer. |
| 22 * |
| 23 * Returns 0 if success, -1 if error. */ |
| 24 int VbSetSystemPropertyInt(const char* name, int value); |
| 25 |
| 26 /* Set a system property string. |
| 27 * |
| 28 * Returns 0 if success, -1 if error. */ |
| 29 int VbSetSystemPropertyString(const char* name, const char* value); |
| 30 |
| 31 #endif /* VBOOT_REFERENCE__CROSSYSTEM_H_ */ |
OLD | NEW |