Skip to contentSkip to conversation

opensm/osm_subnet.c: Fixed ftree/updn configuration failure when root_guid_file points to non-existing file

PATCH In review Hal Rosenstock 2 participants 2 messages May 30, 2012 – Jun 3, 2012 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 opensm/osm_subnet.c: Fixed ftree/updn configuration failure when root_guid_file points to non-existing file

---

opensm/osm_subnet.c +11 -0
index 7dcde87..04c7b18 100644
@@ -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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html