aboutsummaryrefslogtreecommitdiffstats
path: root/brctl
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2013-02-15 04:56:16 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2013-02-15 04:56:16 -0800
commit85130b403dea07b2230efed3287236fa0caefb1c (patch)
tree33a50a21940ba01cefbf41af94fcf7a9e04972a3 /brctl
parent1736fa987eb6b66b6eaedbc1cd3df4f48b873721 (diff)
parent8a5f846f83556370f8c69b8573ebd7ceb01653f7 (diff)
downloadandroid_external_brctl-replicant-6.0-0004-rc1.tar.gz
android_external_brctl-replicant-6.0-0004-rc1.tar.bz2
android_external_brctl-replicant-6.0-0004-rc1.zip
Diffstat (limited to 'brctl')
-rw-r--r--brctl/Android.mk25
-rw-r--r--brctl/brctl.c7
2 files changed, 28 insertions, 4 deletions
diff --git a/brctl/Android.mk b/brctl/Android.mk
new file mode 100644
index 0000000..04897a2
--- /dev/null
+++ b/brctl/Android.mk
@@ -0,0 +1,25 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:=\
+ brctl_cmd.c \
+ brctl_disp.c \
+ brctl.c
+
+LOCAL_CFLAGS := -O2 -g -Wno-ignored-qualifiers
+LOCAL_CFLAGS += -Wno-sign-compare -Wno-missing-field-initializers
+LOCAL_CFLAGS += -DHAVE_CONFIG_H -D_U_="__attribute__((unused))"
+LOCAL_CFLAGS += -DFEATURE_ANDROID
+
+LOCAL_C_INCLUDES += \
+ $(LOCAL_PATH)/../libbridge/
+
+LOCAL_SYSTEM_SHARED_LIBRARIES := libc libcutils
+
+LOCAL_MODULE_TAGS := debug
+
+LOCAL_STATIC_LIBRARIES += libbridge
+
+LOCAL_MODULE := brctl
+
+include $(BUILD_EXECUTABLE)
diff --git a/brctl/brctl.c b/brctl/brctl.c
index 46ca352..87af143 100644
--- a/brctl/brctl.c
+++ b/brctl/brctl.c
@@ -24,7 +24,6 @@
#include "libbridge.h"
#include "config.h"
-
#include "brctl.h"
static void help()
@@ -39,9 +38,9 @@ int main(int argc, char *const* argv)
const struct command *cmd;
int f;
static const struct option options[] = {
- { .name = "help", .val = 'h' },
- { .name = "version", .val = 'V' },
- { 0 }
+ { .name = "help", .has_arg = '0', .flag = 0, .val = 'h' },
+ { .name = "version", .has_arg = '0', .flag = 0, .val = 'V' },
+ { 0,0,0,0 }
};
while ((f = getopt_long(argc, argv, "Vh", options, NULL)) != EOF)