Remove --disable-full-vos-listvol-switch option
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Thu, 24 Dec 2009 15:35:47 +0000 (15:35 +0000)
committerDerrick Brashear <shadow|account-1000005@unknown>
Thu, 31 Dec 2009 13:01:08 +0000 (05:01 -0800)
Remove the --disable-full-vos-listvol-switch configuration option,
and the corresponding #ifdefs. Full output from vos listvol is now
always enabled.

Change-Id: Ib4900cc0a8532b3db31d13d34fe59946b34e86ed
Reviewed-on: http://gerrit.openafs.org/1031
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

acinclude.m4
src/config/afsconfig-windows.h
src/volser/vos.c

index b2ba461..54019b1 100644 (file)
@@ -50,7 +50,6 @@ AH_VERBATIM([OPENAFS_HEADER],
 #undef AFS_NAMEI_ENV
 #undef BITMAP_LATER
 #undef FAST_RESTART
-#undef FULL_LISTVOL_SWITCH
 #undef COMPLETION_H_EXISTS
 #undef DEFINED_FOR_EACH_PROCESS
 #undef DEFINED_PREV_TASK
@@ -139,11 +138,6 @@ AC_ARG_ENABLE([unix-sockets],
         [enable use of unix domain sockets for fssync])],
     ,
     [enable_unix_sockets="yes"])
-AC_ARG_ENABLE([full-vos-listvol-switch],
-    [AS_HELP_STRING([--disable-full-vos-listvol-switch],
-        [disable vos full listvol switch for formatted output])],
-    , 
-    [enable_full_vos_listvol_switch="yes"])
 AC_ARG_ENABLE([icmp-pmtu-discovery],
     [AS_HELP_STRING([--enable-icmp-pmtu-discovery],
         [enable path MTU discovery by decoding ICMP unreachable replies])],
@@ -1450,10 +1444,6 @@ if test "$enable_fast_restart" = "yes" &&
        exit 1
 fi
 
-if test "$enable_full_vos_listvol_switch" = "yes"; then
-       AC_DEFINE(FULL_LISTVOL_SWITCH, 1, [define if you want to want listvol switch])
-fi
-
 if test "$enable_icmp_pmtu_discovery" = "yes"; then
    if test "$ac_cv_setsockopt_iprecverr" = "yes"; then
        AC_DEFINE(ADAPT_PMTU, 1, [define if you want to decode icmp unreachable packets to discover path mtu])
index eb9ad46..0331a8a 100644 (file)
 #include "redhat-fix.h"
 #endif
 
-/* include all of the vos listvol options */
-#define FULL_LISTVOL_SWITCH 1
-
 /* Windows does not provide socklen_t */
 typedef unsigned int socklen_t;
index 2df18df..7e45ec8 100644 (file)
@@ -522,7 +522,6 @@ DisplayFormat(volintInfo *pntr, afs_int32 server, afs_int32 part,
            t = pntr->creationDate;
            fprintf(STDOUT, "    Creation    %s",
                    ctime(&t));
-#ifdef FULL_LISTVOL_SWITCH
            t = pntr->copyDate;
            fprintf(STDOUT, "    Copy        %s",
                    ctime(&t));
@@ -538,7 +537,7 @@ DisplayFormat(volintInfo *pntr, afs_int32 server, afs_int32 part,
            if (t)
                fprintf(STDOUT, "    Last Access %s",
                        ctime(&t));
-#endif
+
            t = pntr->updateDate;
            if (!t)
                fprintf(STDOUT, "    Last Update Never\n");
@@ -677,7 +676,7 @@ XDisplayFormat(volintXInfo *a_xInfoP, afs_int32 a_servID, afs_int32 a_partID,
            t = a_xInfoP->creationDate;
            fprintf(STDOUT, "    Creation    %s",
                    ctime(&t));
-#ifdef FULL_LISTVOL_SWITCH
+
            t = a_xInfoP->copyDate;
            fprintf(STDOUT, "    Copy        %s",
                    ctime(&t));
@@ -693,7 +692,7 @@ XDisplayFormat(volintXInfo *a_xInfoP, afs_int32 a_servID, afs_int32 a_partID,
            if (t)
                fprintf(STDOUT, "    Last Access %s",
                        ctime(&t));
-#endif
+
            t = a_xInfoP->updateDate;
            if (!t)
                fprintf(STDOUT, "    Last Update Never\n");
@@ -832,7 +831,6 @@ XDisplayFormat(volintXInfo *a_xInfoP, afs_int32 a_servID, afs_int32 a_partID,
     }                          /*Default listing */
 }                              /*XDisplayFormat */
 
-#ifdef FULL_LISTVOL_SWITCH
 /*------------------------------------------------------------------------
  * PRIVATE XDisplayFormat2
  *
@@ -1029,9 +1027,7 @@ XDisplayFormat2(volintXInfo *a_xInfoP, afs_int32 a_servID, afs_int32 a_partID,
        }                       /*Screwed volume */
     }                          /*Default listing */
 }                              /*XDisplayFormat */
-#endif /*FULL_LISTVOL_SWITCH*/
 
-#ifdef FULL_LISTVOL_SWITCH
 static void
 DisplayFormat2(long server, long partition, volintInfo *pntr)
 {
@@ -1149,7 +1145,6 @@ DisplayVolumes2(long server, long partition, volintInfo *pntr, long count)
     }
     return;
 }
-#endif /* FULL_LISTVOL_SWITCH */
 
 static void
 DisplayVolumes(afs_int32 server, afs_int32 part, volintInfo *pntr,
@@ -1275,7 +1270,7 @@ XDisplayVolumes(afs_int32 a_servID, afs_int32 a_partID, volintXInfo *a_xInfoP,
     }
 
 }                              /*XDisplayVolumes */
-#ifdef FULL_LISTVOL_SWITCH
+
 /*------------------------------------------------------------------------
  * PRIVATE XDisplayVolumes2
  *
@@ -1361,7 +1356,6 @@ XDisplayVolumes2(afs_int32 a_servID, afs_int32 a_partID, volintXInfo *a_xInfoP,
     }
 
 }                              /*XDisplayVolumes2 */
-#endif /* FULL_LISTVOL_SWITCH */
 
 
 /* set <server> and <part> to the correct values depending on 
@@ -1630,13 +1624,10 @@ ExamineVolume(register struct cmd_syndesc *as, void *arock)
            foundserv = 1;
            if (wantExtendedInfo)
                XVolumeStats(xInfoP, &entry, aserver, apart, voltype);
-           else
-#ifdef FULL_LISTVOL_SWITCH
-           if (as->parms[2].items) {
+           else if (as->parms[2].items) {
                DisplayFormat2(aserver, apart, pntr);
                EnumerateEntry(&entry);
            } else
-#endif /* FULL_LISTVOL_SWITCH */
                VolumeStats_int(pntr, &entry, aserver, apart, voltype);
 
            if ((voltype == BACKVOL) && !(entry.flags & BACK_EXISTS)) {
@@ -3711,24 +3702,20 @@ ListVolumes(register struct cmd_syndesc *as, void *arock)
                        as->parms[0].items->data, pname,
                        (unsigned long)count);
            if (wantExtendedInfo) {
-#ifdef FULL_LISTVOL_SWITCH
                if (as->parms[6].items)
                    XDisplayVolumes2(aserver, dummyPartList.partId[i], origxInfoP,
                                count, int32list, fast, quiet);
                else
-#endif /* FULL_LISTVOL_SWITCH */
-               XDisplayVolumes(aserver, dummyPartList.partId[i], origxInfoP,
+                   XDisplayVolumes(aserver, dummyPartList.partId[i], origxInfoP,
                                count, int32list, fast, quiet);
                if (xInfoP)
                    free(xInfoP);
                xInfoP = (volintXInfo *) 0;
            } else {
-#ifdef FULL_LISTVOL_SWITCH
                if (as->parms[6].items)
                    DisplayVolumes2(aserver, dummyPartList.partId[i], oldpntr,
                                    count);
                else
-#endif /* FULL_LISTVOL_SWITCH */
                    DisplayVolumes(aserver, dummyPartList.partId[i], oldpntr,
                                   count, int32list, fast, quiet);
                if (pntr)
@@ -5997,10 +5984,8 @@ main(int argc, char **argv)
                "generate minimal information");
     cmd_AddParm(ts, "-extended", CMD_FLAG, CMD_OPTIONAL,
                "list extended volume fields");
-#ifdef FULL_LISTVOL_SWITCH
     cmd_AddParm(ts, "-format", CMD_FLAG, CMD_OPTIONAL,
                "machine readable format");
-#endif /* FULL_LISTVOL_SWITCH */
     COMMONPARMS;
 
     ts = cmd_CreateSyntax("syncvldb", SyncVldb, NULL,
@@ -6023,10 +6008,8 @@ main(int argc, char **argv)
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
     cmd_AddParm(ts, "-extended", CMD_FLAG, CMD_OPTIONAL,
                "list extended volume fields");
-#ifdef FULL_LISTVOL_SWITCH
     cmd_AddParm(ts, "-format", CMD_FLAG, CMD_OPTIONAL,
                "machine readable format");
-#endif /* FULL_LISTVOL_SWITCH */
     COMMONPARMS;
     cmd_CreateAlias(ts, "volinfo");