Hi Hal,
[V2 of the patch]
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 <[EMAIL PROTECTED]>
---
opensm/opensm/osm_subnet.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/opensm/opensm/osm_subnet.c b/opensm/opensm/osm_subnet.c
index 855d1ab..c785923 100644
--- a/opensm/opensm/osm_subnet.c
+++ b/opensm/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>
@@ -758,7 +759,7 @@ osm_subn_rescan_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)
{
@@ -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.5.1.4
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general