dafs: remove the salvageserver -showlog option

Remove the salvagerserver option to print log messages to stdout.  This
was a carry over from the stand-alone salvager and is not appropriate for
a daemon.

Change-Id: I55b99112278cdabb3e9911948dbda6a628030951
Reviewed-on: http://gerrit.openafs.org/11815
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Michael Meffie 2015-03-30 13:20:42 -04:00 committed by Benjamin Kaduk
parent b800f7d9bd
commit dc134f3eff
2 changed files with 0 additions and 17 deletions

View File

@ -13,7 +13,6 @@ B<salvageserver> [I<initcmd>] S<<< [B<-partition> <I<name of partition to salvag
[B<-salvagedirs>] [B<-blockreads>]
S<<< [B<-parallel> <I<# of max parallel partition salvaging>>] >>>
S<<< [B<-tmpdir> <I<name of dir to place tmp files>>] >>>
[B<-showlog>]
S<<< [B<-orphans> (ignore | remove | attach)] >>>
[B<-syslog>]
S<<< [B<-syslogfacility> <I<Syslog facility number to use>>] >>>
@ -227,11 +226,6 @@ the partition being salvaged (the default). If the Salvageserver cannot write
to the specified directory, it attempts to write to the partition being
salvaged.
=item B<-showlog>
Displays on the standard output stream all log data that is being written
to the F</usr/afs/logs/SalsrvLog> file.
=item B<-orphans> (ignore | remove | attach)
Controls how the Salvageserver handles orphaned files and directories. Choose

View File

@ -179,7 +179,6 @@ enum optionsList {
OPT_blockreads,
OPT_parallel,
OPT_tmpdir,
OPT_showlog,
OPT_orphans,
OPT_syslog,
OPT_syslogfacility,
@ -242,7 +241,6 @@ handleit(struct cmd_syndesc *opts, void *arock)
free(optstring);
optstring = NULL;
}
cmd_OptionAsFlag(opts, OPT_showlog, &ShowLog);
if (cmd_OptionAsString(opts, OPT_orphans, &optstring) == 0) {
if (Testing)
orphans = ORPH_IGNORE;
@ -258,7 +256,6 @@ handleit(struct cmd_syndesc *opts, void *arock)
#ifndef AFS_NT40_ENV /* ignore options on NT */
if (cmd_OptionPresent(opts, OPT_syslog)) {
useSyslog = 1;
ShowLog = 0;
}
cmd_OptionAsInt(opts, OPT_syslogfacility, &useSyslogFacility);
#endif
@ -282,11 +279,6 @@ handleit(struct cmd_syndesc *opts, void *arock)
vid = (VolumeId)vid_l;
}
if (ShowLog) {
printf("-showlog does not work with -client\n");
exit(-1);
}
if (!seenpart || !seenvol) {
printf("You must specify '-partition' and '-volumeid' with the '-client' option\n");
exit(-1);
@ -399,8 +391,6 @@ main(int argc, char **argv)
"# of max parallel partition salvaging");
cmd_AddParmAtOffset(ts, OPT_tmpdir, "-tmpdir", CMD_SINGLE, CMD_OPTIONAL,
"Name of dir to place tmp files ");
cmd_AddParmAtOffset(ts, OPT_showlog, "-showlog", CMD_FLAG, CMD_OPTIONAL,
"Show log file upon completion");
cmd_AddParmAtOffset(ts, OPT_orphans, "-orphans", CMD_SINGLE, CMD_OPTIONAL,
"ignore | remove | attach");
@ -609,7 +599,6 @@ DoSalvageVolume(struct SalvageQueueNode * node, int slot)
if (asprintf(&childLog, "%s.%d",
AFSDIR_SERVER_SLVGLOG_FILEPATH, getpid()) < 0) {
logFile = stdout;
ShowLog = 0;
} else {
logFile = afs_fopen(childLog, "a");
if (!logFile) { /* still nothing, use stdout */