diff mbox

opensm/osm_sa.{c,h}: osm_sa_db_file_dump() return values

Message ID 4B5878A5.1080800@dev.mellanox.co.il (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Yevgeny Kliteynik Jan. 21, 2010, 3:54 p.m. UTC
None
diff mbox

Patch

diff --git a/opensm/include/opensm/osm_sa.h b/opensm/include/opensm/osm_sa.h
index 9229d1a..d516310 100644
--- a/opensm/include/opensm/osm_sa.h
+++ b/opensm/include/opensm/osm_sa.h
@@ -436,7 +436,9 @@  int osm_sa_db_file_dump(struct osm_opensm *p_osm);
 *		[in] Pointer to an osm_opensm_t object.
 *
 * RETURN VALUES
-*	None
+*	 0 if the SA DB was actually dumped
+*	>0 if there was no need to dump the SA DB
+*	<0 if some error occurred.
 *
 *********/

diff --git a/opensm/opensm/osm_sa.c b/opensm/opensm/osm_sa.c
index 0d203ad..3473e4c 100644
--- a/opensm/opensm/osm_sa.c
+++ b/opensm/opensm/osm_sa.c
@@ -704,7 +704,7 @@  static void sa_dump_all_sa(osm_opensm_t * p_osm, FILE * file)

 int osm_sa_db_file_dump(osm_opensm_t * p_osm)
 {
-	int res = 0;
+	int res = 1;
 	if (p_osm->sa.dirty) {
 		res = opensm_dump_to_file(
 			p_osm, "opensm-sa.dump", sa_dump_all_sa);