Skip to contentSkip to conversation

opensm/main.c: Handle daemon mode with guid specified as 0 more gracefully

PATCH In review Hal Rosenstock 2 participants 2 messages Jul 9, 2012 – Jul 25, 2012 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 opensm/main.c: Handle daemon mode with guid specified as 0 more gracefully

As pointed out by Philipp Thomas <[email protected]>:

Currently opensm will silently fail if you pass '-g 0 -B'. As you can't ask for a port, exit with failure so admin can see the reason for opensm's failure.

---

opensm/main.c +7 -1
index 4218cc6..fca209a 100644
@@ -1120,8 +1120,14 @@ int main(int argc, char *argv[])
 
 	block_signals();
 
-	if (opt.daemon)
+	if (opt.daemon) {
+		if (INVALID_GUID == opt.guid) {
+			fprintf(stderr,
+				"ERROR: Invalid GUID specified; exiting because of daemon mode\n");
+			return -1;
+		}
 		daemonize(&osm);
+	}
 
 	complib_init();
 

--
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

#2 lore raw
In reply to a message not in the archive

Hi Hal,

Quoted 9 lines · Hal Rosenstock

As pointed out by Philipp Thomas <[email protected]>:

Currently opensm will silently fail if you pass '-g 0 -B'. As you can't ask for a port, exit with failure so admin can see the reason for opensm's failure.

---

Applied, thanks.
--
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