+
+sub default_validate {
+ my $self = shift;
+ my $buffer;
+
+ do {
+ sysread STDIN, $buffer, 1048576;
+ } while (defined $buffer and length($buffer) > 0);
+}
+
+sub write_magic_block {
+ my $self = shift;
+ my $type = shift;
+
+ my $dump_str = pack("a512", $type);
+ print STDOUT $dump_str;
+}
+
+sub read_magic_block {
+ my $self = shift;
+
+ my $magic_block = Amanda::Util::full_read(0, 512);
+ #remove '\0' bytes
+ $magic_block =~ /^([^\0]*)/;
+ my $type = $1;
+
+ return $type;
+}
+
+sub _set_mesgout {
+ my $self = shift;
+
+ my $mesgout_fd;
+ open ($mesgout_fd, '>&=3') || die("Can't open mesgout_fd: $!");
+ $self->{mesgout} = $mesgout_fd;
+}
+