crash/crash_log.patch
Dave Anderson bdde3e005a - Update to latest upstream release
- Use system readline library
- Fix "crash --log vmcore" command for 3.11 and later kernels.
2014-02-28 15:18:55 -05:00

66 lines
2.5 KiB
Diff

--- crash-7.0.5/kernel.c.orig
+++ crash-7.0.5/kernel.c
@@ -8980,6 +8980,12 @@ get_log_from_vmcoreinfo(char *file, char
fprintf(fp, "OFFSET(log.ts_nsec): %ld\n",
vmc->log_ts_nsec_OFFSET);
free(string);
+ } else if ((string = vmcoreinfo_read_string("OFFSET(printk_log.ts_nsec)"))) {
+ vmc->log_ts_nsec_OFFSET = dtol(string, RETURN_ON_ERROR, NULL);
+ if (CRASHDEBUG(1))
+ fprintf(fp, "OFFSET(printk_log.ts_nsec): %ld\n",
+ vmc->log_ts_nsec_OFFSET);
+ free(string);
}
if ((string = vmcoreinfo_read_string("OFFSET(log.len)"))) {
vmc->log_len_OFFSET = dtol(string, RETURN_ON_ERROR, NULL);
@@ -8987,6 +8993,12 @@ get_log_from_vmcoreinfo(char *file, char
fprintf(fp, "OFFSET(log.len): %ld\n",
vmc->log_len_OFFSET);
free(string);
+ } else if ((string = vmcoreinfo_read_string("OFFSET(printk_log.len)"))) {
+ vmc->log_len_OFFSET = dtol(string, RETURN_ON_ERROR, NULL);
+ if (CRASHDEBUG(1))
+ fprintf(fp, "OFFSET(printk_log.len): %ld\n",
+ vmc->log_len_OFFSET);
+ free(string);
}
if ((string = vmcoreinfo_read_string("OFFSET(log.text_len)"))) {
vmc->log_text_len_OFFSET = dtol(string, RETURN_ON_ERROR, NULL);
@@ -8994,6 +9006,12 @@ get_log_from_vmcoreinfo(char *file, char
fprintf(fp, "OFFSET(log.text_len): %ld\n",
vmc->log_text_len_OFFSET);
free(string);
+ } else if ((string = vmcoreinfo_read_string("OFFSET(printk_log.text_len)"))) {
+ vmc->log_text_len_OFFSET = dtol(string, RETURN_ON_ERROR, NULL);
+ if (CRASHDEBUG(1))
+ fprintf(fp, "OFFSET(printk_log.text_len): %ld\n",
+ vmc->log_text_len_OFFSET);
+ free(string);
}
if ((string = vmcoreinfo_read_string("OFFSET(log.dict_len)"))) {
vmc->log_dict_len_OFFSET = dtol(string, RETURN_ON_ERROR, NULL);
@@ -9001,12 +9019,23 @@ get_log_from_vmcoreinfo(char *file, char
fprintf(fp, "OFFSET(log.dict_len): %ld\n",
vmc->log_dict_len_OFFSET);
free(string);
+ } else if ((string = vmcoreinfo_read_string("OFFSET(printk_log.dict_len)"))) {
+ vmc->log_dict_len_OFFSET = dtol(string, RETURN_ON_ERROR, NULL);
+ if (CRASHDEBUG(1))
+ fprintf(fp, "OFFSET(printk_log.dict_len): %ld\n",
+ vmc->log_dict_len_OFFSET);
+ free(string);
}
if ((string = vmcoreinfo_read_string("SIZE(log)"))) {
vmc->log_SIZE = dtol(string, RETURN_ON_ERROR, NULL);
if (CRASHDEBUG(1))
fprintf(fp, "SIZE(log): %ld\n", vmc->log_SIZE);
free(string);
+ } else if ((string = vmcoreinfo_read_string("SIZE(printk_log)"))) {
+ vmc->log_SIZE = dtol(string, RETURN_ON_ERROR, NULL);
+ if (CRASHDEBUG(1))
+ fprintf(fp, "SIZE(printk_log): %ld\n", vmc->log_SIZE);
+ free(string);
}
/*