The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: will.senn@gmail.com (Will Senn)
Subject: [TUHS] why does tar have the tape device hard coded into it and why is it mt1 instead of mt0
Date: Fri, 11 Dec 2015 16:27:28 -0600	[thread overview]
Message-ID: <566B4DD0.6070700@gmail.com> (raw)

All,

In my exploration of v6, I followed the advice in "Setting up Unix - 
Seventh Edition" and copied v6tar from v7 to v6. Life is good. However, 
tar is using mt1 and it is hard coded into the source, tar.c:
char    magtape[]       = "/dev/mt1";

As the subject line suggested, I have two questions for those of you who 
might know:

1. Why is it hard coded?
2. Why is it the second device and not the first?

Interestingly, it took me a little while to figure out it was doing this 
because I didn't actually move files between v6 and v7 until today. 
Before this my tests had been limited to separate tests on v6 and v7 
along the lines of:

cd /wherever
tar c .
followed by
tar t
list of files
cd /elsewhere
tar x
files extracted and matching

What it was doing was writing to the non-existant /dev/mt1, which it 
then created, tarring up stuff, and exiting. Then when I listed the 
contents of the tarfile, or extracted the contents, it was successful. 
But, when I went to move the tape between v6 and v7, the tape (mt0) was 
blank, of course. It was at this point that I followed  Noel's advice 
and "Used the source", and figured out that it was hard-coded as you see 
above.

Thanks,

Will



             reply	other threads:[~2015-12-11 22:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-11 22:27 Will Senn [this message]
2015-12-11 22:31 ` Clem Cole
2015-12-11 22:52   ` Will Senn
2015-12-11 23:13     ` John Cowan
2015-12-12  0:26       ` Random832
2015-12-12  2:09 Doug McIlroy
2015-12-12 18:54 ` Mary Ann Horton
2015-12-12 19:58   ` Armando Stettner
2015-12-12 20:13   ` Clem Cole
2015-12-12 22:44     ` Lyndon Nerenberg
2015-12-12 20:57   ` John Cowan
2015-12-12 17:17 [TUHS] TUHS] " Doug McIlroy
2015-12-12 20:17 ` [TUHS] " Diomidis Spinellis
2015-12-13  1:41 Norman Wilson
2015-12-13  3:04 ` Lyndon Nerenberg

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=566B4DD0.6070700@gmail.com \
    --to=will.senn@gmail.com \
    /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).