Home | History | Annotate | Download | only in dumpstate
      1 /*
      2  * Copyright (C) 2012 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 #include <dumpstate.h>
     18 
     19 void dump_ks_bridges()
     20 {
     21     int i;
     22     for (i = 1; i <= 4; ++i) {
     23         char path[64], title[32];
     24         sprintf(path, "/sys/kernel/debug/ks_bridge/ks_bridge:%d", i);
     25         sprintf(title, "KS BRIDGE LOG#%d", i);
     26         dump_file(title, path);
     27     }
     28 }
     29 
     30 void dumpstate_board()
     31 {
     32     dump_file("INTERRUPTS", "/proc/interrupts");
     33     run_command("MODEM TOMBSTONES", 5, SU_PATH, "root", "ls", "-l", "/data/tombstones/mdm", NULL);
     34     dump_ks_bridges();
     35     dump_file("eMMC manfid",
     36         "/sys/devices/platform/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/manfid");
     37     dump_file("eMMC capacity",
     38         "/sys/devices/platform/msm_sdcc.1/mmc_host/mmc0/mmc0:0001/sec_count");
     39 };
     40