[ofa-general] [PATCH] osm: error message when failed opening cached options file
Yevgeny Kliteynik
kliteyn at dev.mellanox.co.il
Tue May 15 04:35:43 PDT 2007
Hi Hal,
As suggested by Sasha, printing error message when failed
opening cached options file only when the file was found, but
osm failed opening it.
Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
osm/opensm/osm_subnet.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/osm/opensm/osm_subnet.c b/osm/opensm/osm_subnet.c
index 855d1ab..9bba1b4 100644
--- a/osm/opensm/osm_subnet.c
+++ b/osm/opensm/osm_subnet.c
@@ -52,6 +52,7 @@
#include <string.h>
#include <stdio.h>
#include <limits.h>
+#include <errno.h>
#include <complib/cl_debug.h>
#include <complib/cl_log.h>
#include <opensm/osm_subnet.h>
@@ -856,7 +857,7 @@ osm_subn_parse_conf_file(
opts_file = fopen(file_name, "r");
if (!opts_file)
- return IB_ERROR;
+ return (errno == ENOENT) ? IB_SUCCESS : IB_ERROR;
while (fgets(line, 1023, opts_file) != NULL)
{
--
1.4.4.1.GIT
More information about the general
mailing list