aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReuben Thomas <rrt@sc3d.org>2004-10-04 16:04:26 +0000
committerReuben Thomas <rrt@sc3d.org>2004-10-04 16:04:26 +0000
commitb0e655d3de7b0f821b3b1eae473e347c794d377c (patch)
treeda0664442bebab02d73e722347eabc613e871742
parent3970487251c4a277f9f9e75061eb87f4776b5b6a (diff)
downloadplptools-b0e655d3de7b0f821b3b1eae473e347c794d377c.tar.gz
plptools-b0e655d3de7b0f821b3b1eae473e347c794d377c.tar.bz2
plptools-b0e655d3de7b0f821b3b1eae473e347c794d377c.zip
Remove stub code for formatting the Psion's drive (never implemented).
-rw-r--r--plpbackup/plpbackup.cc32
1 files changed, 5 insertions, 27 deletions
diff --git a/plpbackup/plpbackup.cc b/plpbackup/plpbackup.cc
index 7525845..96d8a21 100644
--- a/plpbackup/plpbackup.cc
+++ b/plpbackup/plpbackup.cc
@@ -63,7 +63,6 @@ bool full = false;
bool S5mx = false;
bool doRestore = false;
bool doBackup = false;
-bool doFormat = false;
bool skipError = false;
bool doAbort = false;
bool overWriteAll = false;
@@ -487,13 +486,9 @@ startMessage(const char *arch)
{
if (verbose >= 0) {
cout << _("Performing ");
- if (doFormat)
- cout << _("format");
- if (doRestore) {
- if (doFormat)
- cout << _(" and ");
+ if (doRestore)
cout << _("restore");
- } else
+ else
cout << (full ? _("full") : _("incremental")) << _(" backup");
cout << _(" of ");
if (driveList.empty())
@@ -532,12 +527,6 @@ tdiff(struct timeval *start, struct timeval *end)
}
static int
-runFormat()
-{
- return 0;
-}
-
-static int
editfile(char *name)
{
int shin, shout, sherr;
@@ -1422,7 +1411,6 @@ usage(ostream *hlp)
" -f, --full Do a full backup (incremental otherwise).\n"
" -b, --backup[=TGZ] Backup to specified archive TGZ.\n"
" -r, --restore=TGZ Restore from specified archive TGZ.\n"
- " -F, --format Format drive (can be combined with restore) [UNIMPLEMENTED].\n"
"\n"
" <drive> A drive character. If none given, scan all drives.\n"
"\n");
@@ -1441,7 +1429,6 @@ static struct option opts[] = {
{ "quiet", no_argument, 0, 'q' },
{ "backup", optional_argument, 0, 'b' },
{ "restore", required_argument, 0, 'r' },
- { "format", no_argument, 0, 'F' },
{ "version", no_argument, 0, 'V' },
{ 0, 0, 0, 0 },
};
@@ -1522,9 +1509,6 @@ main(int argc, char **argv)
doRestore = true;
archList.push_back(optarg);
break;
- case 'F':
- doFormat = true;
- break;
case 'p':
parse_destination(optarg, &host, &sockNum);
break;
@@ -1542,20 +1526,16 @@ main(int argc, char **argv)
}
driveList.push_back(argv[i]);
}
- if (doBackup && (doRestore || doFormat)) {
- cerr << _("Backup mode can not be combined with format or restore.")
+ if (doBackup && doRestore) {
+ cerr << _("Backup mode can not be combined with restore.")
<< endl;
usage(&cerr);
}
- if (doFormat && driveList.empty()) {
- cerr << _("Format mode needs at least one drive specified.") << endl;
- usage(&cerr);
- }
if (doBackup && (archList.size() > 1)) {
cerr << _("Backup can only create one archive at a time.") << endl;
usage(&cerr);
}
- if (!(doBackup || doRestore || doFormat)) {
+ if (!(doBackup || doRestore)) {
cerr << _("No action specified.") << endl;
usage(&cerr);
}
@@ -1602,8 +1582,6 @@ main(int argc, char **argv)
runBackup();
if (doRestore)
runRestore();
- if (doFormat)
- runFormat();
delete Rpcs;
delete Rfsv;
return 0;