linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] opensm/main.c: Handle daemon mode with guid specified as 0 more gracefully
@ 2012-07-09 17:15 Hal Rosenstock
       [not found] ` <4FFB119E.2090805-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Hal Rosenstock @ 2012-07-09 17:15 UTC (permalink / raw)
  To: Alex Netes
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	Philipp Thomas


As pointed out by Philipp Thomas <pth-l3A5Bk7waGM@public.gmane.org>:

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.

Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
---
diff --git a/opensm/main.c b/opensm/main.c
index 4218cc6..fca209a 100644
--- a/opensm/main.c
+++ b/opensm/main.c
@@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] opensm/main.c: Handle daemon mode with guid specified as 0 more gracefully
       [not found] ` <4FFB119E.2090805-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
@ 2012-07-25  7:52   ` Alex Netes
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Netes @ 2012-07-25  7:52 UTC (permalink / raw)
  To: Hal Rosenstock
  Cc: linux-rdma (linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	Philipp Thomas

Hi Hal,

On 13:15 Mon 09 Jul     , Hal Rosenstock wrote:
> 
> As pointed out by Philipp Thomas <pth-l3A5Bk7waGM@public.gmane.org>:
> 
> 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.
> 
> Signed-off-by: Hal Rosenstock <hal-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
> ---

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-25  7:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-09 17:15 [PATCH] opensm/main.c: Handle daemon mode with guid specified as 0 more gracefully Hal Rosenstock
     [not found] ` <4FFB119E.2090805-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
2012-07-25  7:52   ` Alex Netes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).