void rdr_up2apr(char *up_path, char *ecore)
{
	char cmd[ARCH_NAME_MAX];
	char time[RDR_TIME_LEN];
	int ret = 0;

	if (ecore == NULL)
		return;
	pr_info("rdr:%s():upload to %s exception class\n", __func__, ecore);
	if (!strncmp(ecore, RDR_STR_CORE_CP, strlen(RDR_STR_CORE_CP))) {
		ret = log_to_exception("rild", "modem_exception balong reset");
		if (ret < 0)
			pr_err("rdr:%s():logexception sysfs err.\n", __func__);
		return;
	}

	get_time_stamp(time, RDR_TIME_LEN);
	if (!strncmp(ecore, RDR_STR_CORE_HIFI, strlen(RDR_STR_CORE_HIFI))) {
		snprintf(cmd, ARCH_NAME_MAX,
			"archive -i %s -i %s -i %s -o %s_%s -z zip",
			 up_path, "/data/android_logs/kmsgcat-log",
			 "/data/hisi_logs/hifi_log", time, "hificrash");
		ret = log_to_exception("balong_hifi", cmd);
	} else {
		snprintf(cmd, ARCH_NAME_MAX,
			"archive -i %s -i %s -o %s_%s -z zip", up_path,
			"/data/android_logs/kmsgcat-log", time, "apanic");
		ret = log_to_exception("balong_apanic", cmd);
	}

	if (ret < 0)
		pr_err("rdr:%s():logexception sysfs err.\n", __func__);
	return;
}
Ejemplo n.º 2
0
static void apr_log_entry(struct work_struct *dummy)
{
	char cmd[256];
	char time_buf[16];
	int ret = 0;
	get_time_stamp(time_buf,16);
	snprintf(cmd, 256, "%s%s%s%s%s",
			"archive -i /data/flashless",
			" -i /data/android_logs/kmsgcat-log -i /data/android_logs/kmsgcat-log.1",
			" -o ", time_buf, "_VIAMODEM -z zip");
	ret = log_to_exception("viamodem",cmd);
	if(ret < 0 ){
		pr_err("%s logexception sysfs err.\n", __func__);
	}
	pr_info("%s %d cmd %s ret %d\n", __func__, __LINE__, cmd, ret);

}