int mtk_set_kgdboc_var(void) { struct console *con = NULL; for_each_console(con) { if (!strcmp(con->name, "ttyMT")) { snprintf(config, strlen(con->name)+2, "%s%d", con->name, con->index); printk("mtk_set_kgdboc_var=%s\n", config); } } if (configured == 1) return 0; /* Only copy in the string if the init function has not run yet */ if (configured < 0) { return 0; } if (kgdb_connected) { printk(KERN_ERR "kgdboc: Cannot reconfigure while KGDB is connected.\n"); return -EBUSY; } /* Go and configure with the new params. */ return configure_kgdboc(); }
static int param_set_kgdboc_var(const char *kmessage, struct kernel_param *kp) { int len = strlen(kmessage); if (len >= MAX_CONFIG_LEN) { printk(KERN_ERR "kgdboc: config string too long\n"); return -ENOSPC; } /* Only copy in the string if the init function has not run yet */ if (configured < 0) { strcpy(config, kmessage); return 0; } if (kgdb_connected) { printk(KERN_ERR "kgdboc: Cannot reconfigure while KGDB is connected.\n"); return -EBUSY; } strcpy(config, kmessage); /* Chop out \n char as a result of echo */ if (config[len - 1] == '\n') config[len - 1] = '\0'; if (configured == 1) cleanup_kgdboc(); /* Go and configure with the new params. */ return configure_kgdboc(); }
static int param_set_kgdboc_var(const char *kmessage, struct kernel_param *kp) { int len = strlen(kmessage); if (len >= MAX_CONFIG_LEN) { printk(KERN_ERR "kgdboc: config string too long\n"); return -ENOSPC; } /* */ if (configured < 0) { strcpy(config, kmessage); return 0; } if (kgdb_connected) { printk(KERN_ERR "kgdboc: Cannot reconfigure while KGDB is connected.\n"); return -EBUSY; } strcpy(config, kmessage); /* */ if (config[len - 1] == '\n') config[len - 1] = '\0'; if (configured == 1) cleanup_kgdboc(); /* */ return configure_kgdboc(); }
static int __init init_kgdboc(void) { /* Already configured? */ if (configured == 1) return 0; return configure_kgdboc(); }
static void ttycheck_func(struct work_struct *work) { configure_kgdboc(); }
static void ttycheck_func(struct work_struct *work) { config_retry_time = 0; configure_kgdboc(); }