From: Wen Xiong <wenxi...@linux.vnet.ibm.com> iprconfig Analyze log is broken in most distros are moving towards using journalctl for viewing the system logs. This patch removes the Analze log in iprconfig.
Signed-off-by: Wen Xiong <wenxi...@linux.vnet.ibm.com> --- iprconfig.c | 761 ----------------------------------------------------------- iprconfig.h | 112 --------- 2 files changed, 0 insertions(+), 873 deletions(-) diff --git a/iprconfig.c b/iprconfig.c index 5da12cc..1108248 100644 --- a/iprconfig.c +++ b/iprconfig.c @@ -12108,767 +12108,6 @@ int ucode_screen(i_container *i_con) return display_features_menu(i_con, &n_ucode_screen); } -/** -* log_menu - -* @i_con: i_container struct -* -* Returns: -* 0 if success / non-zero on failure FIXME -**/ -int log_menu(i_container *i_con) -{ - char cmnd[MAX_CMD_LENGTH]; - int rc, loop; - struct stat file_stat; - struct screen_output *s_out; - int offset = 0; - - sprintf(cmnd,"%s/boot.msg",log_root_dir); - rc = stat(cmnd, &file_stat); - - if (rc) - /* file does not exist - do not display option */ - offset--; - - for (loop = 0; loop < (n_log_menu.num_opts + offset); loop++) { - n_log_menu.body = ipr_list_opts(n_log_menu.body, - n_log_menu.options[loop].key, - n_log_menu.options[loop].list_str); - } - n_log_menu.body = ipr_end_list(n_log_menu.body); - - s_out = screen_driver(&n_log_menu, 0, NULL); - free(n_log_menu.body); - n_log_menu.body = NULL; - rc = s_out->rc; - i_con = s_out->i_con; - i_con = free_i_con(i_con); - free(s_out); - return rc; -} - -static int invoke_pager(char *filename) -{ - int pid, status; - char *argv[] = { - DEFAULT_EDITOR, "-c", - filename, NULL - }; - - pid = fork(); - if (pid) { - waitpid(pid, &status, 0); - } else { - /* disable insecure pager features */ - putenv("LESSSECURE=1"); - execvp(argv[0], argv); - _exit(errno); - } - return WEXITSTATUS(status); -} - -#define EDITOR_MAX_ARGS 32 -static int invoke_editor(char* filename) -{ - int i; - int rc, pid, status; - - /* if editor not set, use secure pager */ - if (strcmp(editor, DEFAULT_EDITOR) == 0) { - rc = invoke_pager(filename); - return rc; - } - - pid = fork(); - if (pid == 0) { - char *tok; - char *argv[EDITOR_MAX_ARGS]; - char cmnd[MAX_CMD_LENGTH]; - - /* copy editor name to argv[0] */ - strncpy(cmnd, editor, sizeof(cmnd) - 1); - tok = strtok(cmnd, " "); - argv[0] = malloc(strlen(tok)); - strcpy(argv[0], tok); - - /* handle editor arguments, if any */ - for (i = 1; i < EDITOR_MAX_ARGS - 2; ++i) { - tok = strtok(NULL, " "); - if (tok == NULL) - break; - argv[i] = malloc(strlen(tok)); - strcpy(argv[i], tok); - } - argv[i] = filename; - argv[i+1] = NULL; - - execvp(argv[0], argv); - _exit(errno); - } else { - waitpid(pid, &status, 0); - } - - return WEXITSTATUS(status); -} - -/** - * ibm_storage_log_tail - - * @i_con: i_container struct - * - * Returns: - * 0 on success / non-zero on failure - **/ -int ibm_storage_log_tail(i_container *i_con) -{ - int rc, len; - int log_fd; - char line[MAX_CMD_LENGTH]; - char logfile[MAX_CMD_LENGTH]; - char *tmp_log; - FILE *logsource_fp; - - /* aux variables for erasing unnecessary log info */ - const char *local_s = "localhost kernel: ipr"; - const char *kernel_s = "kernel: ipr"; - char prefix[256]; - char host[256]; - char *dot; - - tmp_log = strdup(_PATH_TMP"iprerror-XXXXXX"); - log_fd = mkstemp(tmp_log); - if (log_fd < 0) { - s_status.str = strerror(errno); - syslog(LOG_ERR, "Could not create tmp log file: %m\n"); - free(tmp_log); - return RC_94_Tmp_Log_Fail; - } - - def_prog_mode(); - endwin(); - - snprintf(logfile, sizeof(logfile), "%s/messages", log_root_dir); - logsource_fp = fopen(logfile, "r"); - if (!logsource_fp) { - syslog(LOG_ERR, "Could not open %s: %m\n", logfile); - free(tmp_log); - close(log_fd); - return RC_75_Failed_Read_Err_Log; - } - - while (fgets(line, sizeof(line), logsource_fp)) { - /* ignore lines that dont contain 'ipr' */ - if (strstr(line, "ipr") == NULL) - continue; - - /* build prefix using current hostname */ - gethostname(host, sizeof(host)); - dot = strchr(host, '.'); - if (dot) - *dot = '\0'; - snprintf(prefix, sizeof(prefix), "%s kernel: ipr", host); - - /* erase prefix, local_s and kernel_s from line: - * dot+strlen points to beginning of prefix - * strlen(dot) - strlen(prefix) + 1 == size of the rest of line - * - * code below moves 'rest of line' on top of prefix et al. */ - if (dot = strstr(line, prefix)) { - memmove(dot, dot + strlen(prefix), - strlen(dot) - strlen(prefix) + 1); - } else if (dot = strstr(line, local_s)) { - memmove(dot, dot+strlen(local_s), - strlen(dot) - strlen(local_s) + 1); - } else if (dot = strstr(line, kernel_s)) { - memmove(dot, dot+strlen(kernel_s), - strlen(dot) - strlen(kernel_s) + 1); - } - - write(log_fd, line, strlen(line)); - } - - fclose(logsource_fp); - close(log_fd); - rc = invoke_editor(tmp_log); - free(tmp_log); - - if ((rc != 0) && (rc != 127)) { - /* "Editor returned %d. Try setting the default editor" */ - s_status.num = rc; - return RC_65_Set_Default_Editor; - } else { - /* return with success */ - return RC_0_Success; - } -} - -/** - * select_log_file - - * @dir_entry: dirent struct - * - * Returns: - * 1 if "messages" if found in the dir_entry->d_name / 0 otherwise - **/ -static int select_log_file(const struct dirent *dir_entry) -{ - if (dir_entry) { - if (strstr(dir_entry->d_name, "messages") == dir_entry->d_name) - return 1; - } - return 0; -} - -/** - * compare_log_file - - * @log_file1: - * @log_file2: - * - * Returns: - * 0 if success / non-zero on failure FIXME - **/ -static int compare_log_file(const struct dirent **first_dir, const struct dirent **second_dir) -{ - char name1[MAX_CMD_LENGTH], name2[MAX_CMD_LENGTH]; - struct stat stat1, stat2; - - if (strcmp((*first_dir)->d_name, "messages") == 0) - return 1; - if (strcmp((*second_dir)->d_name, "messages") == 0) - return -1; - - sprintf(name1, "%s/%s", log_root_dir, (*first_dir)->d_name); - sprintf(name2, "%s/%s", log_root_dir, (*second_dir)->d_name); - - if (stat(name1, &stat1)) - return 1; - if (stat(name2, &stat2)) - return -1; - - if (stat1.st_mtime < stat2.st_mtime) - return -1; - if (stat1.st_mtime > stat2.st_mtime) - return 1; - return 0; -} - -/** - * ibm_storage_log - - * @i_con: i_container struct - * - * Returns: - * 0 on success / non-zero on failure FIXME - **/ -int ibm_storage_log(i_container *i_con) -{ - char line[MAX_CMD_LENGTH]; - char logfile[MAX_CMD_LENGTH]; - int i; - struct dirent **log_files; - struct dirent **dirent; - int num_dir_entries; - int rc, len; - int log_fd; - char *tmp_log; - gzFile logsource_fp; - - /* aux variables for erasing unnecessary log info */ - const char *local_s = "localhost kernel: ipr"; - const char *kernel_s = "kernel: ipr"; - char prefix[256]; - char host[256]; - char *dot; - - tmp_log = strdup(_PATH_TMP"iprerror-XXXXXX"); - log_fd = mkstemp(tmp_log); - if (log_fd < 0) { - s_status.str = strerror(errno); - syslog(LOG_ERR, "Could not create tmp log file: %m\n"); - free(tmp_log); - return RC_94_Tmp_Log_Fail; - } - - def_prog_mode(); - endwin(); - - num_dir_entries = scandir(log_root_dir, &log_files, select_log_file, compare_log_file); - if (num_dir_entries < 0) { - s_status.num = 75; - return RC_75_Failed_Read_Err_Log; - } - - if (num_dir_entries) - dirent = log_files; - - for (i = 0; i < num_dir_entries; ++i) { - snprintf(logfile, sizeof(logfile), "%s/%s", log_root_dir, - (*dirent)->d_name); - logsource_fp = gzopen(logfile, "r"); - if (logsource_fp == NULL) { - syslog(LOG_ERR, "Could not open %s: %m\n", line); - close(log_fd); - continue; /* proceed to next log file */ - } - - while (gzgets(logsource_fp, line, sizeof(line))) { - /* ignore lines that dont contain 'ipr' */ - if (strstr(line, "ipr") == NULL) - continue; - - gethostname(host, sizeof(host)); - dot = strchr(host, '.'); - if (dot) - *dot = '\0'; - snprintf(prefix, sizeof(prefix), "%s kernel: ipr", - host); - - /* erase prefix, local_s and kernel_s from line: - * dot+strlen points to beginning of prefix - * strlen(dot) - strlen(prefix) + 1 == - * size of the rest of line - * - * code below moves 'rest of line' on top of prefix */ - if (dot = strstr(line, prefix)) { - memmove(dot, dot + strlen(prefix), - strlen(dot) - strlen(prefix) + 1); - } else if (dot = strstr(line, local_s)) { - memmove(dot, dot + strlen(local_s), - strlen(dot) - strlen(local_s) + 1); - } else if (dot = strstr(line, kernel_s)) { - memmove(dot, dot + strlen(kernel_s), - strlen(dot) - strlen(kernel_s) + 1); - } - - write(log_fd, line, strlen(line)); - } - gzclose(logsource_fp); - dirent++; - } - - close(log_fd); - rc = invoke_editor(tmp_log); - free(tmp_log); - - if (num_dir_entries) { - while (num_dir_entries--) - free(log_files[num_dir_entries]); - free(log_files); - } - - if ((rc != 0) && (rc != 127)) { - /* "Editor returned %d. Try setting the default editor" */ - s_status.num = rc; - return RC_65_Set_Default_Editor; - } else { - /* return with success */ - return RC_0_Success; - } -} - -/** - * kernel_log - - * @i_con: i_container struct - * - * Returns: - * 0 if success / non-zero on failure FIXME - **/ -int kernel_log(i_container *i_con) -{ - char line[MAX_CMD_LENGTH]; - char logfile[MAX_CMD_LENGTH]; - int rc, i; - struct dirent **log_files; - struct dirent **dirent; - int num_dir_entries; - int len; - int log_fd; - char *tmp_log; - gzFile logsource_fp; - - tmp_log = strdup(_PATH_TMP"iprerror-XXXXXX"); - log_fd = mkstemp(tmp_log); - if (log_fd < 0) { - s_status.str = strerror(errno); - syslog(LOG_ERR, "Could not create tmp log file: %m\n"); - free(tmp_log); - return RC_94_Tmp_Log_Fail; - } - - def_prog_mode(); - endwin(); - - num_dir_entries = scandir(log_root_dir, &log_files, select_log_file, compare_log_file); - if (num_dir_entries < 0) { - s_status.num = 75; - return RC_75_Failed_Read_Err_Log; - } - - if (num_dir_entries) - dirent = log_files; - - for (i = 0; i < num_dir_entries; ++i) { - snprintf(logfile, sizeof(logfile), "%s/%s", log_root_dir, - (*dirent)->d_name); - logsource_fp = gzopen(logfile, "r"); - if (logsource_fp == NULL) { - syslog(LOG_ERR, "Could not open %s: %m\n", line); - close(log_fd); - continue; /* proceed to next log file */ - } - - while (gzgets(logsource_fp, line, sizeof(line))) - write(log_fd, line, strlen(line)); - gzclose(logsource_fp); - dirent++; - } - - close(log_fd); - rc = invoke_editor(tmp_log); - free(tmp_log); - - if (num_dir_entries > 0) { - while (num_dir_entries--) - free(log_files[num_dir_entries]); - free(log_files); - } - - if ((rc != 0) && (rc != 127)) { - /* "Editor returned %d. Try setting the default editor" */ - s_status.num = rc; - return RC_65_Set_Default_Editor; - } - else { - /* return with success */ - return RC_0_Success; - } -} - -/** - * iprconfig_log - - * @i_con: i_container struct - * - * Returns: - * 0 if success / non-zero on failure FIXME - **/ -int iprconfig_log(i_container *i_con) -{ - char line[MAX_CMD_LENGTH]; - char logfile[MAX_CMD_LENGTH]; - int rc, i; - struct dirent **log_files; - struct dirent **dirent; - int num_dir_entries; - int len; - int log_fd; - char *tmp_log; - gzFile logsource_fp; - - tmp_log = strdup(_PATH_TMP"iprerror-XXXXXX"); - log_fd = mkstemp(tmp_log); - if (log_fd < 0) { - s_status.str = strerror(errno); - syslog(LOG_ERR, "Could not create tmp log file: %m\n"); - free(tmp_log); - return RC_94_Tmp_Log_Fail; - } - - def_prog_mode(); - endwin(); - - num_dir_entries = scandir(log_root_dir, &log_files, select_log_file, compare_log_file); - if (num_dir_entries < 0) { - s_status.num = 75; - return RC_75_Failed_Read_Err_Log; - } - - if (num_dir_entries) - dirent = log_files; - - for (i = 0; i < num_dir_entries; ++i) { - snprintf(logfile, sizeof(logfile), "%s/%s", log_root_dir, - (*dirent)->d_name); - logsource_fp = gzopen(logfile, "r"); - if (logsource_fp == NULL) { - syslog(LOG_ERR, "Could not open %s: %m\n", line); - close(log_fd); - continue; /* proceed to next log file */ - } - - while (gzgets(logsource_fp, line, sizeof(line))) { - /* ignore lines that dont contain 'iprconfig' */ - if (strstr(line, "iprconfig") == NULL) - continue; - write(log_fd, line, strlen(line)); - } - gzclose(logsource_fp); - dirent++; - } - - close(log_fd); - rc = invoke_editor(tmp_log); - free(tmp_log); - - if (num_dir_entries) { - while (num_dir_entries--) - free(log_files[num_dir_entries]); - free(log_files); - } - - if ((rc != 0) && (rc != 127)) { - /* "Editor returned %d. Try setting the default editor" */ - s_status.num = rc; - return RC_65_Set_Default_Editor; - } else { - /* return with success */ - return RC_0_Success; - } -} - -/** - * kernel_root - - * @i_con: i_container struct - * - * Returns: - * 0 if success / non-zero on failure FIXME - **/ -int kernel_root(i_container *i_con) -{ - int rc; - struct screen_output *s_out; - char *body = NULL; - - i_con = free_i_con(i_con); - - /* i_con to return field data */ - i_con = add_i_con(i_con,"",NULL); - - body = body_init(n_kernel_root.header, NULL); - body = add_line_to_body(body,_("Current root directory"), log_root_dir); - body = add_line_to_body(body,_("New root directory"), "%39"); - - n_kernel_root.body = body; - s_out = screen_driver(&n_kernel_root, 0, i_con); - - free(n_kernel_root.body); - n_kernel_root.body = NULL; - rc = s_out->rc; - free(s_out); - - return rc; -} - -/** - * confirm_kernel_root - - * @i_con: i_container struct - * - * Returns: - * 0 if success / non-zero on failure FIXME - **/ -int confirm_kernel_root(i_container *i_con) -{ - int rc; - DIR *dir; - char *input; - struct screen_output *s_out; - char *body = NULL; - - input = strip_trailing_whitespace(i_con->field_data); - if (strlen(input) == 0) - return (EXIT_FLAG | 61); - - dir = opendir(input); - - if (dir == NULL) - /* "Invalid directory" */ - return 59; - else { - closedir(dir); - if (strcmp(log_root_dir, input) == 0) - /*"Root directory unchanged"*/ - return (EXIT_FLAG | 61); - } - - body = body_init(n_confirm_kernel_root.header, NULL); - body = add_line_to_body(body,_("New root directory"), input); - - n_confirm_kernel_root.body = body; - s_out = screen_driver(&n_confirm_kernel_root, 0, i_con); - - free(n_confirm_kernel_root.body); - n_confirm_kernel_root.body = NULL; - - rc = s_out->rc; - if (rc == 0) { - /*"Root directory changed to %s"*/ - strcpy(log_root_dir, i_con->field_data); - s_status.str = log_root_dir; - rc = (EXIT_FLAG | 60); - } - - else - /*"Root directory unchanged"*/ - rc = (EXIT_FLAG | 61); - - free(s_out); - return rc; -} - -/** - * set_default_editor - - * @i_con: i_container struct - * - * Returns: - * 0 if success / non-zero on failure FIXME - **/ -int set_default_editor(i_container *i_con) -{ - int rc = 0; - struct screen_output *s_out; - char *body = NULL; - - i_con = free_i_con(i_con); - i_con = add_i_con(i_con,"",NULL); - - body = body_init(n_set_default_editor.header, NULL); - body = add_line_to_body(body, _("Current editor"), editor); - body = add_line_to_body(body, _("New editor"), "%39"); - - n_set_default_editor.body = body; - s_out = screen_driver(&n_set_default_editor, 0, i_con); - - free(n_set_default_editor.body); - n_set_default_editor.body = NULL; - rc = s_out->rc; - free(s_out); - - return rc; -} - -/** - * confirm_set_default_editor - - * @i_con: i_container struct - * - * Returns: - * EXIT_FLAG | 62 if editor changed / EXIT_FLAG | 63 if editor unchanged - **/ -int confirm_set_default_editor(i_container *i_con) -{ - int rc; - char *input; - struct screen_output *s_out; - char *body = NULL; - - input = strip_trailing_whitespace(i_con->field_data); - if (strlen(input) == 0) - /*"Editor unchanged"*/ - return (EXIT_FLAG | 63); - - if (strcmp(editor, input) == 0) - /*"Editor unchanged"*/ - return (EXIT_FLAG | 63); - - body = body_init(n_confirm_set_default_editor.header, NULL); - body = add_line_to_body(body,_("New editor"), input); - - n_confirm_set_default_editor.body = body; - s_out = screen_driver(&n_confirm_set_default_editor, 0, i_con); - - free(n_confirm_set_default_editor.body); - n_confirm_set_default_editor.body = NULL; - - rc = s_out->rc; - if (rc == 0) { - /*"Editor changed to %s"*/ - strcpy(editor, i_con->field_data); - s_status.str = editor; - rc = (EXIT_FLAG | 62); - } else - /*"Editor unchanged"*/ - rc = (EXIT_FLAG | 63); - - free(s_out); - return rc; -} - -/** - * restore_log_defaults - - * @i_con: i_container struct - * - * Returns: - * 64 - **/ -int restore_log_defaults(i_container *i_con) -{ - strcpy(log_root_dir, DEFAULT_LOG_DIR); - strcpy(editor, DEFAULT_EDITOR); - return 64; /*"Default log values restored"*/ -} - -/** - * ibm_boot_log - - * @i_con: i_container struct - * - * Returns: - * 0 if success / non-zero on failure FIXME - **/ -int ibm_boot_log(i_container *i_con) -{ - char line[MAX_CMD_LENGTH]; - char logfile[MAX_CMD_LENGTH]; - int rc; - int len; - struct stat file_stat; - int log_fd; - char *tmp_log; - FILE *logsource_fp; - - sprintf(line,"%s/boot.msg",log_root_dir); - rc = stat(line, &file_stat); - if (rc) - return 2; /* "Invalid option specified" */ - - tmp_log = strdup(_PATH_TMP"iprerror-XXXXXX"); - log_fd = mkstemp(tmp_log); - if (log_fd < 0) { - s_status.str = strerror(errno); - syslog(LOG_ERR, "Could not create temp log file: %m\n"); - free(tmp_log); - return RC_94_Tmp_Log_Fail; - } - - def_prog_mode(); - endwin(); - - snprintf(logfile, sizeof(logfile), "%s/boot.msg", log_root_dir); - logsource_fp = fopen(logfile, "r"); - if (!logsource_fp) { - syslog(LOG_ERR, "Could not open %s: %m\n", line); - free(tmp_log); - close(log_fd); - return RC_75_Failed_Read_Err_Log; - } - - while (fgets(line, sizeof(line), logsource_fp)) { - /* ignore lines that dont contain 'ipr' */ - if (strstr(line, "ipr") == NULL) - continue; - - write(log_fd, line, strlen(line)); - } - - fclose(logsource_fp); - close(log_fd); - rc = invoke_editor(tmp_log); - free(tmp_log); - - if ((rc != 0) && (rc != 127)) { - /* "Editor returned %d. Try setting the default editor" */ - s_status.num = rc; - return RC_65_Set_Default_Editor; - } else { - /* return with no status */ - return RC_0_Success; - } -} - int get_ses_ioport_status(struct ipr_dev *ses) { struct ipr_query_io_port io_status; diff --git a/iprconfig.h b/iprconfig.h index a6f6e75..d8b76fe 100644 --- a/iprconfig.h +++ b/iprconfig.h @@ -138,21 +138,6 @@ int ucode_screen(i_container *i_con); int download_ucode(i_container *); int download_all_ucode(i_container *); int choose_ucode(i_container *); -int log_menu(i_container *); -int ibm_storage_log_tail(i_container *); -int ibm_storage_log(i_container *); -int kernel_log(i_container *); -int iprconfig_log(i_container *); -int kernel_root(i_container *); -int confirm_kernel_root(i_container *); -int confirm_kernel_root_change(i_container *); -int confirm_kernel_root_change2(i_container *); -int set_default_editor(i_container *); -int confirm_set_default_editor(i_container *); -int confirm_set_default_editor_change(i_container *); -int confirm_set_default_editor_change2(i_container *); -int restore_log_defaults(i_container *); -int ibm_boot_log(i_container *); int exit_confirmed(i_container *); int statistics_menu(i_container *); @@ -197,7 +182,6 @@ struct screen_opts main_menu_opt[] = { {config_menu, "4", __("Work with configuration options")}, {ucode_screen, "5", __("Work with microcode updates")}, {statistics_menu, "6", __("Devices Statistics")}, - {log_menu, "7", __("Analyze log")} }; s_node n_main_menu = { @@ -1512,102 +1496,6 @@ s_node n_download_ucode_in_progress = { "" } }; -struct screen_opts log_menu_opt[] = { - {ibm_storage_log_tail, "1", __("View most recent ipr error messages")}, - {ibm_storage_log, "2", __("View ipr error messages")}, - {kernel_log, "3", __("View all kernel error messages")}, - {iprconfig_log, "4", __("View iprconfig error messages")}, - {kernel_root, "5", __("Set root kernel message log directory")}, - {set_default_editor, "6", __("Set default editor")}, - {restore_log_defaults, "7", __("Restore defaults")}, - {ibm_boot_log, "8", __("View ipr boot time messages")} -}; - -s_node n_log_menu = { - .rc_flags = (EXIT_FLAG | CANCEL_FLAG | REFRESH_FLAG), - .f_flags = (EXIT_FLAG | CANCEL_FLAG), - .num_opts = NUM_OPTS(log_menu_opt), - .options = &log_menu_opt[0], - .title = __("Kernel Messages Log"), - .header = { - __("ATTENTION: Devices listed below are currently known to be zeroed. " - "By exiting now, this information will be lost, resulting in potentially " - "longer array creation times.\n\n"), - __(" q=Cancel to return to iprconfig.\n"), - __(" e=Exit iprconfig\n") - } -}; - -s_node n_exit_menu = { - .rc_flags = (EXIT_FLAG | CANCEL_FLAG), - .f_flags = (EXIT_FLAG | CANCEL_FLAG), - .num_opts = NUM_OPTS(log_menu_opt), - .options = &null_opt[0], - .title = __("Confirm Exit") -}; - -struct screen_opts kernel_root_opt[] = { - {confirm_kernel_root, "\n"} -}; - -s_node n_kernel_root = { - .f_flags = (ENTER_FLAG), - .num_opts = NUM_OPTS(kernel_root_opt), - .options = &kernel_root_opt[0], - .title = __("Kernel Messages Log Root Directory"), - .header = { - __("Enter new directory and press Enter\n\n"), - "" } -}; - -struct screen_opts confirm_kernel_root_opt[] = { - {NULL, "c"}, -}; - -s_node n_confirm_kernel_root = { - .f_flags = (CONFIRM_FLAG | CANCEL_FLAG), - .num_opts = NUM_OPTS(confirm_kernel_root_opt), - .options = &confirm_kernel_root_opt[0], - .title = __("Confirm Root Directory Change"), - .header = { - __("Press 'c' to confirm your new " - "kernel root directory choice.\n\n"), - __("To return to the log menu without " - "changing the root directory, choose 'q'.\n\n"), - "" } -}; - -struct screen_opts set_default_editor_opt[] = { - {confirm_set_default_editor, "\n"} -}; - -s_node n_set_default_editor = { - .f_flags = (ENTER_FLAG), - .num_opts = NUM_OPTS(set_default_editor_opt), - .options = &set_default_editor_opt[0], - .title = __("Kernel Messages Editor"), - .header = { - __("Enter new editor command and press Enter\n\n"), - "" } -}; - -struct screen_opts confirm_set_default_editor_opt[] = { - {NULL, "c"} -}; - -s_node n_confirm_set_default_editor = { - .f_flags = (CONFIRM_FLAG | CANCEL_FLAG), - .num_opts = NUM_OPTS(confirm_set_default_editor_opt), - .options = &confirm_set_default_editor_opt[0], - .title = __("Confirm Editor Change"), - .header = { - __("Press 'c' to confirm your editor choice\n\n"), - __("To return to the log menu without " - "changing the editor, choose 'q'.\n\n"), - "" } -}; - - struct screen_opts ucode_screen_opt[] = { {download_ucode, "1", __("Download microcode")}, {download_all_ucode, "2", __("Download latest microcode to all devices")}, -- 1.6.0.2 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Iprdd-devel mailing list Iprdd-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iprdd-devel