19 lines
566 B
Diff
19 lines
566 B
Diff
|
|
From d59e4d224b3271cf7a7fe53cd7c5d539b58eac32 Mon Sep 17 00:00:00 2001
|
||
|
|
From: lvying <lvying6@huawei.com>
|
||
|
|
Date: Sat, 26 Jan 2019 15:54:17 +0800
|
||
|
|
Subject: [PATCH] rasdaemon:fix fd check
|
||
|
|
|
||
|
|
reason:fix fd check
|
||
|
|
|
||
|
|
--- rasdaemon-0.4.1/ras-events.c 2018-04-12 04:05:05.000000000 -0400
|
||
|
|
+++ rasdaemon-0.4.1/ras-events.c 2018-04-12 04:11:44.000000000 -0400
|
||
|
|
@@ -544,7 +544,7 @@
|
||
|
|
|
||
|
|
/* Select uptime tracing */
|
||
|
|
fd = open_trace(ras, "trace_clock", O_WRONLY);
|
||
|
|
- if (!fd) {
|
||
|
|
+ if (fd < 0) {
|
||
|
|
log(TERM, LOG_ERR,
|
||
|
|
"Kernel didn't allow writing to trace_clock\n");
|
||
|
|
return 0;
|