1/* Copyright (C) 2009 The Android Open Source Project 2** 3** This software is licensed under the terms of the GNU General Public 4** License version 2, as published by the Free Software Foundation, and 5** may be copied, distributed, and modified under those terms. 6** 7** This program is distributed in the hope that it will be useful, 8** but WITHOUT ANY WARRANTY; without even the implied warranty of 9** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10** GNU General Public License for more details. 11*/ 12 13#ifndef _ANDROID_BOOT_PROPERTIES_H 14#define _ANDROID_BOOT_PROPERTIES_H 15 16/* Manage the set of boot system properties. 17 * See the documentation for the 'boot-properties' service 18 * in docs/ANDROID-QEMUD-SERVICES.TXT 19 */ 20 21/* these values give the maximum length of system property 22 * names and values. They must match the corresponding definitions 23 * in the Android source tree (in system/core/include/cutils/properties.h) 24 */ 25#define PROPERTY_MAX_NAME 32 26#define PROPERTY_MAX_VALUE 92 27 28/* record a new boot system property, this must be performed before the 29 * VM is started. Returns 0 on success, or < 0 on error. 30 * Possible errors are: 31 * -1 property name too long 32 * -2 property value too long 33 * -3 invalid characters in property name 34 */ 35int boot_property_add( const char* name, const char* value ); 36 37/* same as boot_property_add, but allows to use non-zero terminated strings. 38 */ 39int boot_property_add2( const char* name, int namelen, 40 const char* value, int valuelen ); 41 42/* init the boot property QEMUD service. This must be performed before 43 * the VM is started. This is also performed automatically if you call 44 * boot_property_add(). 45 */ 46void boot_property_init_service( void ); 47 48/* parse the parameter of -prop options passed on the command line 49 */ 50void boot_property_parse_option( const char* param ); 51 52#endif /* _ANDROID_BOOT_PROPERTIES_H */ 53