[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-rdma
Subject:    [PATCH] opensm/osm_subnet.c: Fixed ftree/updn configuration failure when root_guid_file points to no
From:       Hal Rosenstock <hal () dev ! mellanox ! co ! il>
Date:       2012-05-30 23:28:53
Message-ID: 4FC6AD35.9080505 () dev ! mellanox ! co ! il
[Download RAW message or body]


Signed-off-by: Ilya Nelkenbaum <ilyan@mellanox.com>
Reviewed-by: Hal Rosenstock <hal@mellanox.com>
---
diff --git a/opensm/osm_subnet.c b/opensm/osm_subnet.c
index 7dcde87..04c7b18 100644
--- a/opensm/osm_subnet.c
+++ b/opensm/osm_subnet.c
@@ -1315,6 +1315,17 @@ int osm_subn_verify_config(IN osm_subn_opt_t * p_opts)
 	}
 #endif
 
+	if (p_opts->root_guid_file != NULL) {
+		FILE *root_file = fopen(p_opts->root_guid_file, "r");
+		if (!root_file) {
+			log_report("Root guid file provided: %s doesn't exist.\n"
+				    "Using default roots discovery algorithm\n",
+				    p_opts->root_guid_file);
+			p_opts->root_guid_file = NULL;
+		} else
+			fclose(root_file);
+	}
+
 	return 0;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic