Re: IRQ 255?

owner-linux-kernel-digest-outgoing@vger.rutgers.edu
Wed, 28 Jan 98 19:58:29 -0700


***** UNDELIVERABLE MAIL sent to andy, being returned by maxwell!andy *****
mail: Error # 8 'Invalid recipient' encountered on system maxwell

Received: from [134.53.193.9] by maxwell.la.asu.edu via SMTP (920330.SGI/920502.SGI)
for andy id AA00272; Wed, 28 Jan 98 19:58:19 -0700
Received: from entropy.muc.muohio.edu (root@entropy.muc.muohio.edu [134.53.193.10]) by mnemonic.muc.muohio.edu (8.7.5/8.7.3) with ESMTP id QAA02858 for <andy@maxwell.la.asu.edu>; Wed, 28 Jan 1998 16:25:25 -0500
Received: from vger.rutgers.edu (root@vger.rutgers.edu [128.6.190.2])
by entropy.muc.muohio.edu (8.8.7/8.8.7) with ESMTP id OAA12163;
Wed, 28 Jan 1998 14:41:14 -0500
Received: by vger.rutgers.edu id <971230-232>; Wed, 28 Jan 1998 14:18:29 -0500
From: owner-linux-kernel-digest@vger.rutgers.edu
To: linux-kernel-digest@vger.rutgers.edu
Subject: linux-kernel-digest V1 #1538
Reply-To: linux-kernel@vger.rutgers.edu
Errors-To: owner-linux-kernel-digest@vger.rutgers.edu
Precedence: bulk
Message-Id: <19980128193854Z971230-232+927@vger.rutgers.edu>
Date: Wed, 28 Jan 1998 14:18:29 -0500

linux-kernel-digest Wednesday, 28 January 1998 Volume 01 : Number 1538

In this issue:

Re: 2.1.82 & reproducible strange name module loading requests
Re: Packet Scheduling
Re: NTFS umask option problem
Re: warnings while compiling 2.1.81
2.0.33 Hang up
Re: NTFS umask option problem
Re: Fix for strange name module loading requests
Re: 2.1.82 boot failure
Re: Request for help with cdrecord and HP7100
Re: Packet Scheduling
Re: IRQ 255?
Re: MTRR patches ??
Re: ide-cd as a modules not working in the latest kernels?
2.1.82: still freezing
Re: 2.1.xx and sound problems
Re: SuperMicro P5MMA98 motherboard
Re: lockup with 2.1.81 -- ide problem?
Re: OFFTOPIC: GGI and alternative GUIs and windowing systems in Linux
Re: NTFS umask option problem
SUMMARY: pcmcia-cs-2.9.12 +glibc
Re: Patch: 2.1.81: Index Configure.help(using mmap and C)
Re: iso9660 level 3 / rsj support
Re: Patch: 2.1.81: Index Configure.help(using mmap and C)
Re: Question: "File table overflow" (Linux 2.0.33pre6)
Suspend broken on a thinkpad
Re: warnings while compiling 2.1.81
Re: Packet Scheduling
2.1.82 Kernel Lockup at boot
Aiee with Linux 2.0.33
Re: More parallelism in makefile
Re: More parallelism in makefile
Re: System Time Growing Off
Re: Suspend broken on a thinkpad
Weird modules requests showing up in the logs
Re: 2.1.xx and sound problems
token ring driver lacks byte counts
Re: 2.1.82 boot failure
Re: System Time Growing Off
POSIX Signals
Re: OFFTOPIC: GGI and alternative GUIs and windowing systems in Linux -LONG
Patch: 2.1.82 Sound modules problem
Patch: 2.1.82 Configure.help speedup

See the end of the digest for information on subscribing to the linux-kernel
or linux-kernel-digest mailing lists.

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

From: Shaw Carruthers <shaw@shawc.demon.co.uk>
Date: Wed, 28 Jan 1998 12:58:22 +0000 (GMT)
Subject: Re: 2.1.82 & reproducible strange name module loading requests

I did some debugging on this problem by hacking request_module to trigger
an oops when the problem occurred and got:

Jan 27 18:57:30 shawc kernel: Oops: 0002
Jan 27 18:57:30 shawc kernel: CPU: 0
Jan 27 18:57:30 shawc kernel: EIP: 0010:[<c14adf62>]
Jan 27 18:57:30 shawc kernel: EFLAGS: 00010203
Jan 27 18:57:30 shawc kernel: eax: 00000001 ebx: c014b102 ecx: c1a88fe0 edx: 00000000
Jan 27 18:57:30 shawc kernel: esi: bffff118 edi: c14adf3c ebp: 00005401 esp: c14adf20
Jan 27 18:57:30 shawc kernel: ds: 0018 es: 0018 ss: 0018
Jan 27 18:57:30 shawc kernel: Process rsmtp (pid: 215, process nr: 29, stackpage=c14ad000)
Jan 27 18:57:30 shawc kernel: Stack: 00000018 c014c21b c14adf3c bffff0f8 00005401 bffff0f8 00005401 bffffb24
Jan 27 18:57:30 shawc kernel: bffff2b8 bffff114 00000000 0808f289 4009ef40 00000062 40074cc0 c016649e
Jan 27 18:57:30 shawc kernel: 00005401 bffff0f8 00005401 00005401 bffff0f8 c14e0700 00000000 c15168e0
Jan 27 18:57:30 shawc kernel: Call Trace: [<c014c21b>] [<c016649e>] [<c0144619>] [<c012b4fe>] [<c010995a>]
Jan 27 18:57:30 shawc kernel: Code: 00 00 f8 f0 ff bf 01 54 00 00 01 54 00 00 f8 f0 ff bf 00 07

Using `/usr/src/linux/System.map' to map addresses to symbols.

>>EIP: c14adf62 cannot be resolved
Trace: c014c21b <dev_ioctl+11f/3ac>
Trace: c016649e <inet_ioctl+3f2/434>
Trace: c0144619 <sock_ioctl+21/28>
Trace: c012b4fe <sys_ioctl+112/128>
Trace: c010995a <system_call+3a/40>
Code:
Code: 00 00 addb %al,(%eax)
Code: f8 clc
Code: f0 ff lock (bad)
Code: bf 01 54 00 00 movl $0x5401,%edi
Code: 01 54 00 00 addl %edx,0x0(%eax,%eax,1)
Code: f8 clc
Code: f0 ff lock (bad)
Code: bf 00 07 00 90 movl $0x90000700,%edi
Code: 90 nop
Code: 90 nop

But I am none the wiser has to how control got there or what corrupted the
address.

- --
Shaw Carruthers - shaw@shawc.demon.co.uk
London SW14 7JW UK
This is not a sig( with homage to Magritte).

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

From: Josip Gracin <grac@fly.cc.fer.hr>
Date: Wed, 28 Jan 1998 11:23:53 +0100
Subject: Re: Packet Scheduling

Kevin Lentin writes:
> > Unless, of course, the other side is Linux too, which happens more and
> > more often to me. ;)
>
> Not here. I'm talking to a terminal server.

A usual situation for me is to have a telnet and ftp session to the SAME
site (strange, ha?). If that site performs scheduling, then the terminal
server doesn't matter.

IMHO, packet scheduling is great at what it does and it was never planned
to solve the problem of "other hosts not scheduling". So, I don't take
that as inability of the linux packet scheduler.

- --
| Josip Gracin, student at Faculty of EE and CS in Zagreb, Croatia
| mailto:grac@fly.cc.fer.hr, http://fly.cc.fer.hr/~grac

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

From: "Martin v. Loewis" <loewis@informatik.hu-berlin.de>
Date: Wed, 28 Jan 1998 14:10:36 +0100
Subject: Re: NTFS umask option problem

Hi Dave,

Sorry, but I fail to see the problem. From mount(8)

Set the umask (the bitmask of the permissions that
are not present). The default is the umask of the
current process. The value is given in octal.

The umask of the current process is not considered, but I believe it
is not for any other file system supporting the umask mount option.

> [root@gatsby davew]# mount -t ntfs -o umask=0444 /dev/hda1 /mnt/nt
> [root@gatsby davew]# ls -l /mnt/nt
> total 20
> d--x--x--x 1 root root 4096 Mar 9 1997 Program Files
> d--x--x--x 1 root root 20480 Dec 15 21:13 archive
> ---------- 1 root root 0 Nov 14 1996 autoexec.bat

So you request that the read bits (4) are not present. And alas, there
are no read bits set.

> [root@gatsby davew]# umount /mnt/nt
> [root@gatsby davew]# mount -t ntfs -o umask=0222 /dev/hda1 /mnt/nt
> [root@gatsby davew]# ls -l /mnt/nt
> total 16
> dr-xr-xr-x 1 root root 4096 Mar 9 1997 Program Files
> dr-xr-xr-x 1 root root 20480 Dec 15 21:13 archive
> -r--r--r-- 1 root root 0 Nov 14 1996 autoexec.bat
> -r--r--r-- 1 root root 278 Nov 18 11:52 boot.ini

Here, you request that the write bits are not set. And see, there are
no write bits anywhere.

The confusing thing may be that there will be *never* write bits,
unless you enabled the experimental write support (and run a version
of the driver that will set the write bits in this case).

If this is not an answer to your question, please rephrase it.

Martin

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

From: Bryn Paul Arnold Jones <bpaj@gytha.demon.co.uk>
Date: Wed, 28 Jan 1998 13:32:14 +0000 (GMT)
Subject: Re: warnings while compiling 2.1.81

On Wed, 28 Jan 1998, Michael Elizabeth Chastain wrote:

> Thomas Molina writes:
> > ppp.c:3181: warning: `ppp_register_compressor' defined but not used
> > ppp.c:3208: warning: `ppp_unregister_compressor' defined but not used
>
> I have a patch for this:
>
> <ftp://ftp.shout.net/pub/users/mec/patch/ppp-warning.2182>
>
> It turns out that ppp_register_compressor and ppp_unregister_compressor
> are used only when CONFIG_MODULES is defined, so I slapped a
> #ifdef CONFIG_MODULES around their definitions.
>

Erm, bsd_comp, and ppp_deflate are always built as modules, because of
pattent issues in bsd_comp's case, and I assume that ppp_deflate is just
followning bsd_comp's lead ;). Basically if you slap a #ifdef
CONFIG_MODULES arround them, you can't use compressors when ppp is
builtin. I think this is a case where the only option is to live with
the warning, or make gcc think that something uses them.

> Thomas, this is the same patch you tested. It works for me too.
> So if no one else has a problem with it, I'll send it to Linus in
> about 24 hours.
>
> Michael Chastain
> <mailto:mec@shout.net>
> "love without fear"
>

Bryn
- --
PGP Pub key http://www.gytha.demon.co.uk/pubkey.asc ID: 1024/30AF2D69
On-line, adj.: FP: FC 4E 41 9E 64 C3 AB 28 A3 5A 57 F8 CC D9 A7 B8
The idea that a human being should always be accessible to a computer.

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

From: Ondrej Filip <feela@ipex.cz>
Date: Wed, 28 Jan 1998 14:41:41 +0100 (MET)
Subject: 2.0.33 Hang up

Hello famous developers,
I have problems with my 2.0.33 linux server. Today it stopped working.
Last words saved in /var/log/messages:

Jan 28 14:01:51 zuzana kernel: general protection: 0000
Jan 28 14:01:51 zuzana kernel: CPU: 0
Jan 28 14:01:51 zuzana kernel: EIP: 0010:[tcp_good_socknum+168/504]
Jan 28 14:01:51 zuzana kernel: EFLAGS: 00010206
Jan 28 14:01:51 zuzana kernel: eax: 00000025 ebx: 00000020 ecx: 4020a028 edx: 0000584f
Jan 28 14:01:51 zuzana kernel: esi: 00007fff edi: 0000003f ebp: 00000000 esp: 00cb9ea8
Jan 28 14:01:51 zuzana kernel: ds: 0018 es: 0018 fs: 002b gs: 002b ss: 0018
Jan 28 14:01:51 zuzana kernel: Process squid (pid: 922, process nr: 26, stackpage=00cb9000)
Jan 28 14:01:51 zuzana kernel: Stack: 03d9dc0c 0364cc90 08d5c350 00000010 00000000 0000003f 00000060 00150c96
Jan 28 14:01:51 zuzana kernel: 03d9dc0c 001514c8 03d9dc0c 0364cc00 0364cc90 08d5c350 00000010 001375a4
Jan 28 14:01:51 zuzana kernel: 0364cc90 00cb9f0c 00000010 00000802 bffff7b0 00000002 00000038 bffff7e8
Jan 28 14:01:51 zuzana kernel: Call Trace: [inet_autobind+30/156] [inet_connect+172/476] [sys_connect+260/292] [tcp_setsockopt+74/148] [inet_setsockopt+72/92] [sys_setsockopt+106/128] [sys_socketcall+298/732]
Jan 28 14:01:51 zuzana kernel: [system_call+85/124]
Jan 28 14:01:51 zuzana kernel: Code: 8b 49 6c 40 39 f0 7d 18 85 c9 75 f4 89 dd 83 e5 3f 89 c6 83
Jan 28 14:01:51 zuzana kernel: Aiee, killing interrupt handler
Jan 28 14:01:54 zuzana kernel: general protection: 0000
Jan 28 14:01:54 zuzana kernel: CPU: 0
Jan 28 14:01:54 zuzana kernel: EIP: 0010:[timer_bh+322/820]
Jan 28 14:01:54 zuzana kernel: EFLAGS: 00010086
Jan 28 14:01:54 zuzana kernel: eax: 001abe08 ebx: d8eb2f7d ecx: d8eb2f7d edx: 00000029
Jan 28 14:01:54 zuzana kernel: esi: 001ac06c edi: 00000001 ebp: 024f5fa0 esp: 024f5f8c
Jan 28 14:01:54 zuzana kernel: ds: 0018 es: 0018 fs: 002b gs: 002b ss: 0018
Jan 28 14:01:54 zuzana kernel: Process httpd (pid: 22588, process nr: 68, stackpage=024f5000)
Jan 28 14:01:54 zuzana kernel: Stack: 00000001 ffffffff 00000001 00000001 04a30c00 001c910c 00117beb 024f5fbc
Jan 28 14:01:54 zuzana kernel: 16d3064b 00000006 bffff3f8 0010a53f e92cf9bb 080ba8ec 080ba884 16d3064b
Jan 28 14:01:54 zuzana kernel: 00000006 bffff3f8 ffffffff 0000002b 0000002b 0000002b 0000002b fffffffe
Jan 28 14:01:54 zuzana kernel: Call Trace: [do_bottom_half+59/96] [handle_bottom_half+11/24]
Jan 28 14:01:54 zuzana kernel: Code: 8b 1b 8b 41 08 89 c2 2b 55 fc 81 fa ff 00 00 00 77 08 0f b6
Jan 28 14:01:54 zuzana kernel: Aiee, killing interrupt handler
Jan 28 14:02:02 zuzana squid[25430]: Starting Squid Cache version 1.NOVM.18 for i586-pc-linux-gnu...
Jan 28 14:02:02 zuzana kernel: general protection: 0000
Jan 28 14:02:02 zuzana kernel: CPU: 0
Jan 28 14:02:02 zuzana kernel: EIP: 0010:[tcp_good_socknum+168/504]
Jan 28 14:02:02 zuzana kernel: EFLAGS: 00010202
Jan 28 14:02:02 zuzana kernel: eax: 00000020 ebx: 00000020 ecx: 7d247d29 edx: 0000584f
Jan 28 14:02:02 zuzana kernel: esi: 00007fff edi: 0000003f ebp: 00000000 esp: 01f05ec0
Jan 28 14:02:02 zuzana kernel: ds: 0018 es: 0018 fs: 002b gs: 002b ss: 0018
Jan 28 14:02:02 zuzana kernel: Process squid (pid: 25430, process nr: 26, stackpage=01f05000)
Jan 28 14:02:02 zuzana kernel: Stack: 03d9dc0c 00000000 01f05f0c 00000010 00000000 0000003f 00000060 001512be
Jan 28 14:02:02 zuzana kernel: 03e4d100 01f05f0c 03e4d190 00137225 03e4d190 01f05f0c 00000010 bffffd10
Jan 28 14:02:02 zuzana kernel: 00000001 08100000 bffffd48 00000002 0100007f 00000000 00000000 00000246
Jan 28 14:02:02 zuzana kernel: Call Trace: [inet_bind+98/448] [sys_bind+157/192] [sk_alloc+16/48] [inet_create+0/884] [get_fd+22/124] [inet_create+0/884] [sys_socket+261/324]
Jan 28 14:02:02 zuzana kernel: [inet_create+0/884] [schedule+21/652] [sys_socketcall+274/732] [system_call+85/124]
Jan 28 14:02:02 zuzana kernel: Code: 8b 49 6c 40 39 f0 7d 18 85 c9 75 f4 89 dd 83 e5 3f 89 c6 83
Jan 28 14:02:02 zuzana kernel: Aiee, killing interrupt handler
Jan 28 14:02:09 zuzana kernel: general protection: 0000
Jan 28 14:02:09 zuzana kernel: CPU: 0
Jan 28 14:02:09 zuzana kernel: EIP: 0010:[timer_bh+322/820]
Jan 28 14:02:09 zuzana kernel: EFLAGS: 00010006
Jan 28 14:02:09 zuzana kernel: eax: 001abd94 ebx: 478a227d ecx: 478a227d edx: 0000000c
Jan 28 14:02:09 zuzana kernel: esi: 001ac06c edi: 00000001 ebp: 04664fa0 esp: 04664f8c
Jan 28 14:02:09 zuzana kernel: ds: 0018 es: 0018 fs: 002b gs: 002b ss: 0018
Jan 28 14:02:09 zuzana kernel: Process mysqld (pid: 25438, process nr: 27, stackpage=04664000)
Jan 28 14:02:09 zuzana kernel: Stack: 00000001 ffffffff 00000005 00000001 04a31200 001c910c 00117beb 04664fbc
Jan 28 14:02:09 zuzana kernel: 00000001 00000081 bf7ff0a4 0010a53f 00000000 00000001 080c9930 00000001
Jan 28 14:02:09 zuzana kernel: 00000081 bf7ff0a4 fffffffe 0000002b 0000002b 0000002b 0000002b fffffffe
Jan 28 14:02:09 zuzana kernel: Call Trace: [do_bottom_half+59/96] [handle_bottom_half+11/24]
Jan 28 14:02:09 zuzana kernel: Code: 8b 1b 8b 41 08 89 c2 2b 55 fc 81 fa ff 00 00 00 77 08 0f b6
Jan 28 14:02:09 zuzana kernel: Aiee, killing interrupt handler
Jan 28 14:25:58 zuzana syslogd 1.3-3: restart.

Feela

- --
Ondrej Feela Filip
E-mail: feela@ipex.cz
WWW: http://feela.ipex.cz
PGP: finger feela@atrey.karlin.mff.cuni.cz

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

From: David Wragg <dpw@doc.ic.ac.uk>
Date: Wed, 28 Jan 1998 13:51:04 GMT
Subject: Re: NTFS umask option problem

Martin v. Loewis writes:
> Hi Dave,
>
> Sorry, but I fail to see the problem. From mount(8)
>
> Set the umask (the bitmask of the permissions that
> are not present). The default is the umask of the
> current process. The value is given in octal.
>
> The umask of the current process is not considered, but I believe it
> is not for any other file system supporting the umask mount option.
>

Whoops. I should not rant on linux-kernel when I am too tired to think
straight.

So why does ntfs default to a umask of 0077 whereas (for example) vfat
defaults to the umask of the mounting process? Which is doing the
right thing?

- --
Dave Wragg

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

From: Bill Hawes <whawes@star.net>
Date: Wed, 28 Jan 1998 09:01:56 -0500
Subject: Re: Fix for strange name module loading requests

Regis Duchesne wrote:
> I'm pretty new to kernel debugging, thanks for the idea (even if it
> goes without saying, it always goes better when it is said :)
>
> Stupid question from beginners like me :
> "How to force an oops in kernel code?"
> Answer for the record : just try to write something at address 0.
>
> Anyway, with Bill's valuable advice, I tracked down that bug : the
> 2.1.79 patch (net/ipv4/af_inet.c) allowed the device to handle every ioctl
> call that the INET socket can not handle itself. This revealed a weakness
> of dev_ioctl(), which does not look at the ioctl _before_ assuming that
> it can handle it, and it can load the adequate device module.
>
> Here is the fix (against 2.1.82) for these horrible things :
> Jan 27 10:30:43 Celine modprobe: can't locate module X!^O@^X-
> Jan 27 10:30:43 Celine modprobe: can't locate module ^D

Good tracking! I'm sure everyone will be glad to get rid of the bogus module
messages ...

Regards,
Bill

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

From: Bryn Paul Arnold Jones <bpaj@gytha.demon.co.uk>
Date: Wed, 28 Jan 1998 14:00:43 +0000 (GMT)
Subject: Re: 2.1.82 boot failure

On Wed, 28 Jan 1998, Myrdraal wrote:

> On Wed, Jan 28, 1998 at 11:22:46AM +0100, Andreas Schwab wrote:
> Hi,
> > Otel Florian-Daniel <otel@ce.chalmers.se> writes:
> > |> I just tried to fire up 2.1.82. Bare, no fancy modules. When it
> > |> boots it block. The only relevant message seems to be:
> > |> Ocuh, no kerneld for message 2147418113
> > |> Any idea ?
> > Reconfigure and enable CONFIG_UNIX (not as a module).
> I don't think you should have to do that... It works just fine as a
> module for me:
> "Module Size Used by
> unix 12180 28 (autoclean)"
> -Myrdraal
>

Loading the unix module shouldn't be a problem as the kernel uses SYS V IPC
(well a slightly modified version) to talk to kerneld.

Bryn
- --
PGP Pub key http://www.gytha.demon.co.uk/pubkey.asc ID: 1024/30AF2D69
On-line, adj.: FP: FC 4E 41 9E 64 C3 AB 28 A3 5A 57 F8 CC D9 A7 B8
The idea that a human being should always be accessible to a computer.

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

From: Gadi Oxman <gadio@netvision.net.il>
Date: Wed, 28 Jan 1998 16:18:31 +0300 (IST)
Subject: Re: Request for help with cdrecord and HP7100

> This mail, however, seems to suggest that there are some on-going
> issues with the design of the generic interface, and with some
> incompatibilities between the SCSI and ATAPI command sets, and that
> these incompatibilities are being hidden in the device drivers.

Yes, ATAPI devices are very similar to SCSI devices, but there are
some small differences.

When I originally wrote the ATAPI --> SCSI host adapter emulation driver,
I added a small SCSI command translation layer in an attempt to cater for
the various ATAPI/SCSI differences, thus allowing the high level Linux SCSI
drivers and the user space applications which are using the /dev/sg interface
to use ATAPI devices unmodified.

Some of the differences which we encounterd up to this point:

- - ATAPI cdroms / ATAPI direct access devices

Unfortunately, SFF-8020 and SFF-8070 specify that the "Ansi Revision"
and the "Response Data Format" fields in the INQUIRY packet command
should be set to 2 and 1 respectively (Interestingly, for ATAPI tapes,
QIC-157 specifies "Ansi Revision 2, Response Format 2", probably to
be compatible with the SCSI specifications).

This first caused problems when using ATAPI PD-CD devices (which
are using multiple logical units) -- the Linux SCSI subsytem is
checking the "SCSI Revision" field, and doesn't probe for multiple
luns for devices which are SCSI-0 compliant.

--> I patched the "Ansi Revision" field from 0 to 2.

- - We are usually using READ-6/WRITE-6 in the sr.c and sd.c drivers.

Unfortunately, ATAPI devices usually support only the SCSI-10/SCSI-12
variants of various commands.

--> I added a SCSI-6 to SCSI-10 transformation for READ-6/WRITE-6
for ATAPI CDROM and PD-CD drives.

However, the firmware of some ATAPI drives appear to be fully
compatible with the SCSI models -- for example, the ATAPI IOMEGA
ZIP supports READ-6/WRITE-6 directly even though it is not required
to support the commands by the specification.

- - MODE_SENSE6/MODE_SELECT6 are being frequently used

--> I added a (buggy) transformation to MODE_SENSE10/MODE_SELECT10,
mainly for CDROMVOLCTRL ioctl in sr.c.

- - ATAPI CD-R/CD-RW drives were not working as is with older
versions of cdrecord. This was eventually caused by the above
bug in the transformation of MODE_SENSE/MODE_SELECT.

Joerg added direct support for MODE_SELECT10/MODE_SENSE10 to
the newer versions of cdrecord.

- - The ATAPI specifications require that the "PF" bit in the
MODE_SENSE packet command would be set.

Unfortunately, since the "response data format" field in the
INQUIRY command is being set to 1 and not patched to 2 by the
kernel, the ATAPI CD-R drives appear to be "SCSI-1" compatible,
which was causing some ATAPI CD-R drives to be incompatible
(interestingly, some CD-R drives seem to work either way).

At this point, we are wondering which is the preferred way to handle
such ATAPI --> SCSI transformations.

In contranst to my original viewpoint, I now tend to think that handling
the small differences between ATAPI and SCSI devices is best handled at
the application layer, rather than in the ide-scsi driver.

This has the disadvantage that programs will be less likely to work "as is",
but it does have the advantage of being much more flexible.

As suggested by Joerg, it would be best to add a method which will allow us
to disable the layer, at least for access through the /dev/sg driver. The
last patch implemented the following translation options:

- No translation.

- Enabling the ATAPI->SCSI translation layer just for the
kernel (sr, sd, etc).

- Enabling the ATAPI->SCSI translation layer for both
the kernel and for access through /dev/sg.

which were selected using /proc/ide/hdx/settings.

Itai suggested that adding ioctls to the /dev/sg driver would be more
flexible than using /proc/ide to the users of the sg device driver.

I'm currently thinking of the following ioctl scheme:

SG_EMULATED_HOST: (add to sg.c)
returns 1 for emulated SCSI host adapters, 0 for
real SCSI host adapters.

and adding the following ioctls to the ide-scsi driver (and
a mechanism which will call a host adapter specific ioctl
function from scsi_ioctl):

SG_SET_TRANSFORM: (add to ide-scsi.c)
enables (1) /disables (0) the translation layer for access
through /dev/sg.

SG_GET_TRANSFORM: (add to ide-scsi.c)
asks the kernel whether the translation layer is currently
active for /dev/sg.

Gadi

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

From: linux kernel account <linker@nightshade.z.ml.org>
Date: Wed, 28 Jan 1998 09:20:53 -0500 (EST)
Subject: Re: Packet Scheduling

Couldn't some use of TCP's flow control be used to throttle the remote
sender?

On Wed, 28 Jan 1998, Josip Gracin wrote:

> On Wed, Jan 28, 1998 at 10:01:46AM +0000, Alan Cox wrote:
> > Delaying incoming packets doesnt change the speed of the link. You need
> > to throw a few away.
>
> But we can only throw them away when they have already been transfered,
> so I guess it doesn't make a difference.
>
> --
> | Josip Gracin, student at Faculty of EE and CS in Zagreb, Croatia
> | mailto:grac@fly.cc.fer.hr, http://fly.cc.fer.hr/~grac
>

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

From: "Pawel S. Veselov" <vps@unicorn.niimm.spb.su>
Date: Wed, 28 Jan 1998 17:27:36 +0300 (MSK)
Subject: Re: IRQ 255?

Hello, Bernhard!

On Tue, 27 Jan 1998, Bernhard Rosenkraenzer wrote:

>> Bus 0, device 2, function 0:
>> VGA compatible controller: Cirrus Logic GD 7548 (rev 0).
>> Fast devsel. IRQ 255.
>>
>> Note that the video device is on IRQ 255. Is this possibly a bug somewhere?
>
>IRQ 255 doesn't exist, but it looks like a (unsigned char) -1.
>My guess is that your VGA card doesn't use an IRQ, and IRQ 255 is the PCI
>driver's way to display this.

PCI controller sets -1 ( 255 ) IRQ in two cases :
a) The PCI device doesn't need an IRQ.
b) There is no available IRQ to assign to this device.

Bye.
- --
Natural laws have no pity.

- --
With best of best regards, Pawel S. Veselov (aka Black Angel)
internet : vps@unicorn.niimm.spb.su ( mail,finger,talk )
Web page : http://www.niimm.spb.su/~vps/
ICQ : 5252265

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

From: David Wragg <dpw@doc.ic.ac.uk>
Date: Wed, 28 Jan 1998 14:36:33 GMT
Subject: Re: MTRR patches ??

> My main concern is two-fold:
> [...]
> - does it really make sense to make a device out of it? Might it not be
> equally useful as just a "mtrr" user program that just happens to
> invoce a kernel module (that unloads immediately after having done its
> foul deed).

It could be as useful, and it might save a teeny bit of memory, but
isn't the use of module options to pass information into the kernel
ugly? It's fine for hardware parameters that are guaranteed not to
change, but unpleasant for actual communication.

For example, with Richard's patch you can easily find out the state of
the MTRRs with:

% cat /proc/mtrr

What simple way is there for a temporarily loaded module to do this,
except for using printks, which is a real hack. (Well, I suppose it
could add a proc entry!)

It would also not integrate well with kernel device drivers that could
take advantage of the MTRRs (though I have no idea whether there are
any, except presumably KGI).

- --
Dave Wragg

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

From: Mario Mikocevic <mozgy@maja.zesoi.fer.hr>
Date: Wed, 28 Jan 1998 15:42:00 +0100 (MET)
Subject: Re: ide-cd as a modules not working in the latest kernels?

Hi,

> > Have you tried adding the line "hdX=cdrom" to your kernel command line
> > where "X" is the drive letter of your ATAPI cdrom drive? Did that help?
>
> The problem (as seen on my system) is that ide-probe cannot be used
> as a module because ide_add_generic_settings is not exported from
> ide.c. See my earlier posting for the patch.

Hum, ide-cd as module works for me in last ten or so 2.1 kernels.
Iwill mobo with Toshiba 4x CDROM.

Now kinda of bug report, .82 hung twice in the last 24 hours with
nothing in logs and with no apparent reason !
Everything was stone dead.

and btw, I still haven't been able to activate my ide channel
on nonPnP AWE32 ... :]

- --
Mario Mikocevic (Mozgy)
mozgy@zesoi.fer.hr
|/-\| lschk error : FUBR !

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

From: Jamie Lokier <lkd@tantalophile.demon.co.uk>
Date: Wed, 28 Jan 1998 14:30:41 +0000
Subject: 2.1.82: still freezing

But enough about the weather around here...

According to my logs, I've now tried kernels:

2.1.70
2.1.72
2.1.80
2.1.82

These are the only 2.1 kernels I've tried so far.

_All_ of them freeze up on my machine after some random amount of time,
usually measured in hours.

With 2.1.80 and 2.1.82, I tried Magic-SysRq. It does _not_ work after
the computer has crashed.

I've not had any similar problems with 2.0.30.

[ I have an AMD K6-233 (without the bug), 64Mb RAM, an FIC PA-2011
motherboard (with one of the VIA chipsets), a 6.4G Quantum Fireball ST
disk (IDE) and a Matrox Millenium II. [A Wintel PC with no Windows and
no Intel chips <grin>] ].

Several of the lockups happened overnight, when I left the computer to
its own devices (as it were). As nothing gets logged, except the time
is more or less available from the last entry in /var/log/cron, I don't
know what it was up to when it crashed. There is some evidence that
there was always disk activity at the time.

I have a modem, and about half the crashes have happened with PPP
running. I don't run PPP for that much of my computer-using time.

While using the PC, I've found that it's always crashed during disk
activity (probably), but there doesn't have to be much of it. Just
running xpdf froze it once. (As xpdf involves a fork & exec of gs, it
could have something to do with that).

2.1.80 crashed once during the boot-time fsck after a previous crash.

2.1.82 crashed for me last night. It was doing a news download at the
time. It left the filesystem in a state that fsck would not recover
automatically.

I've not seen any console messages, but then I run X all the time.
Nothing ever makes it to the log files. (In fact, occasionally the
formatting of the log files is a bit messed up around the crash time).

So, who else has this problem?

- -- Jamie

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

From: Geoff Hoff <ghoff@math.utk.edu>
Date: Wed, 28 Jan 1998 09:53:24 -0500
Subject: Re: 2.1.xx and sound problems

> I've tried kernels 2.1.77 to 2.1.82 and have not been able to get them
> working completely with my soundblaster. I can play wav files with all
> versions, but I cannot get sound from quake. 2.1.81 would cause quake to
> segfault saying my card does not support that, all the others quake would
> load fine but no sound. I tried both modular and monolithic kernels.
> 2.0.30 to 2.0.33, and DOS work fine. My SB is v2.1, 8bit, io220, irq7,
> dma1.
>
> When trying to load sound as a module with 2.1.82: modprobe sb io=220
> irq=7 dma=1, I get: sb_card.c: I/O port dc is already in use.

You need io=0x220, it needs to be hex, thats why you're getting the I/O port
already in use.

> Thanks,
> Jesse DeFer
> kernel@dotd.dyn.ml.org

Geoff Hoff

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

From: Pavel Machek <pavel@atrey.karlin.mff.cuni.cz>
Date: Wed, 28 Jan 1998 15:57:16 +0100
Subject: Re: SuperMicro P5MMA98 motherboard

> it appears that there is a bug in the BIOS which causes Linux to get keyboard
> timeouts
>
> can anyone on this list give me a definitive statement on which version of the
> BIOS i should be using
>
> preferably from someone who has such a motherboard and has done the upgrade!
>
> i'm building 8 machines for a customer and have already toasted at least one
> motherboard (possibly three)

You mean that motherboard died? It better should not...

> so i want to get the rest right :-(

What about making linux initialize it itself? there's 'config' switch
somewhere in keyboard.c

Pavel
- --
Do *NOT* buy software, GNU software is better and free! Pavel
GCM d? s-: !g p?:+ au- a--@ w+ v- C++@ UL+++ L++ N++ E++ W--- M- Y- R+

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

From: Bill Hawes <whawes@star.net>
Date: Wed, 28 Jan 1998 10:12:09 -0500
Subject: Re: lockup with 2.1.81 -- ide problem?

Pavel Machek wrote:

> Do you run SMP?
>
> This seems to be related to last irq changes.

Yes, this was with a kernel compiled for SMP -- I usually don't have any
problems running SMP kernels on this particular machine.

I've recompiled for UP to see if the problem recurs there.

Regards,
Bill

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

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 29 Jan 1998 02:30:35 +1100
Subject: Re: OFFTOPIC: GGI and alternative GUIs and windowing systems in Linux

Hi

"Adam D. Moss" <adam@uunet.pipex.com> writes:
>
> Alan Cox:
> >> There is, I think, still room for bumming X implementations and protocols
> >> a bit before giving up on it.
> >
> >Plenty of it. Adding support for acceleration of image scaling, and video
> >scaling would help too.
>
> I completely agreed, and suggested almost exactly that to the X people
> a couple of years ago (Ralph Swick specifically, IIRC).
>
> The response was, 'that's kinda what PEX is meant for'.
>
> But now PEX is largely an ex-parrot for one reason or another,
> OpenGL is lovely but quite heavyweight and doesn't slot into the
> X architecture seamlessly (unless you have an SGI, and then only
> to an extent), and a few extentions to the drawable featureset
> would go down very nicely.
>
> XCopyScaledArea(display, src, dest, gc, src_x, src_y, src_width,
> src_height, dest_x, dest_y, dest_width, dest_height)
> Display *display;
> Drawable src, dest;
> GC gc;
> int src_x, src_y;
> int dest_x, dest_y;
> int src_width, src_height;
> int dest_width, dest_height;
>
> That sort of thing.
>
> Better if it were an official X extension than an xf86 one, certainly.
> And long overdue.

I may be off base here, but have you looked at XIE (X Image Extension)?
It does quite a few image manipulations in the server along with such
useful stuff as decompression/compression of images. So you can for
example send a G4 compressed bitmap to the server, decompress it,
scale it (including scale to grey) and display it. XIE is not
restricted to bitmaps.

It already has a software implementation and parts could be rewritten
to take advantage of any useful hardware you have lying around.

Everytime I display an image using xv I think to myself "Why doesn't
xv use XIE if available?"

Cheers,
Stephen
- --
Stephen Rothwell Stephen.Rothwell@canb.auug.org.au

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

From: "Martin v. Loewis" <loewis@informatik.hu-berlin.de>
Date: Wed, 28 Jan 1998 16:52:00 +0100
Subject: Re: NTFS umask option problem

> Whoops. I should not rant on linux-kernel when I am too tired to think
> straight.
>
> So why does ntfs default to a umask of 0077 whereas (for example) vfat
> defaults to the umask of the mounting process? Which is doing the
> right thing?

Ah, this is meant to be the umask of the mounting process. I don't
know which one is doing the right thing, it is eventually up to the
administrator to make sure everything works by providing the right
options.

I've chosen 0077 in order to protect the administrator from
unexpectedly exposing data previously protected by access control
lists. This is not a problem for msdos, as people don't expect any
kind of access control on an msdos fs.

Regards,
Martin

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

From: John Kennedy <jk@csuchico.edu>
Date: Wed, 28 Jan 1998 07:52:16 -0800
Subject: SUMMARY: pcmcia-cs-2.9.12 +glibc

[Scott Ananian]
>[me]
>> Does anyone have or know where patches to make pcmcia-cs-2.9.12 glibc-
>> happy can be found? Right now I'm using a 2.1.79+ kernel.
>
> Try pcmcia-cs-3.0.0, in
> ftp://hyper.stanford.edu/pub/pcmcia/NEW/*
> Look for the version with the most recent timestamp.
>
> I'm not *positive* David Hinds has made 3.0.0 glibc-friendly, but if you
> still can't get it to work after downloading the most recent version, try
> emailing him (<dhinds@hyper.stanford.edu>).
>
> I believe that the 2.9.X series of kernels have problems with new kernel
> releases, completely independent of glibc.

I grabbed "pcmcia-cs.16-Jan-98.tar.gz" (which untars itself as 3.0.0)
and it compiled up just fine for me under 2.1.82 and in a native
glibc-2.0.6 environment. If an instance of "pci_irq" hadn't escaped a
CONFIG_CARDBUS #ifdef I wouldn't have had to touch the code at all.

I haven't seen it trip over any kernel problems yet, but time will tell.

--- john

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

From: Adam Heath <adam@brainiac.egr.msu.edu>
Date: Wed, 28 Jan 1998 10:53:16 -0500 (EST)
Subject: Re: Patch: 2.1.81: Index Configure.help(using mmap and C)

On Tue, 27 Jan 1998, Trevor Johnson wrote:

> I tried your patch with 2.1.82. When I did "make menuconfig" I got a
> new warning:
>
> help.c:36: warning: `start_off' might be used uninitialized in this
> function
>
> I made this change, and the warning went away:

The current patch I am working on does not suffer this.

> I played a bit with "make config" and "make menuconfig" and found an
> anomaly: the help for CONFIG_EXPERIMENTAL disappeared.

That was a bug that I noticed to. It is fixed in the current version.

> I also noticed two snall problems which are also present in the stock
> kernel (and may be beyond the scope of your patch):
>
> --with ARCH = i386, help is available for CONFIG_M386 and the other CPUs,
> but "make config" doesn't show a question mark as an option, which
> elsewhere indicates that help is available.

This is a bug in make config. I did a grep for "choice" in all
config.in's, and noticed that it is a little used option. The
arch/*/config.in's used, along with ftape. I ran config, and had the same
problem with ftape along with CONFIG_M386.

> --no help for CONFIG_BSD_PROCESS_ACCT.

Not a problem with my patch. The help isn't there. Do a grep on
Configure.help.

> Otherwise, everything seemed to work.

Thanks. I think you will like the current version better, though. It
doesn't create a bunch of small files. It just makes an index, and uses
that to extract the help. It can index several files, so that you have
one monolithic Configure.help, and also several small files in
Documentation/config. Watch for the patch here.

> ___
> Trevor Johnson
>

Adam

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

From: Jesse Off <joff@10thsphere.ml.org>
Date: Wed, 28 Jan 1998 10:01:11 -0600 (CST)
Subject: Re: iso9660 level 3 / rsj support

On Wed, 28 Jan 1998, Eric Lammerts wrote:

>
> I made a patch against 2.0.33 to support:
> - CDs with an ISO9660 Level 3 filesystem.
> - unfinalized RSJ CDs (probably works on Philips SCSI CD-writers only).
>
> The first type of CD can be created by Adaptec DirectCD, a win95 installable
> filesystem which uses packet writing. The second type of CD is created by
> RSJ CD Writer (see http://www.rsj.de) which uses track-at-once recording to
> implement an installable filesystem.
>
> Beware: this patch is based on guesswork and inspection of CDs!
> It may not work with your CDs.
>
> Requirements:
> You need kernel 2.0.33 with fat32_joliet_nls_patch-0.2.8 already applied.
>
> To use the RSJ support, you need a SCSI CD-drive that supports the "Read
> Track Info (0xE5)" command. I only tested it on a Philips CDD2600.

Great! Now we only need some packet-writing cd writing tools for linux.
Is there any project going on right now for that?

~Jesse Off

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

From: Adam Heath <adam@brainiac.egr.msu.edu>
Date: Wed, 28 Jan 1998 11:09:37 -0500 (EST)
Subject: Re: Patch: 2.1.81: Index Configure.help(using mmap and C)

On Wed, 28 Jan 1998, Adam Heath wrote:

> > I also noticed two snall problems which are also present in the stock
> > kernel (and may be beyond the scope of your patch):
> >
> > --with ARCH = i386, help is available for CONFIG_M386 and the other CPUs,
> > but "make config" doesn't show a question mark as an option, which
> > elsewhere indicates that help is available.
>
> This is a bug in make config. I did a grep for "choice" in all
> config.in's, and noticed that it is a little used option. The
> arch/*/config.in's used, along with ftape. I ran config, and had the same
> problem with ftape along with CONFIG_M386.

Included with my patch(when it comes out) is the fix.

Adam.

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

From: Ben Woodard <bwoodard@cisco.com>
Date: Wed, 28 Jan 1998 16:20:02 +0000
Subject: Re: Question: "File table overflow" (Linux 2.0.33pre6)

Is there some sort of bugfix in 2.0.33 that wasn't enumerated in
Linus's email when 2.0.33 came out. I have had a similar problem a
couple of times recently with 2.0.32 but I didn't suspect the kernel I
was suspecting the application software, samba, lpr and netatalk.

> >
> > I'm seeing more and more "file table overflow" related error messages, from
> > various machines doing various things (mail, ip masq, squid, ..). All
> > machines are running the sixth pre-release of kernel 2.0.33.
>
> Hmmm ... for 2.0.32 I found 6 pre-releases, for 2.0.33 only 3 pre-releases
> occurs.
>
> >
> > Could this problem be kernel related, and if so is it fixed in the actual
> > 2.0.33 release? If not, is it on the 2.0.34 fix-list?
>
> Have you tried 2.0.33?

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

From: John Goerzen <jgoerzen@southwind.net>
Date: 28 Jan 1998 10:27:05 -0600
Subject: Suspend broken on a thinkpad

Hi,

I just got a new Thinkpad 310ED (133 MMX). Of course, I quickly took
Windows down to size and installed Linux.

I've installed the pcmcia utilties and got them working without
problems.

But the power management features don't seem to work under Linux, but
they do under Windows 95.

Specifically, the suspend feature (write all memory to disk and shut
off) doesn't work. The LCD will briefly turn off, and then will beep
and turn right back on and cause some hard disk activity for a bit.

I have also tried using apm -s to do a suspend (instead of using the
laptop's hotkey) but that doesn't do any good either.

I suspect this is due to a kernel bug in the APM routines (possibly
related to the oops I reported earlier?), but I don't really know how
to go about diagnosing it.

John

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

From: Michael Elizabeth Chastain <mec@shout.net>
Date: Wed, 28 Jan 1998 10:31:39 -0600
Subject: Re: warnings while compiling 2.1.81

Hi Bryn,

> Erm, bsd_comp, and ppp_deflate are always built as modules, because of
> pattent issues in bsd_comp's case, and I assume that ppp_deflate is just
> followning bsd_comp's lead ;).

That's right. ppp_deflate has an init_module function, but does not
have any means to call ppp_register_compressor if ppp_deflate.o is
built as part of the resident (no initialization function).

> Basically if you slap a #ifdef CONFIG_MODULES arround them, you can't
> use compressors when ppp is builtin.

That's wrong. There *is* a difference between CONFIG_MODULES and MODULE.
CONFIG_MODULES is true when the resident kernel supports loadable modules,
MODULE is true when the file being built is a module. So CONFIG_MODULES
is the right test, and gcc has exactly the right warnings.
(When CONFIG_MODULES is enabled, EXPORT_SYMBOL(foo) is a use of foo,
and when CONFIG_MODULES is disabled, EXPORT_SYMBOL(foo) is empty and
is *not* a use of foo).

Before I published my patch, I built a kernel with CONFIG_MODULES=y and
CONFIG_PPP=y and verified that ppp_register_compressor and
ppp_unregister_compressor are present in the symbol table and that they
have ksymtab and kstrtab entries too.

I'm pretty sure I'm right about this but I am open to evidence. Go for it,
build a kernel with the problem as you see it and send me the .config
file and some evidence. I'll hold onto my patch for a while.

Regards,

Michael Chastain
<mailto:mec@shout.net>
"love without fear"

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

From: Josip Gracin <grac@fly.cc.fer.hr>
Date: Wed, 28 Jan 1998 17:30:50 +0100
Subject: Re: Packet Scheduling

Kevin Lentin writes:
> I wrote:
> > Unless, of course, the other side is Linux too, which happens more and
> > more often to me. ;)
>
> Not here. I'm talking to a terminal server.

Oops, I've just sent a mail saying that if I have a telnet and ftp session
to the same host, and if that host performs scheduling, then everything
works nice regardless of terminal server. This is of course not true,
sorry, I didn't think enough. You are right.

- --
| Josip Gracin, student at Faculty of EE and CS in Zagreb, Croatia
| mailto:grac@fly.cc.fer.hr, http://fly.cc.fer.hr/~grac

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

From: Mickus <hellcat@waterw.com>
Date: Wed, 28 Jan 1998 11:25:59 -0500
Subject: 2.1.82 Kernel Lockup at boot

I first compiled 2.1.82 with no problems and rebooted fine. I then shutdown
and some time later i returned to boot up linux. The kernel hangs at this
point:

PCI_IDE: unknown IDE controller on PCI bus function 145, VID = 1060, DID =
673a
PCI_IDE: not 100% native mode: will probe irqs later

I have gotten similar messages on the 2.1.78 kernel but it never froze up.

thanks in advance,

Paul

- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Hellcat F6F-3 | Length: 33' 7"
------(#)------ Wingspan: 42' 10"
o/ \o
Max Speed: 380Mph
Climb: 2980.00 Ft/min
Ceiling: 37300.0 Ft

http://aeroweb.brooklyn.cuny.edu:80/aircraft/f6f3.html
- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

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

From: "Larry J. Blunk" <ljb@merit.edu>
Date: Wed, 28 Jan 1998 11:47:46 -0500
Subject: Aiee with Linux 2.0.33

Got the following the other day on a moderately loaded squid server
running on a Pentium Pro-150 with 128MB ECC memory and a DEC DE21140
based ethernet card. Currently using the v0.87 version of tulip.c.
Should I presume there may be a problem with it?

Jan 26 15:27:23 cordite kernel: kfree of non-kmalloced memory: 03b11ee0, next= 0444a000, order=6
Jan 26 15:27:32 cordite kernel: Warning: kfree_skb passed an skb that nobody set the free flag on! (from 03b11668)
Jan 26 15:27:32 cordite kernel: invalid operand: 0000
Jan 26 15:27:32 cordite kernel: CPU: 0
Jan 26 15:27:33 cordite kernel: EIP: 0010:[<000dd90c>]
Jan 26 15:27:33 cordite kernel: EFLAGS: 00010206
Jan 26 15:27:33 cordite kernel: eax: 000dd90c ebx: 00ef9018 ecx: 03b11010 edx: 03b11000
Jan 26 15:27:33 cordite kernel: esi: 000206e4 edi: 00000000 ebp: 02bb704c esp: 0634fb80
Jan 26 15:27:33 cordite kernel: ds: 0018 es: 0018 fs: 002b gs: 002b ss: 0018
Jan 26 15:27:33 cordite kernel: Process squid (pid: 17695, process nr: 19, stackpage=0634f000)
Jan 26 15:27:33 cordite kernel: Stack: 00137bf7 00ef9018 00ef9018 03b11668 00137ef7 00ef9018 03b11668 03b11668
Jan 26 15:27:33 cordite kernel: 00ed9018 fffe0b67 00146f86 03b11668 00000000 00000000 00ed9018 0528e164
Jan 26 15:27:33 cordite kernel: 635f7dbb 02bb7038 000005c8 0014591c 00ed9018 00ed9018 0528e148 0528e164
Jan 26 15:27:33 cordite kernel: Call Trace: [sock_wfree+35/44] [kfree_skb+183/244] [tcp_write_xmit+198/520] [tcp_ack+1492/2244] [alloc_skb+100/332] [tcp_rcv+1743/2088] [ip_rcv+887/1192]
Jan 26 15:27:33 cordite kernel: [net_bh+252/284] [do_bottom_half+59/96] [handle_bottom_half+11/24] [SHATransform+2647/6796] [dev_queue_xmit+26/36] [ip_build_xmit+1523/2968] [secure_tcp_sequence_number+114/176] [tcp_connect+512/1128]
Jan 26 15:27:33 cordite kernel: [inet_connect+225/476] [<083a7988>] [sys_connect+260/292] [tcp_setsockopt+74/148] [inet_setsockopt+72/92] [sys_setsockopt+106/128] [sys_socketcall+298/732] [<083a7988>]
Jan 26 15:27:33 cordite kernel: [<081154e0>] [system_call+85/124] [<081154e0>] [<0844002b>]
Jan 26 15:27:33 cordite kernel: Code: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
Jan 26 15:27:33 cordite kernel: Aiee, killing interrupt handler

-Larry Blunk
Merit Network, Inc.

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

From: Michael Elizabeth Chastain <mec@shout.net>
Date: Wed, 28 Jan 1998 11:01:32 -0600
Subject: Re: More parallelism in makefile

Hi Andreas,

mec> In Rules.make, $(SYMTAB_OBJS) lost its dependency on
mec> $(SYMTAB_OBJS:%.o=%.c). The original rule does cause excessive
mec> compilation, but by removing this dependency, I believe you completely
mec> lose the dependency of foo.o on foo.c. The pattern rule %.o : %.c does
mec> *not* provide a dependency for anything that has explicit dependencies.

andreas> That's not a problem, the real dependency list comes from the .depend
andreas> file.

Go read a .depend file. I checked both 2.82 and 2.1.60 (random version
from before I rewrote mkdep.c), and neither of them has .depend files
with dependencies on foo.c.

Michael Chastain
<mailto:mec@shout.net>
"love without fear"

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

From: Michael Elizabeth Chastain <mec@shout.net>
Date: Wed, 28 Jan 1998 10:57:00 -0600
Subject: Re: More parallelism in makefile

Hi Andreas,

Michael Elizabeth Chastain <mec@shout.net> writes:

mec> Also I've had problems with dynamic % dependencies like this:
mec> $(addsuffix _modules,$(SUBDIRS)): %_modules: include/linux/version.h
mec> The dependency doesn't have a % substitution, so why not just this:
mec> $(addsuffix _modules,$(SUBDIRS)): include/linux/version.h

andreas> Because $* will be different.

Hmmm, ok. I would use ($@:%_modules=%) instead of $*. I can't point
to specific problem I had with the %_modules way but I just remember
having one.

Regards,

Michael Chastain
<mailto:mec@shout.net>
"love without fear"

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

From: Randolph Bentson <bentson@grieg.holmsjoen.com>
Date: Wed, 28 Jan 1998 09:16:18 -0800
Subject: Re: System Time Growing Off

Chuck Carson <chuck@digmo.org> writes:

> I have noticed that my system clock progressively grows off.
...
> Does anyone know the cause and a fix for this problem?

I suggest you look into the use of "tickadj". Your system
clock is generating slightly more or less than 100 ticks
per second. Tickadj allows you to add slightly less or
more than 10,000 microseconds to the clock at each tick.

If you have a fixed connection to the Internet, you can
use xntpd for a while to determine the best values. If
you can afford the memory footprint, you can use xntpd
all the time.

Randolph Bentson
bentson@grieg.seaslug.org
http://www.ssc.com/ssc/insidelinux

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

From: Jan Rychter <jwr@icm.edu.pl>
Date: 28 Jan 1998 18:36:31 +0100
Subject: Re: Suspend broken on a thinkpad

>>>>> "John" == John Goerzen <jgoerzen@southwind.net>:
John> Hi, I just got a new Thinkpad 310ED (133 MMX). Of course, I
John> quickly took Windows down to size and installed Linux.

John> I've installed the pcmcia utilties and got them working without
John> problems.

John> But the power management features don't seem to work under Linux,
John> but they do under Windows 95.

John> Specifically, the suspend feature (write all memory to disk and
John> shut off) doesn't work. The LCD will briefly turn off, and then
John> will beep and turn right back on and cause some hard disk
John> activity for a bit.

On my TP560 I had one thing bugging me for a long time -- if IRQ 9 was
made available to the pcmcia-cs package, then at some point machine
refused to hibernate. Not really predictable, e.g. it would happily
hibernate 20 times and then suddenly refuse. Usually just when I was in
*real* hurry :-)

So, you might take a look at that.

And BTW, for the ThinkPad 560 owners: anybody got suspend to work (not
hibernation, not standby, SUSPEND == fn-f4) ? My machine w/Linux happily
suspends and then never wakes up. I can open&close the screen, tap the
keys, etc, no go. Nada. Have to disconnect AC and remove the batteries.

- --J.

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

From: Jamie Lokier <lkd@tantalophile.demon.co.uk>
Date: Wed, 28 Jan 1998 14:41:26 +0000
Subject: Weird modules requests showing up in the logs

I've found a whole bunch of these messages in my logs, while running PPP
on 2.1.82. Nothing similar shows up for 2.1.80.

Although these look random-ish, all of them are repeated many times in
the logs.

Jan 28 00:59:57 tantalophile modprobe: can't locate module 0
Jan 28 01:00:15 tantalophile modprobe: can't locate module ^X
Jan 28 01:00:24 tantalophile modprobe: can't locate module ^P
Jan 28 01:00:40 tantalophile modprobe: can't locate module
Jan 28 01:38:57 tantalophile modprobe: can't locate module (
Jan 28 04:10:49 tantalophile modprobe: can't locate module ps ^H>C^D^H
Jan 28 14:27:59 tantalophile modprobe: can't locate module ps ^Hxr ^H7b^I@0r^?

- -- Jamie

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

From: <kernel@dotd.dyn.ml.org>
Date: Wed, 28 Jan 1998 11:02:36 -0700 (MST)
Subject: Re: 2.1.xx and sound problems

On Wed, 28 Jan 1998, Geoff Hoff wrote:

> > I've tried kernels 2.1.77 to 2.1.82 and have not been able to get them
> > working completely with my soundblaster. I can play wav files with all
> > versions, but I cannot get sound from quake. 2.1.81 would cause quake to
> > segfault saying my card does not support that, all the others quake would
> > load fine but no sound. I tried both modular and monolithic kernels.
> > 2.0.30 to 2.0.33, and DOS work fine. My SB is v2.1, 8bit, io220, irq7,
> > dma1.
> >
> > When trying to load sound as a module with 2.1.82: modprobe sb io=220
> > irq=7 dma=1, I get: sb_card.c: I/O port dc is already in use.
>
> You need io=0x220, it needs to be hex, thats why you're getting the I/O port
> already in use.

Thanks for the advice, the module loaded fine. However it still does not
give me sound in quake.

Jesse DeFer
kernel@dotd.dyn.ml.org

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

From: Adrian Bridgett <adrian.bridgett@poboxes.com>
Date: Tue, 27 Jan 1998 20:55:47 +0000
Subject: token ring driver lacks byte counts

On 2.1.81:

~$ cat /proc/net/dev
Inter-| Receive | Transmit
face |bytes packets errs drop fifo frame|bytes packets errs drop fifo
lo: 3924869 16962 0 0 0 0 3924869 16962 0 0 0
tr0: 0 18070328 0 9 0 0 0 3671525 0 0 0
^ ^
missing missing

Thanks

Adrian

email: adrian.bridgett@poboxes.com | Debian Linux - www.debian.org
http://www.poboxes.com/adrian.bridgett | Because bloated, unstable
PGP key available on public key servers | operating systems are from MS

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

From: Kirk Petersen <kirk@eidolon.speakeasy.org>
Date: Wed, 28 Jan 1998 10:35:38 -0800
Subject: Re: 2.1.82 boot failure

> > I don't think you should have to do that... It works just fine as a
> > module for me:
> > "Module Size Used by
> > unix 12180 28 (autoclean)"
> > -Myrdraal
> >
>
> Loading the unix module shouldn't be a problem as the kernel uses SYS V IPC
> (well a slightly modified version) to talk to kerneld.

Check the linux-kernel archives for an explanation of why
kerneld and modular unix domain sockets don't get along at boot time.
You are right, the kernel and kerneld talk via SysV IPC, but kerneld
tries to talk to syslogd before the unix module is loaded, resulting in
a weird kernel/kerneld/syslogd interaction.
Anyways, unix *should* be a module, and kerneld should be fixed.
My preferred solution is kmod, which has now been working on a variety
of computers for many weeks:

http://www.muppetlabs.com/linux/patches/kmod_patch7.gz

which is against 2.1.79, but will be updated soon. For those
of you that don't know, this is a simple (probably 1/10 the code)
replacement for kerneld that doesn't require a user land binary or
the SysV IPC hack.

- --
Kirk Petersen
http://www.muppetlabs.com/~kirk/

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

From: "Chuck Carson" <chuck@digmo.org>
Date: Wed, 28 Jan 1998 12:34:34 -0600
Subject: Re: System Time Growing Off

Where can I get info on xntpd? There were no man page entries.

Chuck

- -----Original Message-----
From: Randolph Bentson <bentson@grieg.holmsjoen.com>
To: chuck@digmo.org <chuck@digmo.org>; linux-kernel@vger.rutgers.edu
<linux-kernel@vger.rutgers.edu>
Date: Wednesday, January 28, 1998 11:28 AM
Subject: Re: System Time Growing Off

>Chuck Carson <chuck@digmo.org> writes:
>
>> I have noticed that my system clock progressively grows off.
>...
>> Does anyone know the cause and a fix for this problem?
>
>I suggest you look into the use of "tickadj". Your system
>clock is generating slightly more or less than 100 ticks
>per second. Tickadj allows you to add slightly less or
>more than 10,000 microseconds to the clock at each tick.
>
>If you have a fixed connection to the Internet, you can
>use xntpd for a while to determine the best values. If
>you can afford the memory footprint, you can use xntpd
>all the time.
>
>Randolph Bentson
>bentson@grieg.seaslug.org
>http://www.ssc.com/ssc/insidelinux
>
>

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

From: Steven Suson <suson@tti.TuckerEnergy.com>
Date: Wed, 28 Jan 1998 12:42:27 -0600
Subject: POSIX Signals

I have a couple of suggestions concerning POSIX signals. As far as I
can tell (I don't have an anywhere near recent version of the POSIX
spec.), no behavior is specified for the PID argument to sigqueue.
However, since the description of sigqueue and kill reside together in
O'Reilly's POSIX.4 book (out of date itself, I suppose), seems to imply
that the PID argument would behave similiarly. So, perhaps it would be
possible to add a configuration option (read compile-time option), that
would allow sigqueueinfo to do either a kill_something_info OR a
kill_proc_info. The kill_something_info seems to work just fine in the
2.1.78 kernel, and we beat it to death!

Also, would it be possible to modify the sigaction structure so that
whenever a SA_SIGINFO type handler is installed, it doesn't have to be
cast? Such as (this is from the 2.1.43 Signal patch):

struct sigaction {

union {
__sighandler_t _handler;
void (*_sigaction)(int, siginfo_t *, void *);
} _sa_un;
#define sa_handler _sa_un._handler
#define sa_sigaction _sa_un._sigaction
etc...

Also, I noticed a patch for signal.c going by. I have a problem,
where it seems that a masked (RT) signal (37 to be precise), arrives
anyway in two of my three threads (yea, its a multithreaded process).
The mask is set prior to ANY pthread calls.

And, thanks again.... It looks like we'll make our deadline.

BTW, where did CLONE_PID and signals land? Has a behavior been
decided upon?

Steve Suson
"Keep the faith."

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

From: Stephen Williams <steve@icarus.icarus.com>
Date: Wed, 28 Jan 1998 10:48:26 -0800
Subject: Re: OFFTOPIC: GGI and alternative GUIs and windowing systems in Linux -LONG

pavel@elf.ucw.cz said:
> And if you put ability to paint menus in server (which is IMO good
> think), you have additional advantage that you can select how
> *applications* will look on your desktop.

alan@lxorguk.ukuu.org.uk said:
> X is meant to provide services not policy. Thats very important. You
> can run your own policy engine and interface on the server if you wish

You can write a server under X that does exactly what Pavel says. We
see it every day in our window managers.

pavel@elf.ucw.cz said:
> No. In many cases (menus, dialog boxes, ...) it is really ineffective
> to transfer data by lines as X do it.

Who said that X transfers such things by lines?

Anyhow, even if the X server isn't perfect (it isn't) it is a far better
starting point then most of the other options. You can almost surely
implemented a better MS-Windows with X then the other way around:-)

- --
Steve Williams "The woods are lovely, dark and deep.
steve@icarus.com But I have promises to keep,
steve@picturel.com and lines to code before I sleep,
http://www.picturel.com And lines to code before I sleep."

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

From: Adam Heath <adam@brainiac.egr.msu.edu>
Date: Wed, 28 Jan 1998 13:49:20 -0500 (EST)
Subject: Patch: 2.1.82 Sound modules problem

uart401.c doesn't get compiled, and when modprobe sb is run, it complains
about unresolved symbols. This patch fixes it.

diff -ruN 2.1.82-pure/drivers/sound/Makefile 2.1.82/drivers/sound/Makefile
- --- 2.1.82-pure/drivers/sound/Makefile Sun Jan 4 13:40:16 1998
+++ 2.1.82/drivers/sound/Makefile Wed Jan 28 13:14:42 1998
@@ -90,15 +90,15 @@
ifeq ($(CONFIG_SB),y)
L_OBJS += sb_audio.o sb_common.o sb_midi.o sb_mixer.o
LX_OBJS += sb_card.o
- -CONFIG_UART401 = y
else
ifeq ($(CONFIG_SB),m)
M_OBJS += sb.o
MIX_OBJS += sb_card.o
- - ifneq ($(CONFIG_UART401),y)
- - CONFIG_UART401 = m
- - endif
endif
+endif
+
+ifneq ($(CONFIG_SB),n)
+ CONFIG_UART401 = $(CONFIG_SB)
endif

ifeq ($(CONFIG_MSS),y)

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

From: Adam Heath <adam@brainiac.egr.msu.edu>
Date: Wed, 28 Jan 1998 13:52:28 -0500 (EST)
Subject: Patch: 2.1.82 Configure.help speedup

This patch build an index of Configure.help, and uses said index to
decrease the extraction time of the help text. On my machine, using the
sed line to get the last option of Configure.help, was slower(by a factor
of 3) then building the index, and extracting the help with this patch.

It is another C script, BTW.

diff -ruN 2.1.82-pure/Makefile 2.1.82/Makefile
- --- 2.1.82-pure/Makefile Wed Jan 28 13:26:29 1998
+++ 2.1.82/Makefile Wed Jan 28 13:03:56 1998
@@ -209,27 +209,27 @@
mkdir include/linux/modules; \
fi

- -oldconfig: symlinks scripts/split-include
+oldconfig: symlinks config_support_scripts
$(CONFIG_SHELL) scripts/Configure -d arch/$(ARCH)/config.in
if [ -r include/linux/autoconf.h ]; then \
scripts/split-include include/linux/autoconf.h include/config; \
fi

- -xconfig: symlinks scripts/split-include
+xconfig: symlinks config_support_scripts
$(MAKE) -C scripts kconfig.tk
wish -f scripts/kconfig.tk
if [ -r include/linux/autoconf.h ]; then \
scripts/split-include include/linux/autoconf.h include/config; \
fi

- -menuconfig: include/linux/version.h symlinks scripts/split-include
+menuconfig: include/linux/version.h symlinks config_support_scripts
$(MAKE) -C scripts/lxdialog all
$(CONFIG_SHELL) scripts/Menuconfig arch/$(ARCH)/config.in
if [ -r include/linux/autoconf.h ]; then \
scripts/split-include include/linux/autoconf.h include/config; \
fi

- -config: symlinks scripts/split-include
+config: symlinks config_support_scripts
$(CONFIG_SHELL) scripts/Configure arch/$(ARCH)/config.in
if [ -r include/linux/autoconf.h ]; then \
scripts/split-include include/linux/autoconf.h include/config; \
@@ -383,6 +383,8 @@
rm -f $(TOPDIR)/include/linux/modversions.h
rm -rf $(TOPDIR)/include/linux/modules
rm -rf modules
+ rm -f scripts/help
+ rm -rf Documentation/.help.index

distclean: mrproper
rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
@@ -396,7 +398,7 @@
sums:
find . -type f -print | sort | xargs sum > .SUMS

- -dep-files: scripts/mkdep archdep include/linux/version.h
+dep-files: compile_support_scripts archdep include/linux/version.h
scripts/mkdep init/*.c > .depend
scripts/mkdep `find $(FINDHPATH) -follow -name \*.h ! -name modversions.h -print` > .hdepend
set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i fastdep; done
@@ -438,8 +440,16 @@
# This generates dependencies for the .h files.
#

+config_support_scripts: scripts/split-include scripts/help
+
+compile_support_scripts: scripts/mkdep
+
scripts/mkdep: scripts/mkdep.c
$(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c

scripts/split-include: scripts/split-include.c
$(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
+
+scripts/help: scripts/help.c
+ $(MAKE) -C scripts help
+
diff -ruN 2.1.82-pure/scripts/Configure 2.1.82/scripts/Configure
- --- 2.1.82-pure/scripts/Configure Mon Jun 16 19:36:02 1997
+++ 2.1.82/scripts/Configure Wed Jan 28 11:04:59 1998
@@ -83,29 +83,7 @@
# help variable
#
function help () {
- - if [ -f Documentation/Configure.help ]
- - then
- - #first escape regexp special characters in the argument:
- - var=$(echo "$1"|sed 's/[][\/.^$*]/\\&/g')
- - #now pick out the right help text:
- - text=$(sed -n "/^$var[ ]*\$/,\${
- - /^$var[ ]*\$/b
- - /^#.*/b
- - /^[ ]*\$/q
- - p
- - }" Documentation/Configure.help)
- - if [ -z "$text" ]
- - then
- - echo; echo " Sorry, no help available for this option yet.";echo
- - else
- - (echo; echo "$text"; echo) | ${PAGER:-more}
- - fi
- - else
- - echo;
- - echo " Can't access the file Documentation/Configure.help which"
- - echo " should contain the help texts."
- - echo
- - fi
+ (echo; echo `scripts/help extract $1`; echo) | ${PAGER:-more}
}


@@ -424,12 +402,14 @@
val=""
while [ -z "$val" ]; do
ambg=n
- - readln "$question ($names) [$def] " "$def" "$old"
+ readln "$question ($names) [$def/?] " "$def" "$old"
ans=$(echo $ans | tr a-z A-Z)
set -- $choices
while [ -n "$1" ]; do
name=$(echo $1 | tr a-z A-Z)
case "$name" in
+ "\?" ) help "$var"
+ ;;
"$ans"* )
if [ "$name" = "$ans" ]; then
val="$2"
diff -ruN 2.1.82-pure/scripts/Makefile 2.1.82/scripts/Makefile
- --- 2.1.82-pure/scripts/Makefile Mon Jan 5 04:41:01 1998
+++ 2.1.82/scripts/Makefile Tue Jan 27 20:01:58 1998
@@ -37,3 +37,6 @@
rm -f *~ kconfig.tk *.o tkparse mkdep split-include

include $(TOPDIR)/Rules.make
+
+help: help.c
+ $(HOSTCC) $(HOSTCFLAGS) -o help help.c
diff -ruN 2.1.82-pure/scripts/Menuconfig 2.1.82/scripts/Menuconfig
- --- 2.1.82-pure/scripts/Menuconfig Wed Jan 28 13:26:14 1998
+++ 2.1.82/scripts/Menuconfig Wed Jan 28 11:29:27 1998
@@ -259,49 +259,11 @@

} # END load_functions()

- -
- -
- -
- -
- -#
- -# Extract available help for an option from Configure.help
- -# and send it to standard output.
- -#
- -# Most of this function was borrowed from the original kernel
- -# Configure script.
- -#
- -function extract_help () {
- - if [ -f Documentation/Configure.help ]
- - then
- - #first escape regexp special characters in the argument:
- - var=$(echo "$1"|sed 's/[][\/.^$*]/\\&/g')
- - #now pick out the right help text:
- - text=$(sed -n "/^$var[ ]*\$/,\${
- - /^$var[ ]*\$/d
- - /^#.*/d
- - /^[ ]*\$/q
- - s/^ //
- - p
- - }" Documentation/Configure.help)
- -
- - if [ -z "$text" ]
- - then
- - echo "There is no help available for this kernel option."
- - return 1
- - else
- - echo "$text"
- - fi
- - else
- - echo "There is no help available for this kernel option."
- - return 1
- - fi
- -}
- -
#
# Activate a help dialog.
#
function help () {
- - if extract_help $1 >help.out
+ if scripts/help extract $1 >help.out
then
$DIALOG --backtitle "$backtitle" --title "$2"\
--textbox help.out $ROWS $COLS
diff -ruN 2.1.82-pure/scripts/header.tk 2.1.82/scripts/header.tk
- --- 2.1.82-pure/scripts/header.tk Mon Jan 5 04:41:01 1998
+++ 2.1.82/scripts/header.tk Tue Jan 27 20:01:58 1998
@@ -350,45 +350,21 @@
catch {destroy $w}
toplevel $w -class Dialog

- - set filefound 0
set found 0
set lineno 0

- - if { [file readable Documentation/Configure.help] == 1} then {
- - set filefound 1
- - set message [exec sed -n "
- - /^$var\[ \]*\$/,\${
- - /^$var\[ \]*\$/c\\
- -${var}:\\
- -
- - /^#.*/d
- - /^\[ \]*\$/bL
- - H
- - }
- - d
- - :L x
- - s/\\n //
- - s/\\n / /g
- - p
- - q
- - " Documentation/Configure.help]
- - set found [expr [string length "$message"] > 0]
- - }
+ set message [exec scripts/help "extract $var"]
+ set found [expr [string length "$message"] > 0]

frame $w.f1

if { $found == 0 } then {
- - if { $filefound == 0 } then {
- - message $w.f1.m -width 750 -aspect 300 -relief flat -text \
- - "No help available - unable to open file Documentation/Configure.help. This file should have come with your kernel."
- - } else {
message $w.f1.m -width 400 -aspect 300 -relief flat -text \
"No help available for $var"
- - }
label $w.f1.bm -bitmap error
wm title $w "RTFM"
} else {
- - message $w.f1.m -width 400 -aspect 300 -text $message \
+ message $w.f1.m -width 600 -aspect 300 -text $message \
-relief flat
label $w.f1.bm -bitmap info
wm title $w "Configuration help"
diff -ruN 2.1.82-pure/scripts/help.c 2.1.82/scripts/help.c
- --- 2.1.82-pure/scripts/help.c Wed Dec 31 19:00:00 1969
+++ 2.1.82/scripts/help.c Wed Jan 28 13:05:23 1998
@@ -0,0 +1,257 @@
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <dirent.h>
+
+#define DEBUG
+#define doc_dir "Documentation"
+#define help_file doc_dir "/Configure.help"
+#define help_index doc_dir "/.help.index"
+#define help_dir doc_dir "/config"
+
+#define no_help_msg "There is no help available for the option."
+#ifdef DEBUG
+ int debug_level=0;
+ #define debug(dlevel,msg...) if(dlevel<=debug_level) fprintf(stderr,msg)
+#else
+ #define debug(dlevel,msg...)
+#endif
+#define print_error(frmt,msg...) fprintf(stderr,"%s: " frmt " %s\n",func_name , ## msg,sys_errlist[errno])
+
+int lof(int fd){
+ struct stat buf;
+
+ if(fstat(fd,&buf))
+ return -1;
+ else
+ return buf.st_size;
+
+}
+void help_add_to_index(const char *helpf,const char *indexf){
+ const char * func_name= "help_add_to_index";
+ int fd;
+
+ caddr_t hfile_mm;
+ FILE *ifile;
+ char * cur_off,*eol;
+ int start_off=0,end_off;
+ char * config_opt=NULL;
+ int mode=0,temp,fs;
+ char * temps;
+
+ debug(1,"adding file(%s) to index.\n",helpf);
+ if((fd=open(helpf,O_RDWR))!=-1){
+ fs=lof(fd);
+ if(((int)hfile_mm=mmap(0,fs,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0))!=-1){
+ if((int)(ifile=fopen(indexf,"a"))!=-1){
+
+ cur_off=hfile_mm;
+
+ while((cur_off-hfile_mm)<fs){
+ eol=memchr(cur_off,'\n',fs-(cur_off-hfile_mm));
+ *eol='\0';
+ if(strncasecmp(cur_off,"CONFIG",6)==0){
+ if(config_opt) free(config_opt);
+ temp=eol-cur_off+1;
+ config_opt=malloc(temp);
+ strncpy(config_opt,cur_off,temp);
+ start_off=eol+1-hfile_mm;
+ if((temps=index(config_opt,' ')))
+ *temps='\0';
+ mode=1;
+ }else
+ if((mode==1)&&(strlen(cur_off)==0)){
+ end_off=cur_off-1-hfile_mm;
+ mode=0;
+ fprintf(ifile,"%s %s %i %i\n",config_opt,helpf,(int)start_off,(int)end_off);
+ }
+ *eol='\n';
+ cur_off=eol+1;
+ }
+ fclose(ifile);
+ }else{
+ print_error("%s",indexf);
+ }
+ munmap((void*)hfile_mm,lof(fd));
+ }else{
+ print_error("mmap %s",helpf);
+ }
+ close(fd);
+ }else{
+ print_error("%s",helpf);
+ }
+
+}
+void help_extract(const char *indexf,const char *token){
+ const char * func_name= "help_extract";
+ int fs,fd;
+ caddr_t hfile_mm,ifile_mm;
+
+ char * start_off,*end_off;
+ int start_off_i,end_off_i;
+ int temp;
+ char * temps,*temps2;
+
+ if((fd=open(indexf,O_RDWR))!=-1){
+ errno=0;
+ fs=lof(fd);
+ if((int)(ifile_mm=mmap(0,fs,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0))!=-1){
+ temps=malloc(temp=strlen(token)+2);
+ strcpy(temps,token);
+ strcat(temps," ");
+ if((temps2=strstr(ifile_mm,temps))){
+ char * helpf,*savef=NULL;
+ int fs,fd,need_open=1;
+
+ helpf=strstr(temps2+1," ")+1;
+ start_off=strstr(helpf+1," ")+1;
+ end_off=strstr(start_off+1," ")+1;
+ start_off_i=atol(start_off);
+ end_off_i=atol(end_off);
+
+ *(start_off-1)='\0';
+ if(savef){
+ if(strcmp(savef,helpf)){
+ munmap((void*)hfile_mm,lof(fd));
+ close(fd);
+ need_open=1;
+ }
+ }
+ if(need_open){
+ fd=open(helpf,O_RDWR);
+ errno=0;
+ fs=lof(fd);
+ hfile_mm=mmap(0,fs,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0);
+ if(errno) fprintf(stderr,"The was an error mmap'ing\n");
+
+ need_open=0;
+ }
+ temps=malloc(temp=end_off_i-start_off_i+2);
+ temps2=hfile_mm+start_off_i;
+ strncpy(temps,temps2,temp-1);
+ printf(temps);
+
+ if(savef==NULL){
+ savef=malloc(strlen(helpf)+1);
+ strcpy(savef,helpf);
+ }
+ *(start_off-1)=' ';
+ }else
+ printf(no_help_msg);
+ munmap((void*)ifile_mm,fs);
+ }else
+ print_error("mmap %s",indexf);
+ close(fd);
+ }else
+ print_error("%s",indexf);
+}
+void help_add_dir_to_index(const char *dir,const char *indexf){
+ const char * func_name= "help_add_dir_to_index";
+ DIR *dirh;
+ struct dirent * dire;
+ char *tempname;
+
+ debug(1,"adding dir(%s) to index.\n",dir);
+ tempname=malloc(256+strlen(dir)+1);
+ if((dirh=opendir(dir))){
+ struct stat buf;
+ while((dire=readdir(dirh))){
+ strcpy(tempname,dir);
+ strcat(tempname,"/");
+ strcat(tempname,dire->d_name);
+ stat(tempname,&buf);
+ if(S_ISREG(buf.st_mode))
+ help_add_to_index(tempname,help_index);
+ }
+ closedir(dirh);
+ }else
+ print_error("closedir %s",dir);
+
+}
+void help_make_index(int argc,const char * argv[],int c){
+ struct stat buf;
+ int count=c;
+
+ help_add_to_index(help_file,help_index);
+ help_add_dir_to_index(help_dir,help_index);
+
+ while(count<argc){
+ stat(argv[count],&buf);
+ if(S_ISDIR(buf.st_mode))
+ help_add_dir_to_index(argv[count],help_index);
+ else
+ if(S_ISREG(buf.st_mode))
+ help_add_to_index(argv[count],help_index);
+ count++;
+ }
+}
+void help_clean(const char *indexf){
+ const char * func_name= "help_make_index";
+
+ if((unlink(indexf))==-1)
+ print_error("unlink %s",indexf);
+}
+int main(int argc,const char * argv[]){
+ const char * func_name= "main";
+ int c=1;
+
+ if((argc==0))
+ exit(0);
+#ifdef DEBUG
+ while((c <argc)&&(strcmp(argv[c],"debug")==0)){
+ debug_level++;c++;
+ }
+#endif
+ if((strcmp(argv[c],"clean")==0)){
+ help_clean(help_index);
+ return 0;
+ }
+ if((strcmp(argv[c],"add")==0)){
+ help_make_index(argc,argv,c+1);
+ return 0;
+ }
+ if((strcmp(argv[c],"index")==0)){
+ help_clean(help_index);
+ help_make_index(argc,argv,c+1);
+ return 0;
+ }
+ if((strcmp(argv[c],"extract")==0)){
+ struct stat buf;
+ int count=c+1;
+
+ if(stat(help_index,&buf)){
+ if(errno==ENOENT)
+ help_make_index(0,NULL,argc);
+ else
+ print_error("error:index file");
+ }
+ while(count<argc){
+ help_extract(help_index,argv[count]);
+ count++;
+ printf("\n");
+ }
+ return 0;
+ }
+ fprintf(stderr,"Unknown command.\n");
+ fprintf(stderr,"\n");
+ fprintf(stderr,"usage: %s [debug ...] <command> [<opt>]\n",argv[0]);
+ fprintf(stderr,"\n");
+ fprintf(stderr," clean \n");
+ fprintf(stderr," add file-to-add ...\n");
+ fprintf(stderr," index file-to-add ...\n");
+ fprintf(stderr," extract var ...\n");
+#ifdef DEBUG
+ fprintf(stderr," debug increase debugging level\n");
+#endif
+ fprintf(stderr,"\n");
+ fprintf(stderr,"Where\n");
+ fprintf(stderr," file-to-add either a directory or a file.\n");
+ fprintf(stderr," var a CONFIG_* name.\n");
+ fprintf(stderr,"\n");
+}

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

End of linux-kernel-digest V1 #1538
***********************************

To subscribe to linux-kernel-digest, send the command:

subscribe linux-kernel-digest

in the body of a message to "Majordomo@Majordomo.vger.rutgers.edu". If you want
to subscribe something other than the account the mail is coming from,
such as a local redistribution list, then append that address to the
"subscribe" command; for example, to subscribe "local-linux-kernel":

subscribe linux-kernel-digest local-linux-kernel@your.domain.net

A non-digest (direct mail) version of this list is also available; to
subscribe to that instead, replace all instances of "linux-kernel-digest"
in the commands above with "linux-kernel".