Subject: Linux-Development Digest #152
From: Digestifier <[email-masked]>
To: [email-masked]
Date: Sat, 10 Sep 94 22:13:09 EDT

Linux-Development Digest #152, Volume #2         Sat, 10 Sep 94 22:13:09 EDT

Contents:
  Re: Strange net behaviour, any hints ? (Bart Kindt)
  Oops: 0000 , then crash ...bug in scsi tape (st.c)? (Russell Leighton)
  Re: Survey: who wants f77,cc,c++,hpf for linux? (Jeremy Bettis)
  Re: 320x200 X resolution? (Orest Zborowski)
  Re: DOS BC++/Linux floats (Jacques Gelinas)
  Re: 3c509 Problems (Matthew S. Crocker)
  Re: cat /proc/interrupts doesn't show printer ints. (Uwe Bonnes)
  Re: Alpha Linux (William Henning)
  Re: News Spool File System - new filesystem type?? (Basile STARYNKEVITCH)
  -fPIC flag in gcc (Ted Harding)
  Re: Survey: who wants f77,cc,c++,hpf for linux? (Ray Hann)
  i Enhanced IDE controller drivers  (Steve van Aardt)
  Re: 320x200 X resolution? (Christopher Wiles)

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

From: [email-masked] (Bart Kindt)
Subject: Re: Strange net behaviour, any hints ?
Date: Sat, 10 Sep 1994 16:32:52 GMT

In article <[email-masked]> [email-masked] (Dr. Ernst-Dieter Klinkenberg) writes:
>Path: otago.ac.nz!canterbury.ac.nz!waikato!ames!agate!library.ucla.edu!csulb.edu!nic-nac.CSU.net!charnel.ecst.csuchico.edu!yeshua.marcam.com!news.kei.com!eff!news.duke.edu!solaris.cc.vt.edu!uunet!Germany.EU.net!news.dfn.de!news.belwue.de!zib-berlin.de!in
>2hro!hp1.uni-rostock.de!p54
>From: [email-masked] (Dr. Ernst-Dieter Klinkenberg)
>Newsgroups: comp.os.linux.development
>Subject: Strange net behaviour, any hints ?
>Date: 8 Sep 1994 08:51:43 GMT
>Organization: University of Rostock (Germany)
>Lines: 13
>Message-ID: <[email-masked]>
>NNTP-Posting-Host: hp1.uni-rostock.de
>X-Newsreader: TIN [version 1.2 PL2]

>While the the network behind our gateway was physically under repair it was
>in our inhouse net impossible to telnet to a linux-box. I got a connect, but
>no login. This was anoying me because this didn't happend to our
>HP-workstation and not to a FreeBSD-box, which my colleague favours.

>The normal behaviour restored after the repair.

>Is this bug ?

Name Server problems? Tried to access name server on the Net for Reverse ARPA 
maybe? 

Bart.

==============================================================================
Bart Kindt, System Supervisor, Efficient Software NZ LTD, Dunedin, New Zealand
Amateur Radio:  ZL4FOX / PA2FOX
==============================================================================

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

From: [email-masked] (Russell Leighton)
Subject: Oops: 0000 , then crash ...bug in scsi tape (st.c)?
Date: 10 Sep 1994 14:51:38 -0400

Under Linux 1.1.49 I can read from my  Exabyte 8200 and
write small files, but when I do a big tar I get:

Oops: 0000
EIP: 0010:001a9763
EFLAGS: 00010002

<some other stuff>

Aiee, killing interrupt handler
scsi: aborting command due to timeout: pid 3101, scsi0, id 3, lun 0 , Write (6) 01 00 00 1e 00
Kernel panic: Bad offset
In swapper task - not syncing

...now it just hangs...

What to do? I tried changing the buffer size and write threshold
in st.c, but that did not help. 

Any ideas? I will fix this if I can, but I have
little time right now ...but I need this tape,
I can only read stuff in now, I'd like to do backups...

Config:
        P90/PCI
        Exabyte 8200 (scsi 1)
        Linux 1.1.49
        Scsi control by ncr53c810

Thanks.

Russ

-- 
        Russell Leighton     
        Taylor Computing   
        [email-masked]  [email-masked] 
        http://taylor.digex.net  http://www.digex.net/~rrl/Welcome.html

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

From: [email-masked] (Jeremy Bettis)
Subject: Re: Survey: who wants f77,cc,c++,hpf for linux?
Date: 10 Sep 1994 19:07:09 GMT

[email-masked] (Henry Ware) writes:

>In article <[email-masked]>,
>Ray Hann <[email-masked]> wrote:
>>So it looks like the only compiler gap in the free software world is
>>FORTRAN.  I heard gf77 was about to enter beta and the only thing
>>it was really missing was 'EQUIVALENCE'.

>Err, you are discounting the gazillion lines of installed COBOL in the 
>US, some of it quite new.  I am unaware of even a COBOL to C translator...

I really doubt that anyone who is foolish to program in COBOL would want to
run a UNIX system anyway.  They are probably locked into their current
mainframe system with no easy to upgrade.
--
Jeremy Bettis   -*- PGP Public key available -*-   University of Nebraska
INET: [email-masked]               "Those who stand in the middle of the
UUCP: [email-masked],[email-masked]    road are often hit by passing cars."
Running Linux -- The Free Unix for i386/i486/Pentium machines. Ask me how.

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

Crossposted-To: comp.os.linux.misc
From: [email-masked] (Orest Zborowski)
Subject: Re: 320x200 X resolution?
Date: Sat, 10 Sep 1994 20:35:16 GMT

>       So.... 320x200 resolution anyone? :)
>I'll post if I figure out how to do it.

I have a laptop that I run in 640x480 using XF86_VGA16 and a small enough
font that I don't notice the cramped resolution. Works like a champ.

For running DOOM, I use the XF86_SVGA server and chipset "generic"
with a stock VGA 320x200 modes line:
"320x200"       25      320 344 376 400         200 204 206 225

You can simply run the server, without any clients, and start linuxxdoom
on a VT. Looks very nice!

-orest

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

From: [email-masked] (Jacques Gelinas)
Subject: Re: DOS BC++/Linux floats
Date: Sat, 10 Sep 94 03:50:08 GMT

[email-masked] (Riku Saikkonen) writes:

>I have made an application that I use in both MS-DOS and Linux. The
>thing works well enough, and I was able to port it from MS-DOS Borland
>C++ to Linux gcc pretty easily. But there's one problem...

..

>So I just need to get the file format to be the same. And there's my
>problem. Most of it was easy (after I figured out that int is 32-bit in
>Linux :)), but floats I can't seem to read. The BC++ float format and
>the Linux float format seem to be different.

float are not different from gcc and BC or Microsoft C since
is is controlled by the hardware. Those floats has to be
input/output in the Math-coprocessor. In fact the format
for Sparc, HP Pa-risc and Intel x86 family is the same: IEEE standard.

Where is the difference ? Packing. Most DOS compiler have
a switch to pack (no alignement) data in structure. I don't
think GCC has such a switch (not very useful indeed since it
will slow down the application because processing miss-aligned
data is expensive). But GCC has a trick for the architecture
that can support it (Intel for one). You can selectivly
control the alignement of data inside the structure declaration
like this.

        struct foo {
                char b;
                int a __attribute__ ((packed));
                float f __attribute__ ((packed));
        };

I use this by placing a define like this:

        struct foo {
                char b;
                int a GCC_PACKED;
                float f GCC_PACKED;
        };

And when compiling on DOS, I define GCC_PACKED to nothing.

Of course this will only work in Intel architecture (between
DOS and Linux for one). If you are using C++, it is very easy
to define a class acting like a portable float, portable int, etc...
Here is the definition of a CompatFloat I am using. This
one is for Big Endian architecture (Sparc, PA-RISC). For other
architecture, simply reverse the indexes.

class CompatFloat {

private:
        unsigned char buf[ 4];

public:

        CompatFloat( float i) {
                union {
                        volatile float f;
                        char  a[4];
                };
                f = i;
                buf[ 0] = a[3];
                buf[ 1] = a[2];
                buf[ 2] = a[1];
                buf[ 3] = a[0];
        }
        CompatFloat( void) {}
        operator float( void) {
                union {
                        volatile float f;
                        char  a[4];
                };
                a[0] = buf[3];
                a[1] = buf[2];
                a[2] = buf[1];
                a[3] = buf[0];
                return f;
        }
};

A float on Sparc is simply reversed (endianness). Using CompatInt
and family, you don't have to deal with alignment to create portable
structure. And of course, the CompatXXX classes can deal with
more complex variation. You still have to copy from the portable
structure to the internal one if processing speed in needed.

        struct foo {
                char b;
                CompatInt a;
                CompatFloat f;
        };

-- 

========================================================
Jacques Gelinas ([email-masked])
Maintainer of US4BINR [email-masked]

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

From: [email-masked] (Matthew S. Crocker)
Crossposted-To: comp.os.linux.help
Subject: Re: 3c509 Problems
Date: 10 Sep 1994 22:24:35 GMT

Danek Duvall ([email-masked]) wrote:

: I recently set up my 3Com Etherlink III Combo on my linux machine.
: The first boot after the network stuff was configured, it worked fine.
: In fact, it worked fine continuously for over a day.  Then, today, I
: was having some problems compiling and installing sendmail, I rebooted
: my machine.  At that point, I couldn't find anything on the network.
: I hadn't changed any relevant pieces of the network config files, so
: it couldn't have been that.  Then I checked /var/adm/messages, which
: had the line:

:   eth0: Missed interrupt, status then 2011 now 2011 Tx 00 Rx 383c

I get this every once and a while too (on my 486-66 VLB/ISA) I never
get it on my P5-90 PCI/ISA.  Do you get it when you do a hard boot?
try shutdown -h now then press teh reset button...  I only get it when
I shutdown -r now or 'reboot'

L8r,

-Matt/2

--
-Matthew S Crocker               "The mask, given time, comes
[email-masked]              to be the face itself."  -anonymous
*OS/2*OS/2*OS/2*OS/2*OS/2*OS/2*OS/2*OS/2*OS/2*OS/2*OS/2*OS/2*OS/2*OS/2*OS/2*
 *linux*linux*linux*linux*linux*linux*linux*linux*linux*linux*linux*linux*

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

From: [email-masked] (Uwe Bonnes)
Subject: Re: cat /proc/interrupts doesn't show printer ints.
Date: Sat, 10 Sep 1994 19:04:08 GMT

Bruce Evans ([email-masked]) wrote:

> There needs to be a counter per (driver, interrupt) pair.  Dynamically
> loaded drivers are especially interesting.  I'd like to preserve
> accumulated statistics across kernel reboots.  Write them to a log file
> or something.  Unloading drivers or unattaching their interrupts could
> be handled in the same way.
> -- 
If you are interested, here are my scripts for the present version:

in rc.halt
  # Save status
  cp -f /proc/stat /var/adm/stat.last
  echo "down `date +%s`" >>/var/adm/stat.last

in rc.start
  # boot time is critical, so do it later
  echo "Accumulate proc-status"
  ((sleep 30;  cd /var/adm;
        /sbin/stat.acc stat.last stat.all > stat.tmp;
        mv stat.tmp stat.all ;
        echo running > stat.last) > /dev/null 2>&1 )&

/sbin/stat.acc:
#!/usr/bin/awk -f 

BEGIN   {NCPU=4;
         for (x = 1; x <= NCPU; x++) cpu[x] =0;
         NDISK=4;
         for (x = 1; x <= NDISK; x++) disk[x] =0;
         NPAGE=2;
         for (x = 1; x <= NPAGE; x++) page[x] =0;
         NSWAP=2;
         for (x = 1; x <= NSWAP; x++) swap[x] =0;
         NINTR=17;
         for (x = 1; x <= NINTR; x++) intr[x] =0;
         context = 0;
         booted  = 0;
         since   = 0;
         crashes = 0;
         crash = 0;
         lastcrash =0;
         shutdown =0;
       }
{ if (/cpu/)
    { for (x = 1; x <= NCPU; x++) cpu[x] += $(x+1);}
  if (/disk/)
    { for (x = 1; x <= NDISK; x++) disk[x] += $(x+1);}
  if (/page/)
    { for (x = 1; x <= NPAGE; x++) page[x] += $(x+1);}
  if (/swap/)
    { for (x = 1; x <= NSWAP; x++) swap[x] += $(x+1);}
  if (/intr/)
    { for (x = 1; x <= NINTR; x++) intr[x] += $(x+1); }
  if (/ctxt/) {context += $2; }
  if (/boot/) {booted = $2; }
  if (/since/) {since = $2; }
  if (/^down/) {shutdown = $2;}
  if (/cras/) {crashes = $2; lastcrash = $3}
  if (/running/) {crash = 1}
}
END {
  printf "cpu  ";
  { for (x = 1; x <= NCPU; x++) printf "%ld ", cpu[x] ; }
  printf "\ndisk ";
  { for (x = 1; x <= NDISK; x++) printf "%ld ", disk[x] ; }
  printf "\npage ";
  { for (x = 1; x <= NPAGE; x++) printf "%ld ", page[x] ; }
  printf "\nswap ";
  { for (x = 1; x <= NSWAP; x++) printf "%ld ", swap[x] ; }
  printf "\nintr ";
  { for (x = 1; x <= NINTR; x++) printf "%ld ", intr[x] ; }
  printf "\nctxt %ld\n",context ;
  printf "since    %ld\n", since ;
  printf "shutdown %ld\n", shutdown;
  printf "boot %ld\n", booted +1;
  if (crash == 1) 
    printf "cras %ld %ld\n", crashes + 1, booted
  else
    printf "cras %ld %ld\n", crashes, lastcrash
}
-- 
Uwe Bonnes  [email-masked]

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

From: [email-masked] (William Henning)
Subject: Re: Alpha Linux
Date: Sat, 10 Sep 1994 15:27:27 GMT

In article <[email-masked]> [email-masked] (Peter Holzer) writes:
>Then you have to drop either the 16 bit or the 32 bit int type. Both
>options may make some people unhappy. The 32 bit int is a reasonable
>compromise. It also breaks all those programs which assume that a
>pointer and an int are just the same thing, which is a good thing IMHO.

How about

   short = 16 bits
   int   = 32 bits
   long  = 64 bits ?

Bill

-- 
----
  
[email-masked]   - Linux & OS/2 user at home, OS/2 developer at work

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

From: basile@rosser (Basile STARYNKEVITCH)
Subject: Re: News Spool File System - new filesystem type??
Date: 09 Sep 1994 14:30:55 GMT

I didn't follow this long thread from its beginning. However, i am
amazed that nobody mentionned the userfs file system which is designed
exactly for such tasks.

userfs (current version is 0.8 pl1) is available by ftp at tsx-11.mit.edu or 
sunsite.unc.edu:/pub/Linux/ALPHA/userfs. 

Here is the userfs.lsm

Begin2
Title        = Userfs - user process filesystem
Version      = 0.8
Desc1        = Userfs allows normal user processes to implement a Linux filesystem.
Desc2        = Such filesystems may be mounted by normal users and are indistinguishable
Desc3        = from conventional filesystems.  Because they are normal processes they
Desc4        = have access to all the normal system facilities, allowing them to have
Desc5        = properties that a kernel resident filesystem cannot.
Author       = Jeremy Fitzhardinge
AuthorEmail  = [email-masked]
Maintainer   = Jeremy Fitzhardinge
MaintEmail   = [email-masked]
Site1        = tsx-11.mit.edu
Path1        = pub/linux/ALPHA/userfs
File1        = userfs-0.8.tar.gz
FileSize1    = 180k
Site2        = sunsite.unc.edu
Path2        = pub/Linux/ALPHA/userfs
File2        = userfs-0.8.tar.gz
FileSize2    = 180k
Site3        =
Path3        =
File3        =
FileSize3    =
Site4        =
Path4        =
File4        =
FileSize4    =
Required1    = Linux 1.1.44 or above
Required2    = modutils package
Required3    =
Required4    =
CopyPolicy1  = FSF GPL Version 2
CopyPolicy2  =
Keywords     = filesystem, process, kernel module
Comment1     =
Comment2     =
Comment3     =
Comment4     =
RelFiles1    =
RelFiles2    =
RelFiles3    =
Entered      = 18 Aug 1994
 EnteredBy    = Jeremy Fitzhardinge
 CheckedEmail = [email-masked]
 End

The README file contains:
<<<<

Userfs  is a mechanism by which normal user processes can be
a Linux filesystem.  There are many uses for  this,  includ-
ing:
 
Prototype filesystems
 
     Prototype  new  block  allocation  algorithms in a user
     process and debug with gdb before going into  the  com-
     pile-crash-reboot cycle of kernel development.
 
Infrequent use filesystems
 
     You  want to mount "FooBaz 0X" filesystems under Linux,
     but you don't want it that often, and you don't need it
     to  be  maximum  speed.   Rather than trying to get the
     kernel  itself  to  understand,  or  write  specialised
     tools, write a filesystem program.
 
Add capabilities to existing filesystems
 
     Want  compression, encryption, ACLs?  Have a process to
     mirror an existing file tree, but with your own  exten-
     tions and semantics.
 
Completely virtual filesystems and new interfaces
 
     Add  a  filesystem-type interface to an existing mecha-
     nism, or a filesystem interface as a new way of  repre-
     senting data.  Sick of FTP?  How about
 
          $ mkdir /ftp/tsx-11.mit.edu
          $ cd /ftp/tsx-11.mit.edu/pub/Linux
          $ cp README $HOME
 
     Or mail?
>>>

I did test userfs and found it interesting. I'm not expert about News
Spooling but i believe it could do the job very well. 

-- 

Basile STARYNKEVITCH   ----  Commissariat a l Energie Atomique
DRN/DMT/SERMA * C.E. Saclay bat.470 * 91191 GIF/YVETTE CEDEX * France
fax: (33) 1- 69.08.23.81;    phone: (33) 1- 69.08.40.66
email: [email-masked];  homephone: (33) 1- 46.65.45.53

N.B. Any opinions expressed here are solely mine, and not of my organization.
N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.

Please cite a small part of my mail in all answers
Veuillez citer une petite partie de mon courrier dans vos reponses
--

Basile STARYNKEVITCH   ----  Commissariat a l Energie Atomique
DRN/DMT/SERMA * C.E. Saclay bat.470 * 91191 GIF/YVETTE CEDEX * France
fax: (33) 1- 69.08.23.81;    phone: (33) 1- 69.08.40.66
email: [email-masked];  homephone: (33) 1- 46.65.45.53

N.B. Any opinions expressed here are solely mine, and not of my organization.
N.B. Les opinions exprimees ici me sont personnelles et n engagent pas le CEA.

Please cite a small part of my mail in all answers
Veuillez citer une petite partie de mon courrier dans vos reponses

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

From: Ted Harding <[email-masked]>
Subject: -fPIC flag in gcc
Date: 10 Sep 1994 21:10:35 -0400
Reply-To: [email-masked]

Not sure where best to post this, but anywhere that compiler buffs abound
looks good ....

I'm using gcc version 2.5.8 on SlackWare Linux 1.2, and having a problem
compiling a big software package (sipp) which uses flag -fPIC (and probably
absolutely necessary for this package). This flag causes trouble. The
trouble is reproduced in miniature by the following little program.
Basically, it seems the compiler phase produces -fPIC code, but the
assembler phase won't accept it.

Try it with 'gcc junk.c' -> OK; then 'gcc -fPIC junk.c' -> lots of
invalid "[" and "@" characters (use 'gcc -fPIC -S junk.c' to view assembler).
Same effect with -fpic.

Can anyone say why, and suggest what should be done? 
=============================================================================
/* Program junk.c */
#include <stdio.h>
main()
{
static struct {float x,y; } Point, *Point_Ptr;
Point.x = 1.1; Point_Ptr = &Point; Point_Ptr->y = 2.2;
fprintf(stdout, "Point.x = %f, Point.y = %f\n",Point_Ptr->x,Point_Ptr->y);
}
============================================================================
Thanks for any help.
Ted.

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

From: [email-masked] (Ray Hann)
Crossposted-To: comp.lang.fortran
Subject: Re: Survey: who wants f77,cc,c++,hpf for linux?
Date: 9 Sep 1994 21:26:49 GMT

In article <[email-masked]> [email-masked] (Highlander) writes:
>In article <[email-masked]>, Dan Pop <[email-masked]> wrote:
>>In <[email-masked]> [email-masked] (Ray Hann) writes:
>>
>>>benchmarks by 3 fold.  But then again I have found on some of my own
>>>scientific codes that f2c+gcc produces code that actually executes faster
>>>than that of the Sun F77 compiler.
>>
>>Looks like you're comparing apples with oranges here, unless you were
>>using the Sun F77 compiler on the same PC, of course (Solaris is available
>>for PC hardware).
>
>Uh, it is possible to run f2c+gcc in place of f77 on platforms besides
>Linux, just not adviseable except for benchmarking purposes.  He could
>have compared the two on a Sun or SGI or RS/6000 or <your favorite
>workstation with C and FORTRAN compilers here>...
>

The comparison I was making was on a Sparc2 just for benchmarking purposes.
However, I do personally own a remanufactured Sparcstation with no
fortran compiler, so I use f2c+gcc on that machine when working with
my fortran codes.

I haven't priced the fortran compiler for Sparc. I just assumed it would
be a little to steep for the investment since most of my programming is
in C and Common Lisp.  GCC is a fine piece of work (so is Linux) for free
software and there really no need to purchase a commercial Common Lisp.
The GNU CL (formally AKCL) is excellent and CMU CL I've heard is even
better.

So it looks like the only compiler gap in the free software world is
FORTRAN.  I heard gf77 was about to enter beta and the only thing
it was really missing was 'EQUIVALENCE'.

Is this true?

Ray

-- 
=============================================================================
Ray Hann                        |     
NASA Lewis Research Center      |    
Cleveland, Ohio  44135          | email: [email-masked] 
=============================================================================
Deep Magic in Scheme
==>(set! x (eval '(define (set! a b) (sows_ear->silk_purse C++-program))))
=============================================================================

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

From: [email-masked] (Steve van Aardt)
Subject: i Enhanced IDE controller drivers 
Reply-To: uunet!csfb1!svaardt
Date: Sat, 10 Sep 1994 17:43:01 GMT

Has anyone developed an Enhanced IDE controller for LINUX ?

I'm intending to run Linux upon a Pentium 90 m/c - has anyone
found any difficulties with doing so ?

--
Steven van Aardt, 
CS First Boston, One Cabot Square, London. E14 4QJ
Tel: +44 (0) 71 516 2547

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

Crossposted-To: comp.os.linux.misc
From: [email-masked] (Christopher Wiles)
Subject: Re: 320x200 X resolution?
Date: Fri, 9 Sep 1994 02:43:39 GMT

[email-masked] (Sam Oscar Lantinga) writes:

:       Does such a thing exist?  

Good God, why?!?

: How would I go about finding the dot-clocks, etc for this resolution?
: Does XFree86 3.1 have it?  Where can I get it?

Well ... I suppose you could use the monitor config spreadsheet at 
sunsite (/pub/Linux/X11 is the closest I can point you ... sunsite is 
still down).  Plug in the rez and you'll get timings.

: P.S.  DOOM for X exists, and will hopefully be released soon.

Yeah ... fingering [email-masked] reveals the same message re: Linux 
port as it has for the last two months: "RSN!! RSN!!"

Seriously, IMHO Doom will probably be more useable in the promised 
pixel-doubling mode than in a straight 320x200.  Easier to make things 
look innocent when the boss walks in ... "Hey, you're not actually 
_working_ in 320x200, are you?"

-- Chris

[email-masked]   [email-masked]   [email-masked]
       "... but I want to use all eight comm ports SIMULTANEOUSLY!"
   PGP 2.6 public key available by finger for the clinically paranoid.

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

** 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: [email-masked]

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

    Internet: [email-masked]

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-Development Digest
******************************