[openib-general] [PATCH] OpenSM: Don't exit when log fills disk

Hal Rosenstock halr at voltaire.com
Mon Jun 5 08:05:34 PDT 2006


OpenSM: Don't exit when log fills disk

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

Index: opensm/osm_log.c
===================================================================
--- opensm/osm_log.c	(revision 7645)
+++ opensm/osm_log.c	(working copy)
@@ -80,6 +80,9 @@ static char *month_str[] = {
 };
 #endif /* ndef WIN32 */
 
+static int log_exit_count = 0;
+
+
 void
 osm_log(
   IN osm_log_t* const p_log,
@@ -175,8 +178,10 @@ osm_log(
     
     if (ret < 0)
     {
-      fprintf(stderr, "OSM LOG FAILURE! Probably quota exceeded\n");
-      exit(1);
+      if (log_exit_count++ < 10)
+      {
+        fprintf(stderr, "OSM LOG FAILURE! Quota probably exceeded\n");
+      }
     }
   }
 }






More information about the general mailing list