|
@@ -86,9 +86,13 @@ BEGIN
|
|
operation := Lib.operations.GetByUid(uid);
|
|
operation := Lib.operations.GetByUid(uid);
|
|
IF operation # NIL THEN
|
|
IF operation # NIL THEN
|
|
operation.Show(context.out, TRUE);
|
|
operation.Show(context.out, TRUE);
|
|
- ELSE context.error.String("Error: Operation UID "); context.error.Int(uid, 0); context.error.String(" not found"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Error: Operation UID "); context.error.Int(uid, 0); context.error.String(" not found"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
- ELSE context.error.String("Exspected parameters: uid"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Exspected parameters: uid"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
END ShowOp;
|
|
END ShowOp;
|
|
|
|
|
|
@@ -101,9 +105,14 @@ BEGIN
|
|
IF operation # NIL THEN
|
|
IF operation # NIL THEN
|
|
operation.Abort;
|
|
operation.Abort;
|
|
context.out.String("Operation UID "); context.out.Int(uid, 0); context.out.String(" aborted"); context.out.Ln;
|
|
context.out.String("Operation UID "); context.out.Int(uid, 0); context.out.String(" aborted"); context.out.Ln;
|
|
- ELSE context.error.String("Error: Operation UID "); context.error.Int(uid, 0); context.error.String(" not found"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Error: Operation UID "); context.error.Int(uid, 0); context.error.String(" not found"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
|
|
+
|
|
END;
|
|
END;
|
|
- ELSE context.error.String("Exspected parameters: uid"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Exspected parameters: uid"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
END Abort;
|
|
END Abort;
|
|
|
|
|
|
@@ -116,6 +125,7 @@ BEGIN
|
|
context.out.String("Operation UID "); context.out.Int(uid, 0); context.out.String(" has been removed"); context.out.Ln;
|
|
context.out.String("Operation UID "); context.out.Int(uid, 0); context.out.String(" has been removed"); context.out.Ln;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Error: Could not remove operation UID "); context.error.Int(uid, 0); context.error.Ln;
|
|
context.error.String("Error: Could not remove operation UID "); context.error.Int(uid, 0); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
ELSIF context.arg.res = Streams.FormatError THEN
|
|
ELSIF context.arg.res = Streams.FormatError THEN
|
|
par := "";
|
|
par := "";
|
|
@@ -129,10 +139,15 @@ BEGIN
|
|
context.out.String("All finished operation have been removed"); context.out.Ln;
|
|
context.out.String("All finished operation have been removed"); context.out.Ln;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Expected parameters: uid | all | finished"); context.error.Ln;
|
|
context.error.String("Expected parameters: uid | all | finished"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
- ELSE context.error.String("Expected parameters: uid | all | finished"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Expected parameters: uid | all | finished"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
- ELSE context.error.String("Expected parameters: uid | all | finished"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Expected parameters: uid | all | finished"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
END Remove;
|
|
END Remove;
|
|
|
|
|
|
@@ -150,6 +165,7 @@ BEGIN
|
|
mount.SetBlockingStart;
|
|
mount.SetBlockingStart;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Expected parameters: dev#part alias prefix"); context.error.Ln;
|
|
context.error.String("Expected parameters: dev#part alias prefix"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
END;
|
|
END;
|
|
END Mount;
|
|
END Mount;
|
|
@@ -184,6 +200,7 @@ BEGIN
|
|
formatAos.SetBlockingStart;
|
|
formatAos.SetBlockingStart;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("File system "); context.error.String(fsname); context.error.String(" is not supported"); context.error.Ln;
|
|
context.error.String("File system "); context.error.String(fsname); context.error.String(" is not supported"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
ELSE (* optional parameters not specified *)
|
|
ELSE (* optional parameters not specified *)
|
|
NEW(formatAos, selection.disk, selection.partition, context.out);
|
|
NEW(formatAos, selection.disk, selection.partition, context.out);
|
|
@@ -209,6 +226,7 @@ BEGIN
|
|
updateBootFile.SetBlockingStart;
|
|
updateBootFile.SetBlockingStart;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Expected parameters: dev#part bootfilename"); context.error.Ln;
|
|
context.error.String("Expected parameters: dev#part bootfilename"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
END;
|
|
END;
|
|
END UpdateBootFile;
|
|
END UpdateBootFile;
|
|
@@ -272,6 +290,7 @@ BEGIN
|
|
setConfig.SetBlockingStart;
|
|
setConfig.SetBlockingStart;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Expected argument stream that supports SetPos"); context.error.Ln;
|
|
context.error.String("Expected argument stream that supports SetPos"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
END;
|
|
END;
|
|
END SetConfig;
|
|
END SetConfig;
|
|
@@ -303,11 +322,17 @@ BEGIN
|
|
NEW(change, selection.disk, selection.partition, context.out);
|
|
NEW(change, selection.disk, selection.partition, context.out);
|
|
change.SetParameters(oldtype, newtype);
|
|
change.SetParameters(oldtype, newtype);
|
|
change.SetBlockingStart;
|
|
change.SetBlockingStart;
|
|
- ELSE context.error.String("Expected parameters: dev#part oldtype newtype, failed to parse newtype"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Expected parameters: dev#part oldtype newtype, failed to parse newtype"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
- ELSE context.error.String("Expected parameters: dev#part oldtype newtype, failed to parse oldtype"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Expected parameters: dev#part oldtype newtype, failed to parse oldtype"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
- ELSE context.error.String("Operation not support for floppy disk drives."); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Operation not support for floppy disk drives."); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
END;
|
|
END;
|
|
END ChangeType;
|
|
END ChangeType;
|
|
@@ -325,9 +350,13 @@ BEGIN
|
|
NEW(delete, selection.disk, selection.partition, context.out);
|
|
NEW(delete, selection.disk, selection.partition, context.out);
|
|
delete.SetParameters(type);
|
|
delete.SetParameters(type);
|
|
delete.SetBlockingStart;
|
|
delete.SetBlockingStart;
|
|
- ELSE context.error.String("Expected parameters: dev#part type sizeMB, error while parsing type"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Expected parameters: dev#part type sizeMB, error while parsing type"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
- ELSE context.error.String("Operation not supported for floppy disks"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Operation not supported for floppy disks"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
END;
|
|
END;
|
|
END Delete;
|
|
END Delete;
|
|
@@ -345,11 +374,17 @@ BEGIN
|
|
NEW(create, selection.disk, selection.partition, context.out);
|
|
NEW(create, selection.disk, selection.partition, context.out);
|
|
create.SetParameters(size, type, FALSE);
|
|
create.SetParameters(size, type, FALSE);
|
|
create.SetBlockingStart;
|
|
create.SetBlockingStart;
|
|
- ELSE context.error.String("Expected parameters: dev#part type sizeMB, error while parsing size"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Expected parameters: dev#part type sizeMB, error while parsing size"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
- ELSE context.error.String("Expected parameters: dev#part type sizeMB, error while parsing type"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Expected parameters: dev#part type sizeMB, error while parsing type"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
- ELSE context.error.String("Operation not supported on floppy disks"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Operation not supported on floppy disks"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
END;
|
|
END;
|
|
END Create;
|
|
END Create;
|
|
@@ -378,6 +413,7 @@ BEGIN
|
|
setFlags.SetBlockingStart;
|
|
setFlags.SetBlockingStart;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Operation not supported for floppy disks"); context.error.Ln;
|
|
context.error.String("Operation not supported for floppy disks"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
END;
|
|
END;
|
|
END ChangeActiveBit;
|
|
END ChangeActiveBit;
|
|
@@ -395,6 +431,7 @@ BEGIN
|
|
IF context.arg.GetInteger(block, FALSE) THEN
|
|
IF context.arg.GetInteger(block, FALSE) THEN
|
|
IF ~context.arg.GetInteger(numblocks, FALSE) THEN
|
|
IF ~context.arg.GetInteger(numblocks, FALSE) THEN
|
|
context.error.String("Exspected parameters: dev#part filename [block numblocks], failed to parse numblocks"); context.error.Ln;
|
|
context.error.String("Exspected parameters: dev#part filename [block numblocks], failed to parse numblocks"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
RETURN;
|
|
RETURN;
|
|
END;
|
|
END;
|
|
ELSE (* optional parameters not specified *)
|
|
ELSE (* optional parameters not specified *)
|
|
@@ -405,6 +442,7 @@ BEGIN
|
|
fileToPartition.SetBlockingStart;
|
|
fileToPartition.SetBlockingStart;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Exspected parameters: dev#part name [block numblocks], failed to parse filename"); context.error.Ln;
|
|
context.error.String("Exspected parameters: dev#part name [block numblocks], failed to parse filename"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
END;
|
|
END;
|
|
END FileToPartition;
|
|
END FileToPartition;
|
|
@@ -423,6 +461,7 @@ BEGIN
|
|
IF context.arg.GetInteger(block, FALSE) THEN
|
|
IF context.arg.GetInteger(block, FALSE) THEN
|
|
IF ~context.arg.GetInteger(numblocks, FALSE) THEN
|
|
IF ~context.arg.GetInteger(numblocks, FALSE) THEN
|
|
context.error.String("Exspected parameters: dev#part filename [block numblocks], failed to parse numblocks"); context.error.Ln;
|
|
context.error.String("Exspected parameters: dev#part filename [block numblocks], failed to parse numblocks"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
RETURN;
|
|
RETURN;
|
|
END;
|
|
END;
|
|
ELSE (* optional parameters not specified *)
|
|
ELSE (* optional parameters not specified *)
|
|
@@ -433,7 +472,9 @@ BEGIN
|
|
partitionToFile.SetBlockingStart;
|
|
partitionToFile.SetBlockingStart;
|
|
context.out.String("Partitions UID "); context.out.Int(partitionToFile.uid, 0); context.out.String(": Started PartitionToFile on ");
|
|
context.out.String("Partitions UID "); context.out.Int(partitionToFile.uid, 0); context.out.String(": Started PartitionToFile on ");
|
|
context.out.String(partitionToFile.diskpartString); context.out.Ln;
|
|
context.out.String(partitionToFile.diskpartString); context.out.Ln;
|
|
- ELSE context.error.String("Exspected parameters: dev#part name [block numblocks], failed to parse filename"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Exspected parameters: dev#part name [block numblocks], failed to parse filename"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
END;
|
|
END;
|
|
END PartitionToFile;
|
|
END PartitionToFile;
|
|
@@ -458,11 +499,17 @@ BEGIN
|
|
writeMBR.SetParameters(filename, TRUE, FALSE);
|
|
writeMBR.SetParameters(filename, TRUE, FALSE);
|
|
END;
|
|
END;
|
|
writeMBR.SetBlockingStart;
|
|
writeMBR.SetBlockingStart;
|
|
- ELSE context.error.String("Expected parameters: dev#0 filename, failed to parse filename"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Expected parameters: dev#0 filename, failed to parse filename"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
- ELSE context.error.String("Expected parameters: dev#0 filename, partition is not 0"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Expected parameters: dev#0 filename, partition is not 0"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
- ELSE context.error.String("Operation not supported for floppy disks"); context.error.Ln;
|
|
|
|
|
|
+ ELSE
|
|
|
|
+ context.error.String("Operation not supported for floppy disks"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
END;
|
|
END;
|
|
END WriteMBR;
|
|
END WriteMBR;
|
|
@@ -482,6 +529,7 @@ BEGIN
|
|
updateLoader.SetBlockingStart;
|
|
updateLoader.SetBlockingStart;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Expected parameters: dev#part bootloader"); context.error.Ln;
|
|
context.error.String("Expected parameters: dev#part bootloader"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
END;
|
|
END;
|
|
END UpdateBootLoader;
|
|
END UpdateBootLoader;
|
|
@@ -525,6 +573,7 @@ BEGIN
|
|
showBlocks.SetBlockingStart;
|
|
showBlocks.SetBlockingStart;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Exspected parameters: dev#part block [numblocks], failed to parse block"); context.error.Ln;
|
|
context.error.String("Exspected parameters: dev#part block [numblocks], failed to parse block"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
END;
|
|
END;
|
|
END ShowBlocks;
|
|
END ShowBlocks;
|
|
@@ -544,9 +593,11 @@ BEGIN
|
|
Lib.Eject(dev, temp); context.out.String(temp); context.out.Ln;
|
|
Lib.Eject(dev, temp); context.out.String(temp); context.out.Ln;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Device "); context.error.String(name); context.error.String(" not found"); context.error.Ln;
|
|
context.error.String("Device "); context.error.String(name); context.error.String(" not found"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Expected parameters: dev"); context.error.Ln;
|
|
context.error.String("Expected parameters: dev"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
END Eject;
|
|
END Eject;
|
|
|
|
|
|
@@ -565,9 +616,11 @@ BEGIN
|
|
Lib.Sync(dev, temp); context.out.String(temp); context.out.Ln;
|
|
Lib.Sync(dev, temp); context.out.String(temp); context.out.Ln;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Device "); context.error.String(name); context.error.String(" not found"); context.error.Ln;
|
|
context.error.String("Device "); context.error.String(name); context.error.String(" not found"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Expected parameters: dev"); context.error.Ln;
|
|
context.error.String("Expected parameters: dev"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
END;
|
|
END;
|
|
END Sync;
|
|
END Sync;
|
|
|
|
|
|
@@ -612,6 +665,7 @@ BEGIN
|
|
END;
|
|
END;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("No Devices found"); context.error.Ln;
|
|
context.error.String("No Devices found"); context.error.Ln;
|
|
|
|
+ context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
Lib.diskModel.Release;
|
|
Lib.diskModel.Release;
|
|
END Show;
|
|
END Show;
|
|
@@ -699,6 +753,7 @@ BEGIN
|
|
selection.disk.device := NIL; selection.partition := -1; (* invalid *)
|
|
selection.disk.device := NIL; selection.partition := -1; (* invalid *)
|
|
IF ~context.arg.GetString(devpart) THEN
|
|
IF ~context.arg.GetString(devpart) THEN
|
|
context.error.String("Expected parameters: dev#part"); context.error.Ln; context.error.Update;
|
|
context.error.String("Expected parameters: dev#part"); context.error.Ln; context.error.Update;
|
|
|
|
+ context.result := Commands.CommandParseError;
|
|
RETURN FALSE;
|
|
RETURN FALSE;
|
|
END;
|
|
END;
|
|
context.arg.SkipWhitespace;
|
|
context.arg.SkipWhitespace;
|
|
@@ -716,11 +771,11 @@ BEGIN
|
|
RETURN TRUE;
|
|
RETURN TRUE;
|
|
ELSE
|
|
ELSE
|
|
context.error.String("Partition "); context.error.String(devpart); context.out.String(" not found."); context.error.Ln;
|
|
context.error.String("Partition "); context.error.String(devpart); context.out.String(" not found."); context.error.Ln;
|
|
- context.error.Update;
|
|
|
|
|
|
+ context.error.Update; context.result := Commands.CommandError;
|
|
END;
|
|
END;
|
|
RETURN FALSE;
|
|
RETURN FALSE;
|
|
END GetSelection;
|
|
END GetSelection;
|
|
|
|
|
|
END Partitions.
|
|
END Partitions.
|
|
|
|
|
|
-System.Free DiskBenchmark Partitions ~
|
|
|
|
|
|
+System.Free DiskBenchmark Partitions ~
|