Currently, volscan ignores the -delim command-line option,
using the hardcoded default. This patch adds processing
for this option, allowing alternative characters.
Corrects an error in
a08c3207255756c825ab69a19e04f79dd879c646
Change-Id: I750f2d998cff029fc02556ed0baaaa0ca1c95e08
Reviewed-on: http://gerrit.openafs.org/6894
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
static int FixHeader = 0; /**< Repair header files magic and version fields. */
static char Hostname[64] = ""; /**< This hostname, for volscan output. */
static int NeedDirIndex = 0; /**< Large vnode index handle is needed for path lookups. */
-static char *ColumnDelim = " "; /**< Column delimiter char(s) */
+static char ColumnDelim[16] = " "; /**< Column delimiter char(s) */
static char PrintHeading = 0; /**< Print column heading */
static unsigned int ModeMask[64];
} else {
PrintHeading = 1;
}
+ if ((ti = as->parms[P_DELIM].items)) {
+ strncpy(ColumnDelim, ti->data, 15);
+ ColumnDelim[15] = '\0';
+ }
/* Limit types of volumes to scan. */
if (!as->parms[P_TYPE].items) {