diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/arch/target_linux-x86/AndroidConfig.h | 2 | ||||
-rw-r--r-- | include/cutils/log.h | 28 | ||||
-rw-r--r-- | include/netutils/dhcp.h | 40 | ||||
-rw-r--r-- | include/netutils/ifc.h | 64 | ||||
-rw-r--r-- | include/pixelflinger/pixelflinger.h | 2 | ||||
-rw-r--r-- | include/private/android_filesystem_config.h | 5 |
6 files changed, 133 insertions, 8 deletions
diff --git a/include/arch/target_linux-x86/AndroidConfig.h b/include/arch/target_linux-x86/AndroidConfig.h index 617e7fa..d6ce3f2 100644 --- a/include/arch/target_linux-x86/AndroidConfig.h +++ b/include/arch/target_linux-x86/AndroidConfig.h @@ -227,7 +227,7 @@ /* * Define if we have Linux's dbus */ -#define HAVE_DBUS 1 +/* #define HAVE_DBUS 1 */ /* * Define if tm struct has tm_gmtoff field diff --git a/include/cutils/log.h b/include/cutils/log.h index dd47c35..f602017 100644 --- a/include/cutils/log.h +++ b/include/cutils/log.h @@ -291,11 +291,11 @@ extern "C" { */ #define LOG_ALWAYS_FATAL_IF(cond, ...) \ ( (CONDITION(cond)) \ - ? ((void)android_printAssert(#cond, LOG_TAG, __VA_ARGS__)) \ + ? ((void)android_printAssert(#cond, LOG_TAG, ## __VA_ARGS__)) \ : (void)0 ) #define LOG_ALWAYS_FATAL(...) \ - ( ((void)android_printAssert(NULL, LOG_TAG, __VA_ARGS__)) ) + ( ((void)android_printAssert(NULL, LOG_TAG, ## __VA_ARGS__)) ) /* * Versions of LOG_ALWAYS_FATAL_IF and LOG_ALWAYS_FATAL that @@ -308,7 +308,7 @@ extern "C" { #else -#define LOG_FATAL_IF(cond, ...) LOG_ALWAYS_FATAL_IF(cond, __VA_ARGS__) +#define LOG_FATAL_IF(cond, ...) LOG_ALWAYS_FATAL_IF(cond, ## __VA_ARGS__) #define LOG_FATAL(...) LOG_ALWAYS_FATAL(__VA_ARGS__) #endif @@ -317,7 +317,7 @@ extern "C" { * Assertion that generates a log message when the assertion fails. * Stripped out of release builds. Uses the current LOG_TAG. */ -#define LOG_ASSERT(cond, ...) LOG_FATAL_IF(!(cond), __VA_ARGS__) +#define LOG_ASSERT(cond, ...) LOG_FATAL_IF(!(cond), ## __VA_ARGS__) //#define LOG_ASSERT(cond) LOG_FATAL_IF(!(cond), "Assertion failed: " #cond) // --------------------------------------------------------------------- @@ -403,8 +403,24 @@ typedef enum { #define android_vprintLog(prio, cond, tag, fmt...) \ __android_log_vprint(prio, tag, fmt) +/* XXX Macros to work around syntax errors in places where format string + * arg is not passed to LOG_ASSERT, LOG_ALWAYS_FATAL or LOG_ALWAYS_FATAL_IF + * (happens only in debug builds). + */ + +/* Returns 2nd arg. Used to substitute default value if caller's vararg list + * is empty. + */ +#define __android_second(dummy, second, ...) second + +/* If passed multiple args, returns ',' followed by all but 1st arg, otherwise + * returns nothing. + */ +#define __android_rest(first, ...) , ## __VA_ARGS__ + #define android_printAssert(cond, tag, fmt...) \ - __android_log_assert(cond, tag, fmt) + __android_log_assert(cond, tag, \ + __android_second(0, ## fmt, NULL) __android_rest(fmt)) #define android_writeLog(prio, tag, text) \ __android_log_write(prio, tag, text) @@ -413,7 +429,7 @@ typedef enum { __android_log_bwrite(tag, payload, len) #define android_btWriteLog(tag, type, payload, len) \ __android_log_btwrite(tag, type, payload, len) - + // TODO: remove these prototypes and their users #define android_testLog(prio, tag) (1) #define android_writevLog(vec,num) do{}while(0) diff --git a/include/netutils/dhcp.h b/include/netutils/dhcp.h new file mode 100644 index 0000000..96798c5 --- /dev/null +++ b/include/netutils/dhcp.h @@ -0,0 +1,40 @@ +/* + * Copyright 2010, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _NETUTILS_DHCP_H_ +#define _NETUTILS_DHCP_H_ + +#include <sys/cdefs.h> +#include <arpa/inet.h> + +__BEGIN_DECLS + +extern int do_dhcp(char *iname); +extern int dhcp_do_request(const char *ifname, + in_addr_t *ipaddr, + in_addr_t *gateway, + in_addr_t *mask, + in_addr_t *dns1, + in_addr_t *dns2, + in_addr_t *server, + uint32_t *lease); +extern int dhcp_stop(const char *ifname); +extern int dhcp_release_lease(const char *ifname); +extern char *dhcp_get_errmsg(); + +__END_DECLS + +#endif /* _NETUTILS_DHCP_H_ */ diff --git a/include/netutils/ifc.h b/include/netutils/ifc.h new file mode 100644 index 0000000..e245262 --- /dev/null +++ b/include/netutils/ifc.h @@ -0,0 +1,64 @@ +/* + * Copyright 2008, The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef _NETUTILS_IFC_H_ +#define _NETUTILS_IFC_H_ + +#include <sys/cdefs.h> +#include <arpa/inet.h> + +__BEGIN_DECLS + +extern int ifc_init(void); +extern void ifc_close(void); + +extern int ifc_get_ifindex(const char *name, int *if_indexp); +extern int ifc_get_hwaddr(const char *name, void *ptr); + +extern int ifc_up(const char *name); +extern int ifc_down(const char *name); + +extern int ifc_enable(const char *ifname); +extern int ifc_disable(const char *ifname); + +extern int ifc_reset_connections(const char *ifname); + +extern int ifc_set_addr(const char *name, in_addr_t addr); +extern int ifc_set_mask(const char *name, in_addr_t mask); +extern int ifc_set_hwaddr(const char *name, const void *ptr); + +/* This function is deprecated. Use ifc_add_route instead. */ +extern int ifc_add_host_route(const char *name, in_addr_t addr); +extern int ifc_remove_host_routes(const char *name); +extern int ifc_get_default_route(const char *ifname); +/* This function is deprecated. Use ifc_add_route instead */ +extern int ifc_set_default_route(const char *ifname, in_addr_t gateway); +/* This function is deprecated. Use ifc_add_route instead */ +extern int ifc_create_default_route(const char *name, in_addr_t addr); +extern int ifc_remove_default_route(const char *ifname); +extern int ifc_add_route(const char *name, const char *addr, int prefix_length, + const char *gw); + +extern int ifc_get_info(const char *name, in_addr_t *addr, in_addr_t *mask, + in_addr_t *flags); + +extern int ifc_configure(const char *ifname, in_addr_t address, + in_addr_t netmask, in_addr_t gateway, + in_addr_t dns1, in_addr_t dns2); + +__END_DECLS + +#endif /* _NETUTILS_IFC_H_ */ diff --git a/include/pixelflinger/pixelflinger.h b/include/pixelflinger/pixelflinger.h index dca0b90..8a2b442 100644 --- a/include/pixelflinger/pixelflinger.h +++ b/include/pixelflinger/pixelflinger.h @@ -315,7 +315,7 @@ extern "C" { ssize_t gglInit(GGLContext** context); ssize_t gglUninit(GGLContext* context); -GGLint gglBitBlti( +GGLint gglBitBlit( GGLContext* c, int tmu, GGLint crop[4], diff --git a/include/private/android_filesystem_config.h b/include/private/android_filesystem_config.h index 9aaa736..e3dd93e 100644 --- a/include/private/android_filesystem_config.h +++ b/include/private/android_filesystem_config.h @@ -52,6 +52,8 @@ #define AID_VPN 1016 /* vpn system */ #define AID_KEYSTORE 1017 /* keystore subsystem */ #define AID_USB 1018 /* USB devices */ +#define AID_DRM 1019 /* DRM server */ +#define AID_DRMIO 1020 /* DRM IO server */ #define AID_GPS 1021 /* GPS daemon */ #define AID_SHELL 2000 /* adb and debug shell user */ @@ -94,6 +96,8 @@ static const struct android_id_info android_ids[] = { { "adb", AID_ADB, }, { "install", AID_INSTALL, }, { "media", AID_MEDIA, }, + { "drm", AID_DRM, }, + { "drmio", AID_DRMIO, }, { "shell", AID_SHELL, }, { "cache", AID_CACHE, }, { "diag", AID_DIAG, }, @@ -168,6 +172,7 @@ static struct fs_path_config android_files[] = { { 00640, AID_SYSTEM, AID_SYSTEM, "system/etc/bluetooth/auto_pairing.conf" }, { 00444, AID_RADIO, AID_AUDIO, "system/etc/AudioPara4.csv" }, { 00555, AID_ROOT, AID_ROOT, "system/etc/ppp/*" }, + { 00555, AID_ROOT, AID_ROOT, "system/etc/rc.*" }, { 00644, AID_SYSTEM, AID_SYSTEM, "data/app/*" }, { 00644, AID_SYSTEM, AID_SYSTEM, "data/app-private/*" }, { 00644, AID_APP, AID_APP, "data/data/*" }, |