Subject: Linux-Misc Digest #378
From: Digestifier <Linux-Misc-Request@senator-bedfellow.MIT.EDU>
To: Linux-Misc@senator-bedfellow.MIT.EDU
Reply-To: Linux-Misc@senator-bedfellow.MIT.EDU
Date:     Tue, 5 Jul 94 11:13:28 EDT

Linux-Misc Digest #378, Volume #2                 Tue, 5 Jul 94 11:13:28 EDT

Contents:
  PhotoCD and LinuX - multisession hack (Gerd Knorr)
  Re: Idea for supporting a lot of SCSI and other controllers (Rob Janssen)
  Linux kernel programming book (U.Kunitz)
  Re: commercial programms (Kai Petzke)
  Re: AMD 486 66/2, ANy known probems (Hans-Christoph Rohland)
  Re: e@mail of LinuX CDROM publisher wanted (Jon Saken)
  Re: Linux better than OS/2 for net surfing (ddelsig@uoft02.utoledo.edu)
  Re: commercial programms (Tim Smith)
  Re: Is it possible to mix FIDO and Usenet? (No Place Like Home BBS)
  Need help with DIP in dynamic slip env. (nazario@kuhub.cc.ukans.edu)
  RE: Enscript / mpage available (ddelsig@uoft02.utoledo.edu)

----------------------------------------------------------------------------

From: kraxel@cs.tu-berlin.de (Gerd Knorr)
Subject: PhotoCD and LinuX - multisession hack
Date: 5 Jul 1994 11:52:55 GMT

Here is my hack for reading multisession-PhotoCD's:

It is required that the CD-ROM driver can read the XA-Format (that means you
can mount PhotoCD's, but only the first session). This hack add's only
multisession-support.

This is *not* the normal way to to this. I patched the isofs, normaly
multisession-support should be the job of the CD-ROM-driver. But it
works fine ...

There are two parts. The first is a small program, It looks for the
last PhotoCD-Session:

============================start mpcd.c
#include <stdio.h>
#include <fcntl.h>
#include <linux/cdrom.h>
#include <sys/ioctl.h>

#include "util.h"

int filehandle;
int rc;
int i;
int size;
int start_track;
int start_session = 0;

char buffer[1024];

char toc_header[2];
struct cdrom_tocentry toc_entry;

main(int argc, char *argv[])
{
  if (argc == 1) {
    fprintf(stderr,"usage: mpcd /dev/>cdrom<\n");
    return(0); }
  filehandle = open(argv[1],O_RDONLY);
  if (filehandle == 0) {
    fprintf(stderr,"mpcd: open %s failed\n",argv[1]);
    return(0); }
  rc = ioctl(filehandle,CDROMREADTOCHDR,&toc_header);
  if (rc) {
    fprintf(stderr,"mpcd: ioctl failed, may be there is no CD in the drive.\n");
    fprintf(stderr,"mpcd: or the device is'nt a CD-ROM drive\n");
    close(filehandle);
    return(0); }
  lseek(filehandle,2048*(start_session+16),SEEK_SET);
  read(filehandle,buffer,1024);
  if (strncmp(&buffer[1],"CD001",5) != 0) {
    printf("0");
    close(filehandle);
    return(0); }
  size = isonum_733(&buffer[80]);
  toc_entry.cdte_format = CDROM_MSF;
  for (i = (int)toc_header[0]; i <= (int)toc_header[1]; i++) {
    toc_entry.cdte_track = i;
    rc = ioctl(filehandle,CDROMREADTOCENTRY,&toc_entry);
    if (rc) {
      fprintf(stderr,"mpcd: ioctl failed\n");
      close(filehandle);
      return(0); }
    start_track = (int)toc_entry.cdte_addr.msf.frame +
                  (int)toc_entry.cdte_addr.msf.second*75 + 
                  (int)toc_entry.cdte_addr.msf.minute*75*60 - 150;
    if (start_track > size) {
      memset(buffer,0,1024);
      lseek(filehandle,2048*(start_track+16),SEEK_SET);
      read(filehandle,buffer,1024);
      if (strncmp(&buffer[1],"CD001",5) != 0) {
        break; }
      start_session = start_track;
      size = isonum_733(&buffer[80]); }}
  printf("%i",start_session);
  close(filehandle);
  return(0);
}
============================end mpcd.c
============================start util.h
extern int isonum_711(char *);
extern int isonum_712(char *);
extern int isonum_721(char *);
extern int isonum_722(char *);
extern int isonum_723(char *);
extern int isonum_731(char *);
extern int isonum_732(char *);
extern int isonum_733(char *);
extern int iso_date(char *, int);
============================end util.h

For compiling this you need the file util.c. You can take it from
/usr/src/linux/fs/isofs, so I don't need to post it.
"gcc -o mpcd mpcd.c util.c" should compile it successful.

mpcd needs the filename of the CD-ROM (/dev/sr0 for me) as argument. 
It prints a number to stdout. This number should be different from zero
for any PhotoCD with more than one session, zero else. This number
is the first sector of the last Session.

The second part is a patch to /usr/src/linux/fs/isofs/inode.c
(I have kernel v1.1.0):
===============================start diff
*** inode.c.org Thu Apr 21 10:15:26 1994
--- inode.c     Wed May 18 22:09:48 1994
***************
*** 66,70 ****
  
  
! static int parse_options(char *options,char *map,char *conversion, char * rock, char * cruft, unsigned int * blocksize)
  {
        char *this_char,*value;
--- 66,70 ----
  
  
! static int parse_options(char *options,char *map,char *conversion, char * rock, char * cruft, unsigned int * blocksize, unsigned int * mpcd)
  {
        char *this_char,*value;
***************
*** 75,78 ****
--- 75,79 ----
        *conversion = 'a';
        *blocksize = 1024;
+         *mpcd = 0;
        if (!options) return 1;
        for (this_char = strtok(options,","); this_char; this_char = strtok(NULL,",")) {
***************
*** 116,119 ****
--- 117,132 ----
                  *blocksize = ivalue;
                }
+                 else if (!strcmp(this_char,"mpcd") && value) {
+                 char * vpnt = value;
+                 unsigned int ivalue;
+                 ivalue = 0;
+                 while(*vpnt){
+                   if(*vpnt <  '0' || *vpnt > '9') break;
+                   ivalue = ivalue * 10 + (*vpnt - '0');
+                   vpnt++;
+                 };
+                 if (*vpnt) return 0;
+                   *mpcd = ivalue;
+                 }
                else return 0;
        }
***************
*** 126,129 ****
--- 139,143 ----
        struct buffer_head *bh;
        int iso_blknum;
+         int mpcd_blknum;
        unsigned int blocksize, blocksize_bits;
        int high_sierra;
***************
*** 139,143 ****
        char map, conversion, rock, cruft;
  
!       if (!parse_options((char *) data,&map,&conversion, &rock, &cruft, &blocksize)) {
                s->s_dev = 0;
                return NULL;
--- 153,157 ----
        char map, conversion, rock, cruft;
  
!       if (!parse_options((char *) data,&map,&conversion, &rock, &cruft, &blocksize, &mpcd_blknum)) {
                s->s_dev = 0;
                return NULL;
***************
*** 158,162 ****
        s->u.isofs_sb.s_high_sierra = high_sierra = 0; /* default is iso9660 */
  
!       for (iso_blknum = 16; iso_blknum < 100; iso_blknum++) {
                if (!(bh = bread(dev, iso_blknum << (ISOFS_BLOCK_BITS-blocksize_bits), blocksize))) {
                        s->s_dev=0;
--- 172,176 ----
        s->u.isofs_sb.s_high_sierra = high_sierra = 0; /* default is iso9660 */
  
!       for (iso_blknum = mpcd_blknum+16; iso_blknum < mpcd_blknum+100; iso_blknum++) {
                if (!(bh = bread(dev, iso_blknum << (ISOFS_BLOCK_BITS-blocksize_bits), blocksize))) {
                        s->s_dev=0;
===============================end diff

This add's a new mount-option for the isofs, so that you can use the results
from mpcd. Build and install the new kernel, then reboot.


/sbin/mount -t iso9660 -o mpcd=`/sbin/mpcd /dev/sr0` /dev/sr0 /cdrom

should mount PhotoCD's with all sessions.


BTW: I wrote a small X11-Programm as frontend for hpcdtoppm. It is useful
     if you want to load only a part of the image. You can select
     the part of the image, you want to load, with mouse, and hpcdtoppm
     will be called with the right parameters. I put it today into
     ftp.cs.tu-berlin.de:/pub/linux/incoming/xpcd-0.1.tar.gz. 
     I think, it will be moved to /pub/linux/Local/misc next days.

Gerd Knorr
kraxel@cs.tu-berlin.de

------------------------------

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: Idea for supporting a lot of SCSI and other controllers
Reply-To: pe1chl@rabo.nl
Date: Tue, 5 Jul 1994 08:08:30 GMT

In <1994Jul4.144846.12059@uk.ac.swan.pyr> iiitac@uk.ac.swan.pyr (Alan Cox) writes:

>In article <2v2b1j$ids@news.u.washington.edu> tzs@u.washington.edu (Tim Smith) writes:
>>Also, the Netware driver interface is a lot cleaner and better thought out
>>than any commecial Unix one I've seen--Novell actually seemed to *want*
>>third parties to write Netware drivers, whereas the impression I've gotten
>>when writing SCO drivers is that I was doing something that SCO would really
>>rather not have me do.
>>
>I assume thats why Novell seem to want $7000 just for the ODI driver development
>kit - and the O stands for Open. Even microsoft make the NDIS 3 specifications
>FREELY available.

Hmmm... the SPEC for ODI is freely available.  Only you will have a hard
time constructing a driver with only this spec.

But the same goes for NDIS.  Is there somewhere a skeleton of an NDIS driver
freely available on the net?

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

------------------------------

From: kunitz@informatik.hu-berlin.de (U.Kunitz)
Crossposted-To: comp.os.linux.development
Subject: Linux kernel programming book
Date: 5 Jul 1994 12:12:49 GMT

Hi Linuxer,

There is a german book about Linux kernel hacking:

Linux-Kernel-Programmierung 
  Algorithmen und Strukturen der Version 1.0

                          Linux Kernel Programming
                            Algorithms and Structures of the Version 1.0

by

Michael Beck, Harald Boehme, Mirko Dziadzka, Ulrich Kunitz, Robert
Magnus, Dirk Verworner

Language: _german_
386 pages
CD-ROM
79.90 DM

Publisher: Addison-Wesley Germany
ISBN 3-89319-712-5

Contents:

1) Linux -- The Operating System
2) Compilation of the Kernel
3) Kernel Introduction 
4) Memory Management
5) Interprocess Communication
6) The Linux File System
7) Device Driver under Linux
8) Network Implementation
A) System Calls
B) Kernel-Near Commands
C) The proc File System
D) The Boot Process

At the moment Addison-Wesley doesn't plan to publish an english
translation of the book. If you would like reading the book in english,
send Email to

  linux@Informatik.HU-Berlin.De ,

use the subject

  Linux Kernel Programming Book ,

and write something like

  Yes, I want to read the book in english.

We appreciate any kind of support for our little campaign.

There is also a WWW page with information about the book:

http://www.informatik.hu-berlin.de/topics/linux/buch/linux-book-engl.html

Ciao, Uli
-- 
I know tha >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> t in my
heart I f >>>> Ulrich Kunitz >>>> kunitz@informatik.hu-berlin.de >>>> eel like
going ho >>>>               >>>> Voice: (030) 513 11 52         >>>> me again 
But I k <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< now ...  

------------------------------

From: wpp@marie.physik.tu-berlin.de (Kai Petzke)
Subject: Re: commercial programms
Date: 5 Jul 94 11:50:35 GMT

maehner@Informatik.TU-Muenchen.DE (Johannes Maehner) writes:


>Maybe this is a naive question, nevertheless I want to ask it:

>Why is there only a small amount of commercial
>programms for Linux? 

a) Because Linux is new.
   It takes not only time to port the software, but also to package
   it, prepare for marketing, etc., etc.
b) Because Linux is free.
   Many people from the "commercial" world might think, that linux
   users are those, who are not willing to pay for a product.
c) Because Linux is ever-changing.
   Commercial software developers don't like the idea to having to
   update their programs, because the operating system changed.
   Also, they fear, that support will be complicated with all the
   versions of linux around.
d) Because Linux has no big lobby (yet).
e) Because some misunderstand the GPL, and believe, that they have
   to give away source code, if they give away a binary.
f) Add your own ...


My thought is: let it happen.  A few companies have started selling
commercial products for linux.  If it turns out, that they are making
"big money" from this, others will follow.  If it does not -- well,
then the market will remain small, and we will have to concentrate
on the emulators.

Don't try to force Linux to grow too fast.  You cannot have more
commercial software than the market is willing to buy.  Otherwise,
if they can't sell their products, they might all stop at once.




Kai
-- 
Kai Petzke                      | How fast can computers get?
Technical University of Berlin  |
Berlin, Germany                 | Sol 9, of course, on Star Trek.
wpp@marie.physik.tu-berlin.de   |

------------------------------

From: hrohlan@gwdg.de (Hans-Christoph Rohland)
Subject: Re: AMD 486 66/2, ANy known probems
Date: Tue, 5 Jul 1994 12:22:30 GMT

Michael Finger (mfinger@gill.micro.umn.edu) wrote:
: In article <1994Jul1.223715.859@ritz.equinox.gen.nz> grantma@ritz.equinox.gen.nz (Matthew Grant) writes:
: >Hi there,
: >
: >I know to steer clear of early AMD 486dx/40s, but is there any problems with
: >the 486DX 66/2?  I have just heard there is a register set bug with all AMD
: >chips.  Are there any problems with Bus masters lkie the AHA 1542B?  

:   I do not use any SCSI controllers, but my AMD 486 DX2/66 works like a champ,
:   for a lot less then and Intel ones.  So as far as the AMD chips, I have never
:   had a problem, for both a 386 dx/40 and a 486 dx2/66.

In Jan/Feb 94 there was a long discussion about the amd chip. There where
some chips (We had one) which failed on running ghostscript. We had to
change to an Intel chip. I don't know about newer AMD chips. Never heard
about the probs again.

Christoph

------------------------------

From: saken@stsci.edu (Jon Saken)
Crossposted-To: comp.os.linux.development,comp.os.linux.admin,de.comp.os.linux,comp.os.linux.help
Subject: Re: e@mail of LinuX CDROM publisher wanted
Date: 5 Jul 1994 12:59:30 GMT



   Here are a few I got when I posted a similiar question:

InfoMagic: orders@Infomagic.com

ReadMe and Index files for the current CD's may be found at:
        ftp.uu.net:/vendor/InfoMagic


Just Computers!: 
Internet Order E-Mail:  sales@justcomp.com
   Information E-Mail:  info@justcomp.com
                        Include word "help" on a single line in message

Universal CD-ROM (tm)
        1645 S. Bascom Ave., #7
        Campbell, CA 95008
        Phone/Fax: 
        (408)369-9818
        Email: alte@rahul.net



jon

------------------------------

From: ddelsig@uoft02.utoledo.edu
Subject: Re: Linux better than OS/2 for net surfing
Date: Tue, 5 Jul 1994 04:04:27 GMT

On Tue, 5 Jul 1994 sheldon@iastate.edu wrote:
    
> In comp.os.linux.misc you write:
> 
> >It really is an exercise in futility to try and convince a reasonably
> >intelligent person that the cost of linux is really pretty close to that of
> >OS/2.  It's free if you've got net access.  It's very cheap if you've got
> >access to a CD-ROM drive.  It's free if you've got a friend who has an
> >installation.  Whether or not OS/2 is far superior, a little better, or
worse
> >than linux in one respect or another is clearly the object of some debate. 
T$
> >fact that OS/2 costs considerably more than linux is not.
>
>  Your ignoring the time it takes to download from the net.
>
>  Perhaps in your case you are worth nothing, but for me, it's free time I  
> could better spend doing something else.
>

Really?  I'm worth nothing because I don't mind downloading from the net?
I think you're losing it here.  This whole thread was about why OS/2 is
better/worse than linux, not how much you think my life is worth.  Flaming
me does no good in proving your point, in fact it detracts by making you
look foolish and petty.

I got the SLS distribution from sunsite about a year ago.  I believe it
consisted of around 20 disks.  From my home I retrieved all the disks into
my account at school.  Took about an hour, which was spent doing other things
while occasionally checking on the progress of the transfer.  The next day
I brought a pack of disks to my university and downloaded the whole thing
in about an hour.  If I were to do it again today I would just download the
whole thing overnight while I slept. In either event, the time spent is
negligible.

Dave

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
```````````````````````````````````````````````````````````````````````````````
     _/_/_/_/     _/_/        _/_/   _/_/_/_/       David M. Del Signore
      _/    _/     _/_/    _/_/       _/    _/      University of Toledo
     _/     _/    _/ _/  _/ _/       _/     _/          Toledo, Ohio
    _/     _/    _/  _/_/  _/       _/     _/
   _/    _/     _/   _/   _/       _/    _/      ddelsig@uoft02.utoledo.edu
_/_/_/_/     _/_/        _/_/   _/_/_/_/      suprdave@esserv01.eng.utoledo.edu
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
```````````````````````````````````````````````````````````````````````````````



------------------------------

From: tzs@u.washington.edu (Tim Smith)
Subject: Re: commercial programms
Date: 5 Jul 1994 13:33:59 GMT

Kai Petzke <wpp@marie.physik.tu-berlin.de> wrote:
>b) Because Linux is free.
>   Many people from the "commercial" world might think, that linux
>   users are those, who are not willing to pay for a product.
>c) Because Linux is ever-changing.
>   Commercial software developers don't like the idea to having to
>   update their programs, because the operating system changed.
>   Also, they fear, that support will be complicated with all the
>   versions of linux around.
...
>e) Because some misunderstand the GPL, and believe, that they have
>   to give away source code, if they give away a binary.

I'd guess that c) is a big reason.  Commercial vendors hate it when a
customer calls up and says "your software breaks on the latest system"
and they ask "what system are you running" and the customer gives them
a number that's two or three releases past the one the vendor updated
to just last week!

There might also be some fear of obnoxious users.  If you develop something
commercial, you'll have to put up with (a) people who go around saying you
are violating GPL by not releasing source and so are going to be sued out
of existence soon and so no one should buy your product, and (b) people
who are against the idea of commercial software and will flame your
product.  Why bother, when you can spend your time developing for SCO
Unix, where you'll have a bigger market and less hassle?

--Tim Smith

------------------------------

From: noplace@clark.net (No Place Like Home BBS)
Crossposted-To: comp.os.linux.admin,comp.os.linux.help
Subject: Re: Is it possible to mix FIDO and Usenet?
Date: 5 Jul 1994 14:33:52 GMT

Garry Adkins (adkinsg@pcn.proline.com) wrote:

: Is it possible to get a FIDOnet mailer for linux?

: Here's what I'd like to do:
: Get incoming fidonet mail and be able to read it via trn, tin, etc.
:       (I'm thinking of groups like fido.whatever....)

: Take the new postings and send them to the local FIDO network.

: Be able to send/recieve FIDO netmail and forward it to the proper
: accounts as regular linux mail. (reading with elm)


Look for a program called IFMAIL on sunsite or one of the other big ftp
archives.  If you can figure it out, it does a pretty good job of
transferring fido<==>usenet news and mail.  The docs are pretty inadequate,
but you can probably figure it out yourself.


------------------------------

From: nazario@kuhub.cc.ukans.edu
Crossposted-To: comp.os.linux.help
Subject: Need help with DIP in dynamic slip env.
Date: 5 Jul 94 08:33:55 CDT

 !! Please email replies to nazario@falcon.cc.ukans.edu !!

I am having some trouble getting DIP v.3.37 (uri) working from home.

I am dialing into a bank of modems which supports 32 lines.  I dial
one number and may be attached to anyone of 32 modems which are on two
terminal servers.  My problem is I don't understand how to make dip
acquire the remote IP address dynamically (which I assume it can do
via BOOTP).  It seems that DIP is designed for static environments or
well known dynamic environments.

Ideally, I would expect DIP to be able to get the netmask, remote
gateway, etc via bootp... Am I correct about this?

If anyone can offer suggestions I would appreciate the help very
much...

Please email replies to nazario@falcon.cc.ukans.edu
-- 
+---------------------------------+----------------------------------------+
| Paul Nazario                    |                                        |
| Academic Computing Services     | Internet:  Nazario@falcon.cc.ukans.edu |
| University of Kansas            | Phone:     (913) 864-0421              |
+---------------------------------+----------------------------------------+

------------------------------

From: ddelsig@uoft02.utoledo.edu
Subject: RE: Enscript / mpage available
Date: Tue, 5 Jul 1994 04:23:17 GMT

In Article <CsG5qE.G46@news.cis.umn.edu>
timn8r@piranha.micro.umn.edu (Tim Bandy) writes:
>Is there a utility such as enscript or mpage to print multiple pages
>on a single sheet of paper?  I have looked on several ftp sites for
>each of these, but no such luck.  Anyone else interested?  I might
>be persuaded to write one if no such utility exists.  I know that
>enscript generates postscript code, so that much shouldn't be too
>hard...
>
>Tim Bandy

Look at sunsite.unc.edu for /pub/Linux/system/Printing/nenscript-1.13++.*

Here's a bit from the .lsm:
DESC1:     [NENSCRIPT_is_a_public_domain_version_of_the_Adobe_program________]
DESC2:     [ENSCRIPT._This_program_translates_a_text_file_into_the_format____]
DESC3:     [suitable_for_printing_on_a_postscript_printer.___________________]
AUTHOR:    [Craig_Southeren_(c/o_geoffw@extro.ucc.oz.au)_____________________]

Also in the same directory is mpage213.tgz and a few other utils.

>--
>Tim Bandy (timn8r@mermaid.micro.umn.edu)
>University of Minnesota
>If you like my opionions, you may purchase them from me at cost + 5%

Good luck with it!

Dave

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
```````````````````````````````````````````````````````````````````````````````
     _/_/_/_/     _/_/        _/_/   _/_/_/_/       David M. Del Signore
      _/    _/     _/_/    _/_/       _/    _/      University of Toledo
     _/     _/    _/ _/  _/ _/       _/     _/          Toledo, Ohio
    _/     _/    _/  _/_/  _/       _/     _/ 
   _/    _/     _/   _/   _/       _/    _/      ddelsig@uoft02.utoledo.edu
_/_/_/_/     _/_/        _/_/   _/_/_/_/      suprdave@esserv01.eng.utoledo.edu
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
```````````````````````````````````````````````````````````````````````````````


------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: Linux-Misc-Request@NEWS-DIGESTS.MIT.EDU

You can send mail to the entire list (and comp.os.linux.misc) via:

    Internet: Linux-Misc@NEWS-DIGESTS.MIT.EDU

Linux may be obtained via one of these FTP sites:
    nic.funet.fi				pub/OS/Linux
    tsx-11.mit.edu				pub/linux
    sunsite.unc.edu				pub/Linux

End of Linux-Misc Digest
******************************
