diff options
| author | 2017-03-01 23:40:07 +0000 | |
|---|---|---|
| committer | 2017-03-01 23:40:07 +0000 | |
| commit | bfc58c2c2d2579faba09a59031ffd82b148de664 (patch) | |
| tree | ebdeb646ded70e6c7b58382a29390ff1dc67ffbe /cmds/dumpstate/utils.cpp | |
| parent | 4ccb9b6fb21c458009ce3abfb51d839b3582bc17 (diff) | |
| parent | 599dc3588a345bf4f3ef3d1e4c4821be2308c90c (diff) | |
Merge "Move dumpstate to calling getprop." am: 16401044cb
am: 599dc3588a
Change-Id: Ic71ec9f048e3d47ed9be4b12903d5de172edae18
Diffstat (limited to 'cmds/dumpstate/utils.cpp')
| -rw-r--r-- | cmds/dumpstate/utils.cpp | 34 | 
1 files changed, 0 insertions, 34 deletions
diff --git a/cmds/dumpstate/utils.cpp b/cmds/dumpstate/utils.cpp index 1ee1bac52a..6ec636e029 100644 --- a/cmds/dumpstate/utils.cpp +++ b/cmds/dumpstate/utils.cpp @@ -882,40 +882,6 @@ void send_broadcast(const std::string& action, const std::vector<std::string>& a      run_command_always(NULL, DROP_ROOT, REDIRECT_TO_STDERR, 20, am_args);  } -size_t num_props = 0; -static char* props[2000]; - -static void print_prop(const char *key, const char *name, void *user) { -    (void) user; -    if (num_props < sizeof(props) / sizeof(props[0])) { -        char buf[PROPERTY_KEY_MAX + PROPERTY_VALUE_MAX + 10]; -        snprintf(buf, sizeof(buf), "[%s]: [%s]\n", key, name); -        props[num_props++] = strdup(buf); -    } -} - -static int compare_prop(const void *a, const void *b) { -    return strcmp(*(char * const *) a, *(char * const *) b); -} - -/* prints all the system properties */ -void print_properties() { -    const char* title = "SYSTEM PROPERTIES"; -    DurationReporter duration_reporter(title); -    printf("------ %s ------\n", title); -    ON_DRY_RUN_RETURN(); -    size_t i; -    num_props = 0; -    property_list(print_prop, NULL); -    qsort(&props, num_props, sizeof(props[0]), compare_prop); - -    for (i = 0; i < num_props; ++i) { -        fputs(props[i], stdout); -        free(props[i]); -    } -    printf("\n"); -} -  int open_socket(const char *service) {      int s = android_get_control_socket(service);      if (s < 0) {  |