[Info-vax] The (now lost) future of Alpha.
Johnny Billquist
bqt at softjar.se
Mon Aug 6 14:23:38 EDT 2018
On 2018-08-06 17:21, Bob Koehler wrote:
> In article <pk7pe6$c30$1 at gioia.aioe.org>, Chris <xxx.syseng.yyy at gfsys.co.uk> writes:
>>
>> One of the reasons why unix and C became so popular in the early days
>> is because the C library provides platform independent access to i/o,
>> storage and a shed load of other functions. If I write a c program for
>> any flavour of unix, or linux and don't try to be too clever, it will
>> almost always compile and run on anything else.
>
> You obvioulsy haven't done enough with ioctl(). Or am I being "too
> clever"?
>
> Years ago, I found I had to get into ioctl() just to identify the contents
> of a magtape.
You needs ioctl() for two specific things when dealing with magtapes.
1) When moving over the tape, either rewinding, skipping files or
records forward or backward.
2) When you want to write tape marks.
There are no other situation when you use ioctl() for the tape. If you
want to figure out what is on the tape, you read() from it.
But I agree that just using the C library when dealing with tapes will
make you so utterly miserable that you want to shoot yourself in the head.
The C library is good when you want to do basic, simple things. Tapes
are not among the basic, simple things under Unix.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt at softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol
More information about the Info-vax
mailing list