Changeset View
Changeset View
Standalone View
Standalone View
head/sysutils/mcelog/files/patch-mcelog.c
--- mcelog.c.orig 2017-10-12 20:42:20 UTC | --- mcelog.c.orig 2018-08-09 21:49:49 UTC | ||||
+++ mcelog.c | +++ mcelog.c | ||||
@@ -20,9 +20,22 @@ | @@ -20,9 +20,23 @@ | ||||
#define _GNU_SOURCE 1 | #define _GNU_SOURCE 1 | ||||
#include <sys/fcntl.h> | #include <sys/fcntl.h> | ||||
#include <sys/ioctl.h> | #include <sys/ioctl.h> | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
#include <asm/types.h> | #include <asm/types.h> | ||||
#include <asm/ioctls.h> | #include <asm/ioctls.h> | ||||
#include <linux/limits.h> | #include <linux/limits.h> | ||||
+#endif | +#endif | ||||
+#ifdef __FreeBSD__ | +#ifdef __FreeBSD__ | ||||
+#include <sys/types.h> | +#include <sys/types.h> | ||||
+#include <sys/queue.h> | |||||
+#include <sys/sysctl.h> | +#include <sys/sysctl.h> | ||||
+#include <machine/cpufunc.h> | +#include <machine/cpufunc.h> | ||||
+#include <machine/cputypes.h> | +#include <machine/cputypes.h> | ||||
+#include <machine/specialreg.h> | +#include <machine/specialreg.h> | ||||
+#include <err.h> | +#include <err.h> | ||||
+#include <kvm.h> | +#include <kvm.h> | ||||
+#include <limits.h> | +#include <limits.h> | ||||
+#endif | +#endif | ||||
+#undef CPU_P4 | +#undef CPU_P4 | ||||
#include <stdlib.h> | #include <stdlib.h> | ||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <string.h> | #include <string.h> | ||||
@@ -60,9 +73,25 @@ | @@ -60,9 +74,25 @@ | ||||
#include "bus.h" | #include "bus.h" | ||||
#include "unknown.h" | #include "unknown.h" | ||||
+struct mca_record { | +struct mca_record { | ||||
+ uint64_t mr_status; | + uint64_t mr_status; | ||||
+ uint64_t mr_addr; | + uint64_t mr_addr; | ||||
+ uint64_t mr_misc; | + uint64_t mr_misc; | ||||
+ uint64_t mr_tsc; | + uint64_t mr_tsc; | ||||
Show All 9 Lines | |||||
enum cputype cputype = CPU_GENERIC; | enum cputype cputype = CPU_GENERIC; | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
char *logfn = LOG_DEV_FILENAME; | char *logfn = LOG_DEV_FILENAME; | ||||
+#endif | +#endif | ||||
int ignore_nodev; | int ignore_nodev; | ||||
int filter_bogus = 1; | int filter_bogus = 1; | ||||
@@ -73,7 +102,9 @@ int ascii_mode; | @@ -73,7 +103,9 @@ int ascii_mode; | ||||
int dump_raw_ascii; | int dump_raw_ascii; | ||||
int daemon_mode; | int daemon_mode; | ||||
static char *inputfile; | static char *inputfile; | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
char *processor_flags; | char *processor_flags; | ||||
+#endif | +#endif | ||||
static int foreground; | static int foreground; | ||||
int filter_memory_errors; | int filter_memory_errors; | ||||
static struct config_cred runcred = { .uid = -1U, .gid = -1U }; | static struct config_cred runcred = { .uid = -1U, .gid = -1U }; | ||||
@@ -82,6 +113,10 @@ static char pidfile_default[] = PID_FILE; | @@ -82,6 +114,10 @@ static char pidfile_default[] = PID_FILE | ||||
static char logfile_default[] = LOG_FILE; | static char logfile_default[] = LOG_FILE; | ||||
static char *pidfile = pidfile_default; | static char *pidfile = pidfile_default; | ||||
static char *logfile; | static char *logfile; | ||||
+#ifdef __FreeBSD__ | +#ifdef __FreeBSD__ | ||||
+static char *execfile; | +static char *execfile; | ||||
+static char *corefile; | +static char *corefile; | ||||
+#endif | +#endif | ||||
static int debug_numerrors; | static int debug_numerrors; | ||||
int imc_log = -1; | int imc_log = -1; | ||||
static int check_only = 0; | static int check_only = 0; | ||||
@@ -196,6 +231,7 @@ static void parse_cpuid(u32 cpuid, u32 *family, u32 *m | @@ -199,6 +235,7 @@ static void parse_cpuid(u32 cpuid, u32 * | ||||
*model += c.c.ext_model << 4; | *model += c.c.ext_model << 4; | ||||
} | } | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
static u32 unparse_cpuid(unsigned family, unsigned model) | static u32 unparse_cpuid(unsigned family, unsigned model) | ||||
{ | { | ||||
union { | union { | ||||
@@ -213,6 +249,7 @@ static u32 unparse_cpuid(unsigned family, unsigned mod | @@ -216,6 +253,7 @@ static u32 unparse_cpuid(unsigned family | ||||
c.c.ext_model = model >> 4; | c.c.ext_model = model >> 4; | ||||
return c.v; | return c.v; | ||||
} | } | ||||
+#endif | +#endif | ||||
static char *cputype_name[] = { | static char *cputype_name[] = { | ||||
[CPU_GENERIC] = "generic CPU", | [CPU_GENERIC] = "generic CPU", | ||||
@@ -329,6 +366,7 @@ static char *vendor[] = { | @@ -332,6 +370,7 @@ static char *vendor[] = { | ||||
[8] = "NSC" | [8] = "NSC" | ||||
}; | }; | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
static unsigned cpuvendor_to_num(char *name) | static unsigned cpuvendor_to_num(char *name) | ||||
{ | { | ||||
unsigned i; | unsigned i; | ||||
@@ -343,6 +381,7 @@ static unsigned cpuvendor_to_num(char *name) | @@ -346,6 +385,7 @@ static unsigned cpuvendor_to_num(char *n | ||||
return i; | return i; | ||||
return 0; | return 0; | ||||
} | } | ||||
+#endif | +#endif | ||||
static char *cpuvendor_name(u32 cpuvendor) | static char *cpuvendor_name(u32 cpuvendor) | ||||
{ | { | ||||
@@ -491,6 +530,7 @@ static void dump_mce_raw_ascii(struct mce *m, unsigned | @@ -497,6 +537,7 @@ static void dump_mce_raw_ascii(struct mc | ||||
Wprintf("\n"); | Wprintf("\n"); | ||||
} | } | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
int is_cpu_supported(void) | int is_cpu_supported(void) | ||||
{ | { | ||||
enum { | enum { | ||||
@@ -561,14 +601,61 @@ int is_cpu_supported(void) | @@ -567,14 +608,61 @@ int is_cpu_supported(void) | ||||
return 1; | return 1; | ||||
} | } | ||||
+#endif | +#endif | ||||
+ | |||||
+#ifdef __FreeBSD__ | +#ifdef __FreeBSD__ | ||||
+int is_cpu_supported(void) | +int is_cpu_supported(void) | ||||
+{ | +{ | ||||
+ char vendor[20]; | + char vendor[20]; | ||||
+ u_int regs[4]; | + u_int regs[4]; | ||||
+ u_int cpu_id; | + u_int cpu_id; | ||||
+ int family, model; | + int family, model; | ||||
+ static int checked; | + static int checked; | ||||
Show All 26 Lines | |||||
+ } else if (!strcmp(vendor,"GenuineIntel")) | + } else if (!strcmp(vendor,"GenuineIntel")) | ||||
+ cputype = select_intel_cputype(family, model); | + cputype = select_intel_cputype(family, model); | ||||
+ /* Add checks for other CPUs here */ | + /* Add checks for other CPUs here */ | ||||
+ else | + else | ||||
+ return 1; | + return 1; | ||||
+ return 0; | + return 0; | ||||
+} | +} | ||||
+#endif | +#endif | ||||
+ | |||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
static char *skipspace(char *s) | static char *skipspace(char *s) | ||||
{ | { | ||||
while (isspace(*s)) | while (isspace(*s)) | ||||
++s; | ++s; | ||||
return s; | return s; | ||||
} | } | ||||
+#endif | +#endif | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
static char *skip_syslog(char *s) | static char *skip_syslog(char *s) | ||||
{ | { | ||||
char *p; | char *p; | ||||
@@ -579,7 +666,9 @@ static char *skip_syslog(char *s) | @@ -585,7 +673,9 @@ static char *skip_syslog(char *s) | ||||
return p + sizeof("mcelog: ") - 1; | return p + sizeof("mcelog: ") - 1; | ||||
return s; | return s; | ||||
} | } | ||||
+#endif | +#endif | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
static char *skipgunk(char *s) | static char *skipgunk(char *s) | ||||
{ | { | ||||
s = skip_syslog(s); | s = skip_syslog(s); | ||||
@@ -604,12 +693,16 @@ static char *skipgunk(char *s) | @@ -610,12 +700,16 @@ static char *skipgunk(char *s) | ||||
return skipspace(s); | return skipspace(s); | ||||
} | } | ||||
+#endif | +#endif | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
static inline int urange(unsigned val, unsigned lo, unsigned hi) | static inline int urange(unsigned val, unsigned lo, unsigned hi) | ||||
{ | { | ||||
return val >= lo && val <= hi; | return val >= lo && val <= hi; | ||||
} | } | ||||
+#endif | +#endif | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
static int is_short(char *name) | static int is_short(char *name) | ||||
{ | { | ||||
return strlen(name) == 3 && | return strlen(name) == 3 && | ||||
@@ -617,7 +710,9 @@ static int is_short(char *name) | @@ -623,7 +717,9 @@ static int is_short(char *name) | ||||
islower(name[1]) && | islower(name[1]) && | ||||
islower(name[2]); | islower(name[2]); | ||||
} | } | ||||
+#endif | +#endif | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
static unsigned skip_date(char *s) | static unsigned skip_date(char *s) | ||||
{ | { | ||||
unsigned day, hour, min, year, sec; | unsigned day, hour, min, year, sec; | ||||
@@ -634,6 +729,7 @@ static unsigned skip_date(char *s) | @@ -640,6 +736,7 @@ static unsigned skip_date(char *s) | ||||
return 0; | return 0; | ||||
return next; | return next; | ||||
} | } | ||||
+#endif | +#endif | ||||
static void dump_mce_final(struct mce *m, char *symbol, int missing, int recordlen, | static void dump_mce_final(struct mce *m, char *symbol, int missing, int recordlen, | ||||
int dseen) | int dseen) | ||||
@@ -654,6 +750,7 @@ static void dump_mce_final(struct mce *m, char *symbol | @@ -660,6 +757,7 @@ static void dump_mce_final(struct mce *m | ||||
flushlog(); | flushlog(); | ||||
} | } | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
static char *skip_patterns[] = { | static char *skip_patterns[] = { | ||||
"MCA:*", | "MCA:*", | ||||
"MCi_MISC register valid*", | "MCi_MISC register valid*", | ||||
@@ -662,7 +759,9 @@ static char *skip_patterns[] = { | @@ -668,7 +766,9 @@ static char *skip_patterns[] = { | ||||
"Kernel does not support page offline interface", | "Kernel does not support page offline interface", | ||||
NULL | NULL | ||||
}; | }; | ||||
+#endif | +#endif | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
static int match_patterns(char *s, char **pat) | static int match_patterns(char *s, char **pat) | ||||
{ | { | ||||
for (; *pat; pat++) | for (; *pat; pat++) | ||||
@@ -670,12 +769,14 @@ static int match_patterns(char *s, char **pat) | @@ -676,12 +776,14 @@ static int match_patterns(char *s, char | ||||
return 0; | return 0; | ||||
return 1; | return 1; | ||||
} | } | ||||
+#endif | +#endif | ||||
#define FIELD(f) \ | #define FIELD(f) \ | ||||
if (recordlen < endof_field(struct mce, f)) \ | if (recordlen < endof_field(struct mce, f)) \ | ||||
recordlen = endof_field(struct mce, f) | recordlen = endof_field(struct mce, f) | ||||
/* Decode ASCII input for fatal messages */ | /* Decode ASCII input for fatal messages */ | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
static void decodefatal(FILE *inf) | static void decodefatal(FILE *inf) | ||||
{ | { | ||||
struct mce m; | struct mce m; | ||||
@@ -886,7 +987,228 @@ restart: | @@ -892,6 +994,227 @@ restart: | ||||
if (data) | if (data) | ||||
dump_mce_final(&m, symbol, missing, recordlen, disclaimer_seen); | dump_mce_final(&m, symbol, missing, recordlen, disclaimer_seen); | ||||
} | } | ||||
+#endif | +#endif | ||||
+ | |||||
+#ifdef __FreeBSD__ | +#ifdef __FreeBSD__ | ||||
+/* | +/* | ||||
+ * Table used to map cpuid vendor strings and FreeBSD CPU vendor IDs | + * Table used to map cpuid vendor strings and FreeBSD CPU vendor IDs | ||||
+ * to Linux cpuvendor values. | + * to Linux cpuvendor values. | ||||
+ */ | + */ | ||||
+static struct { | +static struct { | ||||
+ char *name; | + char *name; | ||||
+ int vendor_id; | + int vendor_id; | ||||
▲ Show 20 Lines • Show All 203 Lines • ▼ Show 20 Lines | |||||
+ if (mr.mr_status & MC_STATUS_MISCV && !(data & MISC)) | + if (mr.mr_status & MC_STATUS_MISCV && !(data & MISC)) | ||||
+ missing = 1; | + missing = 1; | ||||
+ convert_mca(&mr, &m, 0, sizeof(mr)); | + convert_mca(&mr, &m, 0, sizeof(mr)); | ||||
+ mce_cpuid(&m); | + mce_cpuid(&m); | ||||
+ dump_mce_final(&m, symbol, missing, sizeof(struct mce), 0); | + dump_mce_final(&m, symbol, missing, sizeof(struct mce), 0); | ||||
+ } | + } | ||||
+} | +} | ||||
+#endif | +#endif | ||||
+ | |||||
static void remove_pidfile(void) | static void remove_pidfile(void) | ||||
{ | { | ||||
unlink(pidfile); | @@ -957,6 +1280,10 @@ void usage(void) | ||||
@@ -951,6 +1273,10 @@ void usage(void) | |||||
" mcelog [options] --ascii < log\n" | " mcelog [options] --ascii < log\n" | ||||
" mcelog [options] --ascii --file log\n" | " mcelog [options] --ascii --file log\n" | ||||
"Decode machine check ASCII output from kernel logs\n" | "Decode machine check ASCII output from kernel logs\n" | ||||
+#ifdef __FreeBSD_ | +#ifdef __FreeBSD_ | ||||
+" mcelog [options] -M vmcore -N kernel\n" | +" mcelog [options] -M vmcore -N kernel\n" | ||||
+"Decode machine check error records from kernel crashdump.\n" | +"Decode machine check error records from kernel crashdump.\n" | ||||
+#endif | +#endif | ||||
"\n" | "\n" | ||||
"Options:\n" | "Options:\n" | ||||
"--version Show the version of mcelog and exit\n" | "--version Show the version of mcelog and exit\n" | ||||
@@ -1168,6 +1494,14 @@ static int modifier(int opt) | @@ -1174,6 +1501,14 @@ static int modifier(int opt) | ||||
usage(); | usage(); | ||||
exit(0); | exit(0); | ||||
break; | break; | ||||
+#ifdef __FreeBSD__ | +#ifdef __FreeBSD__ | ||||
+ case 'M': | + case 'M': | ||||
+ corefile = strdup(optarg); | + corefile = strdup(optarg); | ||||
+ break; | + break; | ||||
+ case 'N': | + case 'N': | ||||
+ execfile = strdup(optarg); | + execfile = strdup(optarg); | ||||
+ break; | + break; | ||||
+#endif | +#endif | ||||
case 0: | case 0: | ||||
break; | break; | ||||
default: | default: | ||||
@@ -1218,10 +1552,12 @@ static int combined_modifier(int opt) | @@ -1224,10 +1559,12 @@ static int combined_modifier(int opt) | ||||
static void general_setup(void) | static void general_setup(void) | ||||
{ | { | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
trigger_setup(); | trigger_setup(); | ||||
yellow_setup(); | yellow_setup(); | ||||
bus_setup(); | bus_setup(); | ||||
unknown_setup(); | unknown_setup(); | ||||
+#endif | +#endif | ||||
config_cred("global", "run-credentials", &runcred); | config_cred("global", "run-credentials", &runcred); | ||||
if (config_bool("global", "filter-memory-errors") == 1) | if (config_bool("global", "filter-memory-errors") == 1) | ||||
filter_memory_errors = 1; | filter_memory_errors = 1; | ||||
@@ -1244,6 +1580,7 @@ static void drop_cred(void) | @@ -1250,6 +1587,7 @@ static void drop_cred(void) | ||||
} | } | ||||
} | } | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
static void process(int fd, unsigned recordlen, unsigned loglen, char *buf) | static void process(int fd, unsigned recordlen, unsigned loglen, char *buf) | ||||
{ | { | ||||
int i; | int i; | ||||
@@ -1296,7 +1633,174 @@ static void process(int fd, unsigned recordlen, unsign | @@ -1302,6 +1640,173 @@ static void process(int fd, unsigned rec | ||||
if (finish) | if (finish) | ||||
exit(0); | exit(0); | ||||
} | } | ||||
+#endif | +#endif | ||||
+ | |||||
+#ifdef __FreeBSD__ | +#ifdef __FreeBSD__ | ||||
+#ifdef LOCAL_HACK | +#ifdef LOCAL_HACK | ||||
+struct mca_record_old { | +struct mca_record_old { | ||||
+ uint64_t mr_status; | + uint64_t mr_status; | ||||
+ uint64_t mr_addr; | + uint64_t mr_addr; | ||||
+ uint64_t mr_misc; | + uint64_t mr_misc; | ||||
+ uint64_t mr_tsc; | + uint64_t mr_tsc; | ||||
+ int mr_apic_id; | + int mr_apic_id; | ||||
▲ Show 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | |||||
+ dump_mce_raw_ascii(&mce, sizeof(struct mce)); | + dump_mce_raw_ascii(&mce, sizeof(struct mce)); | ||||
+ flushlog(); | + flushlog(); | ||||
+ } | + } | ||||
+ | + | ||||
+ if (finish) | + if (finish) | ||||
+ exit(0); | + exit(0); | ||||
+} | +} | ||||
+#endif | +#endif | ||||
+ | |||||
static void noargs(int ac, char **av) | static void noargs(int ac, char **av) | ||||
{ | { | ||||
if (getopt_long(ac, av, "", options, NULL) != -1) { | @@ -1364,12 +1869,14 @@ struct mcefd_data { | ||||
@@ -1358,12 +1862,14 @@ struct mcefd_data { | |||||
char *buf; | char *buf; | ||||
}; | }; | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
static void process_mcefd(struct pollfd *pfd, void *data) | static void process_mcefd(struct pollfd *pfd, void *data) | ||||
{ | { | ||||
struct mcefd_data *d = (struct mcefd_data *)data; | struct mcefd_data *d = (struct mcefd_data *)data; | ||||
assert((pfd->revents & POLLIN) != 0); | assert((pfd->revents & POLLIN) != 0); | ||||
process(pfd->fd, d->recordlen, d->loglen, d->buf); | process(pfd->fd, d->recordlen, d->loglen, d->buf); | ||||
} | } | ||||
+#endif | +#endif | ||||
static void handle_sigusr1(int sig) | static void handle_sigusr1(int sig) | ||||
{ | { | ||||
@@ -1372,13 +1878,18 @@ static void handle_sigusr1(int sig) | @@ -1378,13 +1885,18 @@ static void handle_sigusr1(int sig) | ||||
int main(int ac, char **av) | int main(int ac, char **av) | ||||
{ | { | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
struct mcefd_data d = {}; | struct mcefd_data d = {}; | ||||
- int opt; | - int opt; | ||||
int fd; | int fd; | ||||
- | - | ||||
+#endif | +#endif | ||||
+ int opt; | + int opt; | ||||
parse_config(av); | parse_config(av); | ||||
+#ifdef __FreeBSD | +#ifdef __FreeBSD | ||||
+ while ((opt = getopt_long(ac, av, "M:N:", options, NULL)) != -1) { | + while ((opt = getopt_long(ac, av, "M:N:", options, NULL)) != -1) { | ||||
+#else | +#else | ||||
while ((opt = getopt_long(ac, av, "", options, NULL)) != -1) { | while ((opt = getopt_long(ac, av, "", options, NULL)) != -1) { | ||||
+#endif | +#endif | ||||
if (opt == '?') { | if (opt == '?') { | ||||
usage(); | usage(); | ||||
exit(1); | exit(1); | ||||
@@ -1399,11 +1910,13 @@ int main(int ac, char **av) | @@ -1405,11 +1917,13 @@ int main(int ac, char **av) | ||||
} | } | ||||
/* before doing anything else let's see if the CPUs are supported */ | /* before doing anything else let's see if the CPUs are supported */ | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
if (!cpu_forced && !is_cpu_supported()) { | if (!cpu_forced && !is_cpu_supported()) { | ||||
if (!check_only) | if (!check_only) | ||||
fprintf(stderr, "CPU is unsupported\n"); | fprintf(stderr, "CPU is unsupported\n"); | ||||
exit(1); | exit(1); | ||||
} | } | ||||
+#endif | +#endif | ||||
if (check_only) | if (check_only) | ||||
exit(0); | exit(0); | ||||
@@ -1422,15 +1935,23 @@ int main(int ac, char **av) | @@ -1428,15 +1942,23 @@ int main(int ac, char **av) | ||||
} | } | ||||
modifier_finish(); | modifier_finish(); | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
if (av[optind]) | if (av[optind]) | ||||
logfn = av[optind++]; | logfn = av[optind++]; | ||||
+#endif | +#endif | ||||
if (av[optind]) { | if (av[optind]) { | ||||
usage(); | usage(); | ||||
+#ifdef __FreeBSD__ | +#ifdef __FreeBSD__ | ||||
+ if ((corefile != NULL) ^ (execfile != NULL) || | + if ((corefile != NULL) ^ (execfile != NULL) || | ||||
+ (corefile != NULL && daemon_mode)) | + (corefile != NULL && daemon_mode)) | ||||
+ usage(); | + usage(); | ||||
+#endif | +#endif | ||||
exit(1); | exit(1); | ||||
} | } | ||||
checkdmi(); | checkdmi(); | ||||
general_setup(); | general_setup(); | ||||
+#ifdef __Linux__ | +#ifdef __Linux__ | ||||
fd = open(logfn, O_RDONLY); | fd = open(logfn, O_RDONLY); | ||||
if (fd < 0) { | if (fd < 0) { | ||||
if (ignore_nodev) | if (ignore_nodev) | ||||
@@ -1445,27 +1966,44 @@ int main(int ac, char **av) | @@ -1451,27 +1973,44 @@ int main(int ac, char **av) | ||||
err("MCE_GET_LOG_LEN"); | err("MCE_GET_LOG_LEN"); | ||||
d.buf = xalloc(d.recordlen * d.loglen); | d.buf = xalloc(d.recordlen * d.loglen); | ||||
+#endif | +#endif | ||||
if (daemon_mode) { | if (daemon_mode) { | ||||
prefill_memdb(do_dmi); | prefill_memdb(do_dmi); | ||||
if (!do_dmi) | if (!do_dmi) | ||||
closedmi(); | closedmi(); | ||||
Show All 36 Lines |