Subject: Linux-Development Digest #6
From: Digestifier <Linux-Development-Request@senator-bedfellow.MIT.EDU>
To: Linux-Development@senator-bedfellow.MIT.EDU
Reply-To: Linux-Development@senator-bedfellow.MIT.EDU
Date:     Tue, 9 Aug 94 01:13:07 EDT

Linux-Development Digest #6, Volume #2            Tue, 9 Aug 94 01:13:07 EDT

Contents:
  Re: IFS (Inherited File System) (Byron Faber)
  Re: No Free Inode on 1GB harddisk!! (Stefan Nehlsen)
  CORRECTION: multi-threaded linux kernel (Bouwmeester L.)
  Re: Where should i386/string.h be?  And floppy code report. (Brandon S. Allbery)
  Re: memory segmentation problem (Rob Janssen)
  Re: lint for linux (Theodore Ts'o)
  Read Info docs thru WWW...Was: As; The GNU assembler docs {Q} (Robert Lipe)
  Re: Linux backup of MSDOS? (Tom Oehser)

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

From: btf57346@uxa.cso.uiuc.edu (Byron Faber)
Subject: Re: IFS (Inherited File System)
Date: 8 Aug 1994 22:40:59 GMT

almesber@nessie.cs.id.ethz.ch (Werner Almesberger) writes:

>In article <320i2j$rar@tadpole.fc.hp.com> laf@sde.hp.com writes:
>> Is anyone doing anything with IFS these days?

>Not quite, but I plan to do an (experimental) NFS-based IFS later this
>year. The kernel-based one has the problems of a) depending on too many
>other kernel internals and b) being a bit complex.

>Sorry that I don't have any better news at the moment.

>- Werner


For those that want some IFS-like qualities try the following on sunsite:

/pub/Linux/system/Misc/mount/amd.lsm
/pub/Linux/system/Misc/mount/amd.README
/pub/Linux/system/Misc/mount/amd920824upl67.tar.gz

Its an auto-mounter.  But will do some stuff like linking directory 
structures over each other.

Byron
-- 
`Playing this disk at loud volume may permanently damage your speakers or
other sound components.'                                -LFO
                b-faber@uiuc.edu & http://www.cen.uiuc.edu/~bf11620/

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

From: stefan@nehlsen.toppoint.de (Stefan Nehlsen)
Subject: Re: No Free Inode on 1GB harddisk!!
Date: Mon, 8 Aug 1994 20:44:30 GMT

In <4167@win.or.jp> g609296@win.or.jp (Barry Yip kam-wa) writes:

>We have a 1GB scsi harddisk used for storing a full newsfeed. After
>getting about one week of news, there is no more free inode space left
>and I think the only solution is to get another bigger one harddisk even
>we still have enough harddisk space. Is there any way to increase the
>available inodes in this situation. Also, will it be better if the ext2
>filesystem can have a bigger limit on the max. no. of inodes allocated.
>Any suggestion and comments welcome.


>Filesystem         1024-blocks  Used Available Capacity Mounted on
>/dev/hda1              17936    4799    12241     28%   /
>/dev/hda2              72960   24277    45035     35%   /home
>/dev/hda3             106400   72276    28804     72%   /usr
>/dev/sda             1030553  828638   150388     85%   /var

>Filesystem            Inodes   IUsed   IFree  %IUsed Mounted on
>/dev/hda1               4488     631    3857    14%  /
>/dev/hda2              18288     353   17935     2%  /home
>/dev/hda3              26624    5745   20879    22%  /usr
>/dev/sda              258048  257800     248   100%  /var

from mke2fs(8):

       -i bytes-per-inode
              Specify the bytes/inode ratio.  mke2fs  creates  an
              inode  for  every bytes-per-inode bytes of space on
              the disk.   This  value  defaults  to  4096  bytes.
              bytes-per-inode must be at least 1024.

If there only should be news on this filesysystem "-i 1024"
wouldn't be an error.

cu, Stefan
-- 
Stefan Nehlsen    nelli@toppoint.de    Kiel/Germany

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

From: leonb@tyr.research.ptt.nl (Bouwmeester L.)
Subject: CORRECTION: multi-threaded linux kernel
Date: Mon, 8 Aug 1994 08:06:29 GMT


Dear Linuxers,

Last week I posted an announcement about ongoing work w.r.t. threads on
kernel-level. Lots of people reminded of quite an error: the code that
is to be developed shall be distributed under the GNU PUBLIC LICENSE.
Therefore, it is available for both commercial and non-commercial use.
My apologies.

Also, accidently I called the kernel "Linux Viper, linux 2.0". It 
appeared that only Linus can increase the number of the kernel. Therefore,
the kernel is called "Viper 1.0"; it will, however, be compatible with
the current Linux-kernels. 

Hopefully, any errors are now cleared (so stop flaming me!). 

Please, watch the announcements for the first kernel release supporting
kernel threads. If really in need for information about ongoing status:
mail to the mail-exploder: marino@ds5000.irb.hr

Regards,
        Leon Bouwmeester.

PS. This message is posted in all linux newsgroups.




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

From: bsa@kf8nh.wariat.org (Brandon S. Allbery)
Subject: Re: Where should i386/string.h be?  And floppy code report.
Date: Mon, 8 Aug 1994 22:29:28 GMT

In article <325qtr$824@dunx1.ocs.drexel.edu>, FEARNLCJ@DUVM.OCS.DREXEL.EDU says:
+---------------
| /usr/include/i386 I have 3 files (from Slackware 1.1.2 days):
| -rw-r--r--   1 root     root         2632 Jan 11  1994 fpu_control.h
| -rw-r--r--   1 root     root          274 Jan 10  1994 jmp_buf.h
| -rw-r--r--   1 root     root         3571 Jan 10  1994 syscall.h
| Should /usr/src/linux/include/i386/string.h be moved to
| /usr/include/i386 or should /usr/include/i386 be made a symbolic link
+------------->8

/usr/include/i386 is now unusual in that both libc and linux expect to provide
it, and the linux-provided one expects to be symlinked into the kernel source
tree.  I suspect the kernel one should be renamed to /usr/include/linux/i386
to avoid this, but that's up to Linus.  (I tripped over it rebuilding the
iBCS2 emulator under 1.1.41.)

++Brandon
-- 
Brandon S. Allbery KF8NH         [44.70.4.88]             bsa@kf8nh.wariat.org
Linux development:  iBCS2, JNOS, MH

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

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: memory segmentation problem
Reply-To: pe1chl@rabo.nl
Date: Mon, 8 Aug 1994 22:04:47 GMT

In <325g9p$dqs@search01.news.aol.com> ehippo@aol.com (EHippo) writes:

>I have a program which works fine when compiled with Borland C++ but
>yields
>a segmentation fault when I run it under linux.

Hey, it was just about time for the "Hunt for bug in enclosed C program"
contest :-)


>-------- twodim.c --------------
>#include <stdio.h>
>#include <stdlib.h>
>#include <ctype.h>

>void *getmem(int);
>void fillMatrix(double **, int, int);
>void printMatrix(double **, int, int);

>main()
>{
>  int i, j, m, n;
>  double **matrix;
>  char ans, temp[5];
>    
>  printf("How many rows? ");
>  m = atoi(gets(temp));
>    
>  printf("How many columns? ");
>  n = atoi(gets(temp));
>    
>  matrix = (double **)getmem(m*sizeof(double *));
>  
>  for (i=0; i<m; i++)
>    matrix[i] = (double *)getmem(n*sizeof(double *));
                                           ^^^^^^^^
                                           you don't want to store pointers
                                           to doubles, you want to store
                                           doubles!!  use sizeof(double)

>The program compiles correctly, and runs "as is" on another system, so I
>thought I'd ask here.  I hope this is the right newsgroup.

It just shows that Linux is much better for finding bugs in your program
than that other system is :-)

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

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

From: tytso@ATHENA.MIT.EDU (Theodore Ts'o)
Subject: Re: lint for linux
Date: 8 Aug 1994 21:57:10 -0400
Reply-To: tytso@ATHENA.MIT.EDU (Theodore Ts'o)

   From: D.G.Jones@scuna.dircon.co.uk (Derek Jones)
   Date: 1 Aug 1994 02:50:40 -0400

   I have responded privately to some of the people who have
   said "gcc does everything" over the last few months
   but now feel it's time for the list.

   gcc -Wall -pedantic does *not* catch some of the (even
   more trivial) errors that a decent lint will catch. *Esp.*
   if those errors are *calling problems between* source files.

Well, it will *if* you use "-Wstrict-prototypes -Wmissing-prototypes",
which will point out whenever you use a function without giving a full
ANSI C prototype first --- and then putting full ANSI C prototypes in
your header files.  In the end, this will result in much cleaner code,
so you should doing this anyway.  But with the full ANSI C protoypes, it
will catch the call problems between source files quite nicely, thank
you.

                                                - Ted

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

From: robertl@arnet.com (Robert Lipe)
Subject: Read Info docs thru WWW...Was: As; The GNU assembler docs {Q}
Date: Mon, 8 Aug 1994 22:05:50 GMT

hta@uninett.no (Harald T. Alvestrand) writes:

>The "info" program takes an "-f file" parameter.
>It's (well) hidden in the "info" file on "info", which IS accessible
>from its startup page.
 
[ mandatory whining ] 

While hopefully avoiding flamage from emacs-heads, the info interface
makes my head hurt.  Arguments for/against Emacs not welcome, because
if you're happy with the editor you have, learning enough Emacs to
successfully navigate around info sure seems like an expensive startup.

[ end whining, start solution ] 

I have written a set of tools (if I had to do it over again, it'd be
in Perl) that traverses a GNU tree (mine's optimized for the Cygnus
progressive release) and generates a set of HTML documents.  

This means I can use Mosaic (or Lynx or whatever) to read the GNU
docs.  This is more my speed.

My defaults bust the docs up into little chunks, becuase I sometimes 
work across a modem.  It's a one line change if you don't like this.

I'd not particularly planned these scripts for public release (i.e.
no docs, few comments, etc.) but I've attached them for anyone that wants
them.  They're suited to my personal usage patterns and configurations.
Anyone wishing to "adopt" the scripts is welcome to contact me.

Wish I could say it's an original idea.  It's not.   Look at 
http://www.cygnus.com for the site that gave me the idea.  I just
automated what Cygnus has done.  (Yes, I've already given Cygnus
this same set of tools....)

If there is sufficient interest, I will even make the HTML versions
of the Cygnus Q2 progressive tree available.  Then all you have to
do is point your Mosaic to this directory.  

You will also need to find:

http://asis01.cern.ch/infohtml/texi2html.html"

Patches, fixes, enhancements welcom.  Whining, editor religion not. :-)

It's cool.  I like it a lot.  Maybe I have low standards.  
---
Robert Lipe    Sr. Software Engr.   Arnet Corp.     robertl@arnet.com


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#       class-name.map
#       file-class.map
#       mkhtml
#
echo x - class-name.map
sed 's/^X//' >class-name.map << 'END-of-class-name.map'
X10|Frequently Used Utilities
X20|Lesser Used Utilities
X30|Legal statements, licenses
X40|Internals
X50|Information about "other" systems.
END-of-class-name.map
echo x - file-class.map
sed 's/^X//' >file-class.map << 'END-of-file-class.map'
Xas.texinfo|GNU Assembler|10
Xbfd.texinfo|Binary File Descriptor Libraries|40
Xbinutils.texi|Binary tools (ar, nm, ...)|10
Xbyacc.texi|tree parser generator|20
Xcfg-paper.texi|Configuring, Building GNU Tools|40
Xconfigure.texi|Cygnus configuration and installation|40
Xcpp.texi|C Preprocessor|10
Xdejagnu.texi|Regression Testing Suite|20
Xdiff.texi|Diff utilities|10
Xflex.texinfo|GNU Lexical analyzer|20
Xgasp.texi|GAS Preprocessor|10
Xgcc.texi|GNU C, C++ Compiler|10
Xgdb.texinfo|GNU Source code debugger|10
Xannotate.texinfo| GDB annotations |10
Xgdbint.texinfo|GNU Source code debugger|10
Xgperf.texi|GNU Hash Function Generator|20
Xgprof.texi|GNU Code Profiler|10
Xgxxint.texi|GNU C++ Compiler Internals|40
Xhist.texinfo|GNU History Library|40
Xidt-mips.texi|Information about Cygnus chain on IDT|10
Xinfoman.texi|GNU Info texinfo looker upper|20
Xdos-inst.texi|Installing GNU chain on DOS|40
Xintro.texi|Intro to Cygnus|40
Xiostream.texi|GNU Library for C++ istreams and C stdio|20
Xld.texinfo|GNU Linker|10
Xldint.texinfo|GNU Linker Internals|40
Xlibc.texinfo|GNU Standard C Library|10
Xlibg++.texi|User's Guide to GNU C++ Class Library|20
Xlibgdb.texinfo|Library interface to GNU symbolic debugger|40
Xliblic.texi|GNU Library General Public License|30
Xlicense.texi|GNU General Public License|30
Xlibm.texinfo|ANSI-C conforming math library|20
Xlynx.texinfo|Notes about LYNX-OS|50
Xmake.texinfo|GNU program for directing recompilation|10
Xmakeinfo.texi|Making info files from texinfo files|20
Xmmalloc.texi|GNU mapped-malloc package|20
Xpin.texi|Netware Cross stuff|50
Xrelnotes.texi|Release Notes|10
Xreno.texi|GNU C++ renovation Project, Phase 1|40
Xrlman.texinfo|GNU Readline Program|20
Xsend-pr.texi|Cygnus send problem report utility|20
Xsparclite.texi|Embedded Sparc notes|50
Xsrctree.texi|Notes on building various GNU Sources|40
Xstabs.texinfo|"stabs" debugging informatino format|40
Xstandards.texi|GNU Coding Standards|40
Xtexinfo2.texi|Documentation format fro GNU project|20
END-of-file-class.map
echo x - mkhtml
sed 's/^X//' >mkhtml << 'END-of-mkhtml'
X:
X
X#
X# This shoulda been done in perl.. This is gross.
X#
X# Version history.  
X# 1.0 08/08/94.  Shot my mouth off.  Gotta start version #'s :-(
X#
X
Xrm -f /tmp/$$.1 /tmp/$$.2 /tmp/$$.3
X
Xtrap "rm -f /tmp/$$.1 /tmp/$$.2 /tmp/$$.3 " 0
X
XCYGNUS_DIR=/usr/cygnus/progressive-94q2
XHTML_DIR=$CYGNUS_DIR/html
XSRC_DIR=$CYGNUS_DIR/src
X
XFILE_CLASS=/usr/cygnus/local/file-class.map
XCLASS_NAME=/usr/cygnus/local/class-name.map
XOFILE=${HTML_DIR}/index.html
X
X
X#
X# The header
X#
X
Xprologue() {
X       cat > $OFILE << !
X<TITLE>Home Pages for the Cygnus/GNU docs</TITLE>
X<H1><IMG SRC="icons/Cyglogo-small.gif">Cygnus/GNU Docs</H1>
X
XHypertext-ish versions of the FSF documentation.<P>
X
XInitial versions of this are, of course, lame.  You are
Xinvited to provide input to <EM>robertl@arnet.com</EM><P>
X
XThis index is automatically generated.  Modifying it by by hand
Xis an exceedingly poor idea.<P>
X
XThe script that creates these things is a glorified wrapper
Xfor <A HREF="http://asis01.cern.ch/infohtml/texi2html.html">
Xtexi2html</A><P>
X
X!
X
Xecho Generated on `date` >> $OFILE
X}
X
X
X#
X# Called for new categories
X#
X# <HR>appears to be underline.
X# <H1>Header, level 1.
Xnew_line() {
X       echo "<HR><H1>${1}</H1>\n<HR>" >> $OFILE
X}
X#
X# <LI> bulleted list items.
X# <UL> indent from left.
X# <P>  Force paragraph break.
X#
Xnorm_line() {
X       fname=`echo $1|sed "s/\.texinfo//" | sed "s/\.texi//"`
X       echo "<UL><LI> <A HREF="cygnus/${fname}/${fname}_toc.html">${fname}</A>." >> $OFILE
X       echo "$2.</UL><P>" >> $OFILE
X}
X
Xbuild_file_list() {
X  if [ -f /tmp/file_list ] 
X  then
X       file_list=`cat /tmp/file_list`;
X  else
X        find $SRC_DIR -name *.texi -print  > /tmp/file_list
X        find $SRC_DIR -name *.texinfo -print  >> /tmp/file_list
X       file_list=`cat /tmp/file_list` ;
X  fi
X}
X
X
X
Xargv0=$0
Xmkdir ${HTML_DIR} 2> /dev/null
X
Xbuild_file_list
X
Xfor i in $file_list
Xdo
X#break;
X       read junk < $i
X       set -- $junk
X       #
X       # I think that the "real" files of interest always have
X       # the first word as "input".  Others are effectively
X       # files that are included in the ones that start with
X       # "input"
X       #
X       case $1 in 
X               input)
X                       BASENAME=`basename $i`
X                       VBASENAME=`echo $BASENAME|sed "s/\.texinfo//" | sed "s/\.texi//"`
X                       echo $BASENAME >> /tmp/$$.1 
X                       mkdir ${HTML_DIR}/${VBASENAME} 2> /dev/null
X                       cd ${HTML_DIR}/${VBASENAME}
X#                      if [ "$argv0" != "./x" ] 
X                       if [ ! -f .built.html ] 
X                       then
X                         /usr/cygnus/local/texi2html -split_node $i 2>&1 | tee -a ${HTML_DIR}/log
X#                        /usr/cygnus/local/texi2html -split_chapter $i 2>&1 | tee ${HTML_DIR}/log
X                               touch .built.html
X                       fi
X                       ;;
X#              *)
X#                      echo "Ignoring (presumably support file) $i"
X#                      ;;
X       esac
Xdone 
X
Xfor i in `cat /tmp/$$.1`
Xdo
X
X       IFS="|
X"
X#break;
X       # Make safe_i dodge things that could be bad RE's
X       safe_i=`echo $i | sed 's/\+\+/\\\+\\\+/'`
X       set -- `egrep "^$safe_i" $FILE_CLASS  `
X       if  [ "$1" = "" ] 
X       then
X               echo $i not found in database $FILE_CLASS  Aborting.
X               exit 1
X       fi
X       if [ $2 = "" ] 
X       then
X               echo Bad description for $i in $FILE_CLASS  Aborting.
X       fi
X       echo $3\|$1\|$2 >> /tmp/$$.2
Xdone 
X
Xsort /tmp/$$.2 > /tmp/$$.3
X
X# OK.  Now we're working with a file that looks 
X# like this:
X# 10 as.texinfo Gnu Assembler
X# 10 binutils.texi Binary tools
X# 20 byacc.texi Bison ....
X
Xprologue
X#newloop="10"  # *BOGUS*, used to "prime" the pump
Xwhile :
Xdo
X       IFS="|
X"
X       read newval fname desc
X       if [ "$newval" = "" ] 
X       then
X               break;
X       fi
X
X       #
X       # See if we need to emit a new boundary.
X       #
X       if [ "$newloop" != "$newval" ] 
X       then
X               set -- `grep "^$newval" $CLASS_NAME`
X               #echo Newline $2  $newloop $newval
X               new_line $2
X       fi
X
X       norm_line $fname $desc 
X
X       newloop=$newval
Xdone < /tmp/$$.3
X#done < /tmp/5680.3
END-of-mkhtml
exit


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

From: toehser@cais2.cais.com (Tom Oehser)
Subject: Re: Linux backup of MSDOS?
Date: 9 Aug 1994 00:55:25 GMT

Look, this is the wrong group for this anyway, but everyone seems to want 
to answer a different question than the one I asked.  What I am *now* doing:
gzip --fast < /dev/hda > /dev/nrmt0
gzip --fast < /dev/hdb > /dev/nrmt0

>Well, If the data fits do not compress it.  That is the fastest.

It does NOT fit.  Data=540mb.  Tape=525mb.

>Also be warned, that compresion can not skip over tape errors.
>But a raw tar or cpio with out compression can skip over a file.

There are no "files" to skip since the *intention* is to have a backup 
which *includes* the bootsectors, partition tables, and all operating 
systems.  I *am* doing incremental filesystem backups with tar.

>> but which will still fit 540 on 525?
>
>"cat"
>
>Note: You will not be filling the disk, so it will all
>fit.  Remember 5% of the space is reserved for the super-user,

*NO* I *AM* trying to backup up *THE WHOLE D..M DISK*.  The *idea* is 
that if the disk gets *totally* trashed, I don't have to mess around with 
fdisk, boot/root floppies, reformatting, reinstalling OS2, et-cet-er-a!  
I can 1) restore from binary image 2) catch up filesystems with tar.

I *know* about tar AND cpio.  And I use them.  What I *want* is either:

a) A program which will automatically restore all partition tables, 
   formats, filesystems, operating systems, boot sectors, and control
   areas, without messing around in fdisk, format, et-cet-er-a.

b) What I *really* was asking about (really), a program that will 
   compress JUST A BIT.  gzip, even with --fast, squashes 540 down to
   about 300, using *lots* of cpu, and making the backup take longer
   than I want.  I had mentioned in passing that it would be nice to have 
   a program that would do simpler compression, maybe based on something 
   as basic as repeating strings of spaces and zeroes, not fancy LZW tables.

Anyway, thanks for all the careful replies.  PLEASE reply by EMAIL.  -Tom

 

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


** 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-Development-Request@NEWS-DIGESTS.MIT.EDU

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

    Internet: Linux-Development@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-Development Digest
******************************
