The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: jnc@mercury.lcs.mit.edu (Noel Chiappa)
Subject: [TUHS] v6tar from v7 on v6, too large?
Date: Wed,  9 Dec 2015 09:24:13 -0500 (EST)	[thread overview]
Message-ID: <20151209142413.3CA2918C0C7@mercury.lcs.mit.edu> (raw)

    > From: Mark Longridge

    > I've never been able to transfer any file larger than 64K to Unix V5 or
    > V6.

Huh?

  # hrd /windows/desktop/TheMachineStops.htm Mach.htm
  Xfer complete: 155+38
  # l Mach.htm
   154 -rw-rw-r--  1 root    78251 Oct 25 12:13 Mach.htm
  #

'more' shows that the contents are all there, and fine. ('hrd' is a command
in my V6 under Ersatz11 that reads an arbitrary file off the host file
system. Guess I need to set the date on the system!)

V6 definitely supports fairly large files; see the code in bmap() in subr.c,
which shows that the basic structure on disk can describe files of 7*256
(1792) + 256*256 (65536) blocks, or 67328 blocks total (34MB).

(In reality, of course, a file can't reach that limit; first, a disk
partition in V6 is limited to 64K blocks, but from that one has to deduct
blocks for the ilist, etc; further, the argument to bmap() is an int, which
limits the 'block number in file' to 16 bits, and in fact the code returns an
error if the high bit in the 'block number in file' is set.)


    > I also don't recall seeing any file on V5 or V6 larger than 65536
    > bytes

I don't think there is one; the largest are just less than 64KB. I don't
think this is deliberate, other than in the sense that they didn't put any
huge files in the distro so it would fit on a couple of RK packs.


    > dd if=/dev/mt0 of=cont.a bs=1 count=90212
    > ..
    > 24676+0 records in
    > 24676+0 records out
    > Now, if we take 90212 and subtract 65536 we get 24676 bytes. So there
    > definitely seems to be some 64K limit here

Probably 'count' is an 'int' in dd, i.e. limited to 16 bits. No longs in V6 C
(as distributed, although later versions of the C compiler for V6 do support
longs - see my 'bringing up Unix' pages).

	Noel



             reply	other threads:[~2015-12-09 14:24 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-09 14:24 Noel Chiappa [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-12-19 13:27 Noel Chiappa
2015-12-10  4:50 Noel Chiappa
2015-12-09 22:16 Noel Chiappa
2015-12-09 22:31 ` Clem Cole
2015-12-09 22:47   ` John Cowan
2015-12-09 23:39     ` Steve Nickolas
2015-12-10  0:24       ` Clem Cole
2015-12-10  0:23     ` Clem Cole
2015-12-10  1:08       ` Greg 'groggy' Lehey
2015-12-10  9:42         ` Jacob Ritorto
2015-12-10  1:19       ` John Cowan
2015-12-10 10:06     ` Oliver Lehmann
2015-12-10 19:50       ` Will Senn
2015-12-09 22:01 Noel Chiappa
2015-12-09 17:50 Noel Chiappa
2015-12-09 18:06 ` Will Senn
2015-12-09 14:56 Noel Chiappa
2015-12-09 16:37 ` Will Senn
2015-12-09 13:30 Noel Chiappa
2015-12-09 14:43 ` Ronald Natalie
2015-12-09 20:41 ` Dave Horsfall
2015-12-09  5:17 Noel Chiappa
2015-12-09  5:55 ` Mark Longridge
2015-12-09 11:31 ` Ronald Natalie
2015-12-09  4:53 Noel Chiappa
2015-12-09 14:38 ` Will Senn
2015-12-09 14:56   ` Clem Cole
2015-12-09 15:07     ` Clem Cole
2015-12-09 16:29       ` Will Senn
2015-12-09 14:59   ` Hellwig Geisse
2015-12-09 17:55 ` Will Senn
2015-12-09  3:33 Will Senn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151209142413.3CA2918C0C7@mercury.lcs.mit.edu \
    --to=jnc@mercury.lcs.mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).