[comp.unix.xenix.sco] reading tapes on 386/ix written to SCO's /dev/erct0

pim@cti-software.nl (Pim Zandbergen) (10/18/90)

I have these two tapes I want to read on our 386/ix 2.0.2 system.
But apperently they were written on SCO UNIX using /dev/erct0,
the error correcting device.

The symptom is the first 64k read OK, but then cpio looses track.
I also used afio. Afio will continue after loosing sync,
but in this case has to resync every 32k or so, leaving
lots of corrupted files.

The problem is that although SCO's error correction is done
in software, this software is located in the device driver
rather then in a filter program.

This makes it impossible to read these tapes on other then SCO
systems, unless someone has written a filter to emulate
SCO's device driver behaviour. Has anyone?

I don't really need the error correction to actually work,
just skipping the CRC info would be enough. 

If someone has more information about how /dev/erct0 stores
the data, I may write this filter myself and share the 
result with you.

Thanks in advance.
-- 
Pim Zandbergen                          domain : pim@cti-software.nl
CTI Software BV                         uucp   : uunet!mcsun!hp4nl!ctisbv!pim
Laan Copes van Cattenburch 70           phone  : +31 70 3542302
2585 GD The Hague, The Netherlands      fax    : +31 70 3512837

pim@cti-software.nl (Pim Zandbergen) (10/19/90)

I wrote:

>I have these two tapes I want to read on our 386/ix 2.0.2 system.
>But apperently they were written on SCO UNIX using /dev/erct0,
>the error correcting device.

With a bit of experimenting, I solved the problem myself.

This is the program I used.
Usage:
	dd if=/dev/tape bs=256k | skipecc | cpio -i ....


#--------------------------------CUT HERE-------------------------------------
#! /bin/sh
#
# This is a shell archive.  Save this into a file, edit it
# and delete all lines above this comment.  Then give this
# file to sh by executing the command "sh file".  The files
# will be extracted into the current directory owned by
# you with default permissions.
#
# The files contained herein are:
#
# -rw-rw-r--   1 pim      other        196 Oct 18 20:33 skipecc.c
#
echo 'x - skipecc.c'
if test -f skipecc.c; then echo 'shar: not overwriting skipecc.c'; else
sed 's/^X//' << '________This_Is_The_END________' > skipecc.c
X#define	READBYTES	32768
X#define	WRITEBYTES	31744
X
X#include	<stdio.h>
X
Xmain()
X{
X	char	buffer[READBYTES];
X
X	while (fread(buffer, 1, READBYTES, stdin) > 0)
X		fwrite(buffer, 1, WRITEBYTES, stdout);
X}
________This_Is_The_END________
if test `wc -c < skipecc.c` -ne 196; then
	echo 'shar: skipecc.c was damaged during transit (should have been 196 bytes)'
fi
fi		; : end of overwriting check
exit 0
-- 
Pim Zandbergen                          domain : pim@cti-software.nl
CTI Software BV                         uucp   : uunet!mcsun!hp4nl!ctisbv!pim
Laan Copes van Cattenburch 70           phone  : +31 70 3542302
2585 GD The Hague, The Netherlands      fax    : +31 70 3512837

tneff@bfmny0.BFM.COM (Tom Neff) (10/19/90)

In article <1990Oct18.194508.10825@cti-software.nl> pim@cti-software.nl (Pim Zandbergen) writes:
>I wrote:
>
>>I have these two tapes I want to read on our 386/ix 2.0.2 system.
>>But apperently they were written on SCO UNIX using /dev/erct0,
>>the error correcting device.
>
>With a bit of experimenting, I solved the problem myself.
>
>This is the program I used.
>Usage:
>	dd if=/dev/tape bs=256k | skipecc | cpio -i ....

Put that C compiler away.

---------------------------------------
	#/bin/sh

	# skipecc, using the tools God and AT&T gave us.

	while true
	do
		dd bs=31744 count=1
		dd bs=1024 count=1 of=/dev/null
	done
----------------------------------------

-- 
To exit --          [__]   Tom Neff
    press <Enter>.  [__]   tneff@bfmny0.BFM.COM