Hi,

I don't like typing all uppercase, so here's a trivial patch
to make showgrid's args case-insensitive. This is against
the 3.3 from svn. I think I did this a few years ago, too, and
sent it to the list but nothing came of it. The modifications
are to src/server/OUserI.c

Also, src/server/OServer.c

    if (!strcmp(ptr,"TRAP") || !strcmp(ptr,"trap"))

which can just be replaced with

    if (!strcasecmp(ptr, "trap"))

So, I just did that, too.

It works for me: YMMV.

Cheers,
    Dave

-- 
David Chin, Ph.D.
[email protected]                  High Performance Computing Systems Analyst
Office: 336-758-2964            Wake Forest University
Mobile: 336-608-0793            Winston-Salem, NC
Email-to-txt: [email protected]
Google Talk: [email protected]
Web: http://www.wfu.edu/~chindw/
http://www.google.com/profiles/chindw.wfu
diff -Naur maui-3.3/src/server/OServer.c maui-3.3-deac/src/server/OServer.c
--- maui-3.3/src/server/OServer.c	2010-05-26 10:31:15.000000000 -0400
+++ maui-3.3-deac/src/server/OServer.c	2010-05-28 12:05:21.000000000 -0400
@@ -57,15 +57,15 @@
     {
     act.sa_handler = (void(*)(int))SIG_DFL;
     }
-  else if (!strcmp(ptr,"TRAP") || !strcmp(ptr,"trap"))
+  else if (!strcasecmp(ptr,"trap"))
     {
     act.sa_handler = (void(*)(int))CrashMode;
     }
-  else if (!strcmp(ptr,"IGNORE") || !strcmp(ptr,"ignore"))
+  else if (!strcasecmp(ptr,"ignore"))
     {
     act.sa_handler = (void(*)(int))SIG_IGN;
     }
-  else if (!strcmp(ptr,"DIE") || !strcmp(ptr,"die"))
+  else if (!strcasecmp(ptr,"die"))
     {
     act.sa_handler = (void(*)(int))SIG_DFL;
     }
@@ -93,15 +93,15 @@
     {
     act.sa_handler = (void(*)(int))SIG_DFL;
     }
-  else if (!strcmp(ptr,"TRAP") || !strcmp(ptr,"trap"))
+  else if (!strcasecmp(ptr,"trap"))
     {
     act.sa_handler = (void(*)(int))CrashMode;
     }
-  else if (!strcmp(ptr,"IGNORE") || !strcmp(ptr,"ignore"))
+  else if (!strcasecmp(ptr,"ignore"))
     {
     act.sa_handler = (void(*)(int))SIG_IGN;
     }
-  else if (!strcmp(ptr,"DIE") || !strcmp(ptr,"die"))
+  else if (!strcasecmp(ptr,"die"))
     {
     act.sa_handler = (void(*)(int))SIG_DFL;
     }
diff -Naur maui-3.3/src/server/OUserI.c maui-3.3-deac/src/server/OUserI.c
--- maui-3.3/src/server/OUserI.c	2010-05-26 10:31:15.000000000 -0400
+++ maui-3.3-deac/src/server/OUserI.c	2010-05-28 11:05:06.000000000 -0400
@@ -291,14 +291,14 @@
         if (MSched.AdminHost[index][0] == '\0')
           break;
 
-        if (!strcmp(MSched.AdminHost[index],S->Host))
+        if (!strcasecmp(MSched.AdminHost[index],S->Host))
           {
           hostcheck = TRUE;
 
           break;
           }
 
-        if (!strcmp(MSched.AdminHost[index],"ALL"))
+        if (!strcasecmp(MSched.AdminHost[index],"ALL"))
           {
           hostcheck = TRUE;
 
@@ -565,7 +565,7 @@
 
   if (!(FLAGS & ((1 << fAdmin1) | (1 << fAdmin2))))
     {
-    if (strcmp(J->Cred.U->Name,Auth) != 0)
+    if (strcasecmp(J->Cred.U->Name,Auth) != 0)
       {
       DBG(2,fUI) DPrint("INFO:     user %s is not authorized to set user priority on job %s\n",
         Auth,
@@ -618,7 +618,7 @@
 
   for (sindex = 0;MStatType[sindex] != 0;sindex++)
     {
-    if (!strcmp(MStatType[sindex],GStat))
+    if (!strcasecmp(MStatType[sindex],GStat))
       break;
     }  /* END for (sindex) */
 
@@ -777,7 +777,7 @@
       {
       for (mindex = 0;MComp[mindex] != NULL;mindex++)
         {
-        if (!strcmp(MComp[mindex],MemCmp))
+        if (!strcasecmp(MComp[mindex],MemCmp))
           break;
         }
 
@@ -858,9 +858,9 @@
             (BFNodeCount >= RequiredNodes) && 
             (BFProcCount >= RequiredProcs))
           {
-          if (strcmp(P->Name,CurrentPName) != 0)
+          if (strcasecmp(P->Name,CurrentPName) != 0)
             {
-            if ((strcmp(CurrentPName,GLOBAL_MPARNAME)) && (index == 0))
+            if ((strcasecmp(CurrentPName,GLOBAL_MPARNAME)) && (index == 0))
               {
               sprintf(Buffer,"%sno %s available\n",
                 Buffer,
_______________________________________________
mauiusers mailing list
[email protected]
http://www.supercluster.org/mailman/listinfo/mauiusers

Reply via email to