Commit b5341f73 authored by Linus Torvalds's avatar Linus Torvalds

[PATCH] Linux-0.99.5 (February 9, 1993)

net-1: more fixes, use bottom halves for transmitting, more "volatiles"
to hide bugs. /proc interfaces for networking.

Side note: it took networking a _long_ time to recover from the
volatiles.  Getting the locking right rather than trying to make the
compiler make races smaller was a hard idea to get through.

Bill Metzenthen moves his math emulator to "beta 1.0" status.

Fred van Kempen shows up: starting to do a SLIP line discipline for tty
devices.

Verify FP exception handling.

[Original announcement below]

        "He's done it yet again - doesn't he ever rest?"
                        - anonymous linux kernel hacker

Only complete newbies don't know what this is all about, but I'd better
tell you anyway: patchlevel 5 of the 0.99 kernel is now available on
nic.funet.fi (pub/OS/Linux/PEOPLE/Linus) as both context diffs against
pl4 and complete source code.  I'm not even going to speculate on 1.0
right now.

The pl5 diffs are about 90kB compressed: the major changes are to the
tcp/ip code and the serial driver, while there are various minor fixes
strewn around the system:

 - serial lines/tty changes (tytso & Fred v Kempen)
 - NFS bugfixes (Rick Sladkey)
 - tcp/ip (Ross Biro)
 - coprocessor handling changes (me)
 - harddisk driver error handling (Mika Liljeberg)
 - various minor patches (me and others)

Serial lines now implement non-blocking opens correctly and support
dial-out lines (same minor, major==5).  I changed the default startup
mode to be CLOCAL so that people won't get confused by the modem line
code when not using dial-in.

Another interesting change is the 387 error-coupling tests at bootup:
the code to check if the intel-recommended exception 16 error reporting
is present is "non-obvious".  If you have had problems with coprocessor
error handling, or have a non-intel coprocessor, I'd suggest you test
this out: I'd like to hear about problems/successes.

                Linus

PS.  If you tested out the latest ALPHA-diffs (the ones that already
changed the kernel version to pl5), the changes to the final pl5 were
only cosmetic.
parent c9e69190
#
# Automatically generated make config: don't edit
#
#
# General setup
#
CONFIG_BLK_DEV_HD = CONFIG_BLK_DEV_HD
CONFIG_TCPIP = CONFIG_TCPIP
CONFIG_MAX_16M = CONFIG_MAX_16M
CONFIG_M486 = CONFIG_M486
#
# SCSI support
#
#
# SCSI support type (disk, tape, CDrom)
#
#
# SCSI low-level drivers
#
#
# Filesystems
#
CONFIG_MINIX_FS = CONFIG_MINIX_FS
CONFIG_PROC_FS = CONFIG_PROC_FS
#
# Various character device drivers..
#
init/main.o : init/main.c /usr/lib/gcc-lib/i386-linux/2.3.2/include/stdarg.h /usr/include/asm/system.h \
/usr/include/asm/io.h /usr/include/linux/mktime.h /usr/include/linux/types.h \
/usr/include/linux/fcntl.h /usr/include/linux/config.h /usr/include/linux/autoconf.h \
/usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h /usr/include/linux/kernel.h \
/usr/include/linux/signal.h /usr/include/linux/time.h /usr/include/linux/param.h \
/usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \
/usr/include/linux/tty.h /usr/include/linux/termios.h /usr/include/linux/unistd.h \
/usr/include/linux/string.h
all: Version Image
.EXPORT_ALL_VARIABLES:
#
# Make "config" the default target if there is no configuration file or
# "depend" the target if there is no top-level dependency information.
......@@ -145,7 +147,7 @@ tools/./version.h: tools/version.h
tools/version.h: $(CONFIGURE) Makefile
@./makever.sh
@echo \#define UTS_RELEASE \"0.99.pl4-`cat .version`\" > tools/version.h
@echo \#define UTS_RELEASE \"0.99.pl5-`cat .version`\" > tools/version.h
@echo \#define UTS_VERSION \"`date +%D`\" >> tools/version.h
@echo \#define LINUX_COMPILE_TIME \"`date +%T`\" >> tools/version.h
@echo \#define LINUX_COMPILE_BY \"`whoami`\" >> tools/version.h
......
......@@ -436,10 +436,11 @@ noevrx: lea si,idgenoa ! Check Genoa 'clues'
l1: inc si
inc di
mov al,(si)
test al,al
jz l2
seg es
and al,(di)
cmp al,(si)
loope l1
cmp al,(di)
l2: loope l1
cmp cx,#0x00
jne nogen
lea si,dscgenoa
......@@ -697,7 +698,7 @@ msg3: .ascii "Choose mode by pressing the corresponding number."
idati: .ascii "761295520"
idcandt: .byte 0xa5
idgenoa: .byte 0x77, 0x00, 0x66, 0x99
idgenoa: .byte 0x77, 0x00, 0x99, 0x66
idparadise: .ascii "VGA="
idoakvga: .ascii "OAK VGA "
idf1280: .ascii "Orchid Technology Fahrenheit 1280"
......
......@@ -35,7 +35,7 @@ Adaptec AHA1740 support
CONFIG_SCSI_AHA1740 y/n y
Future Domain SCSI support
CONFIG_SCSI_FUTURE_DOMAIN y/n y
Seagate ST-02 SCSI support
Seagate ST-02 and Future Domain TMC-8xx SCSI support
CONFIG_SCSI_SEAGATE y/n y
UltraStor SCSI support
CONFIG_SCSI_ULTRASTOR y/n y
......@@ -49,7 +49,7 @@ CONFIG_MINIX_FS y/n y
Extended fs support
CONFIG_EXT_FS y/n n
msdos fs support
CONFIG_MSDOS_FS y/n n
CONFIG_MSDOS_FS y/n y
/proc filesystem support
CONFIG_PROC_FS y/n y
NFS filesystem support
......
This diff is collapsed.
......@@ -45,6 +45,7 @@ static struct wait_queue * buffer_wait = NULL;
int nr_buffers = 0;
int buffermem = 0;
int nr_buffer_heads = 0;
static int min_free_pages = 20; /* nr free pages needed before buffer grows */
/*
* Rewrote the wait-routines to use the "new" wait-queue functionality,
......@@ -305,6 +306,7 @@ struct buffer_head * getblk(dev_t dev, int block, int size)
{
struct buffer_head * bh, * tmp;
int buffers;
static int grow_size = 0;
repeat:
bh = get_hash_table(dev, block, size);
......@@ -313,10 +315,13 @@ struct buffer_head * getblk(dev_t dev, int block, int size)
put_last_free(bh);
return bh;
}
if (nr_free_pages > 30 && buffermem < 6*1024*1024)
grow_size -= size;
if (nr_free_pages > min_free_pages &&
buffermem < 6*1024*1024 &&
grow_size <= 0) {
grow_buffers(size);
grow_size = 4096;
}
buffers = nr_buffers;
bh = NULL;
......@@ -431,8 +436,8 @@ void bread_page(unsigned long address, dev_t dev, int b[4])
} else
bh[i] = NULL;
if(bhnum)
ll_rw_block(READ, bhnum, bhr);
if (bhnum)
ll_rw_block(READ, bhnum, bhr);
for (i=0 ; i<4 ; i++,address += BLOCK_SIZE)
if (bh[i]) {
......@@ -664,6 +669,10 @@ void buffer_init(void)
{
int i;
if (high_memory >= 4*1024*1024)
min_free_pages = 200;
else
min_free_pages = 20;
for (i = 0 ; i < NR_HASH ; i++)
hash_table[i] = NULL;
free_list = 0;
......
blkdev.o : blkdev.c /usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/ext_fs.h /usr/include/linux/tty.h \
/usr/include/linux/termios.h /usr/include/asm/system.h /usr/include/linux/stat.h \
/usr/include/linux/fcntl.h /usr/include/linux/errno.h
chrdev.o : chrdev.c /usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/ext_fs.h /usr/include/linux/tty.h \
/usr/include/linux/termios.h /usr/include/asm/system.h /usr/include/linux/stat.h \
/usr/include/linux/fcntl.h /usr/include/linux/errno.h
dir.o : dir.c /usr/include/asm/segment.h /usr/include/linux/errno.h /usr/include/linux/kernel.h \
/usr/include/linux/fs.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/ext_fs.h /usr/include/linux/stat.h
fifo.o : fifo.c /usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/ext_fs.h
file.o : file.c /usr/include/asm/segment.h /usr/include/asm/system.h /usr/include/linux/sched.h \
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h /usr/include/linux/kernel.h \
/usr/include/linux/signal.h /usr/include/linux/time.h /usr/include/linux/param.h \
/usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \
/usr/include/linux/ext_fs.h /usr/include/linux/errno.h /usr/include/linux/fcntl.h \
/usr/include/linux/stat.h /usr/include/linux/locks.h
freelists.o : freelists.c /usr/include/linux/sched.h /usr/include/linux/head.h \
/usr/include/linux/fs.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/signal.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/ext_fs.h \
/usr/include/linux/stat.h /usr/include/linux/string.h /usr/include/linux/locks.h
inode.o : inode.c /usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/ext_fs.h /usr/include/linux/string.h \
/usr/include/linux/stat.h /usr/include/linux/locks.h /usr/include/asm/system.h \
/usr/include/asm/segment.h
namei.o : namei.c /usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/ext_fs.h /usr/include/linux/string.h \
/usr/include/linux/stat.h /usr/include/linux/fcntl.h /usr/include/linux/errno.h \
/usr/include/asm/segment.h
symlink.o : symlink.c /usr/include/asm/segment.h /usr/include/linux/errno.h \
/usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/ext_fs.h /usr/include/linux/stat.h
truncate.o : truncate.c /usr/include/linux/sched.h /usr/include/linux/head.h \
/usr/include/linux/fs.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/signal.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/ext_fs.h \
/usr/include/linux/tty.h /usr/include/linux/termios.h /usr/include/asm/system.h \
/usr/include/linux/stat.h /usr/include/linux/fcntl.h /usr/include/linux/errno.h
......@@ -48,8 +48,10 @@ void ext_free_block(struct super_block * sb, int block)
struct buffer_head * bh;
struct ext_free_block * efb;
if (!sb)
panic("trying to free block on nonexistent device");
if (!sb) {
printk("trying to free block on non-existent device\n");
return;
}
lock_super (sb);
if (block < sb->u.ext_sb.s_firstdatazone ||
block >= sb->u.ext_sb.s_nzones) {
......@@ -91,8 +93,10 @@ int ext_new_block(struct super_block * sb)
struct ext_free_block * efb;
int j;
if (!sb)
panic("trying to get new block from nonexistant device");
if (!sb) {
printk("trying to get new block from non-existent device\n");
return 0;
}
if (!sb->u.ext_sb.s_firstfreeblock)
return 0;
lock_super (sb);
......@@ -118,15 +122,16 @@ printk("ext_new_block: block empty, skipping to %d\n", efb->next);
}
if (j < sb->u.ext_sb.s_firstdatazone || j > sb->u.ext_sb.s_nzones) {
printk ("ext_new_block: blk = %d\n", j);
panic ("allocating block not in data zone\n");
printk("allocating block not in data zone\n");
return 0;
}
sb->u.ext_sb.s_freeblockscount --;
sb->s_dirt = 1;
if (!(bh=getblk(sb->s_dev, j, sb->s_blocksize)))
panic("new_block: cannot get block");
if (bh->b_count != 1)
panic("new block: count is != 1");
if (!(bh=getblk(sb->s_dev, j, sb->s_blocksize))) {
printk("new_block: cannot get block");
return 0;
}
clear_block(bh->b_data);
bh->b_uptodate = 1;
bh->b_dirt = 1;
......@@ -194,12 +199,12 @@ void ext_free_inode(struct inode * inode)
return;
}
if (!inode->i_sb) {
printk("free_inode: inode on nonexistent device\n");
printk("free_inode: inode on non-existent device\n");
return;
}
lock_super (inode->i_sb);
if (inode->i_ino < 1 || inode->i_ino > inode->i_sb->u.ext_sb.s_ninodes) {
printk("free_inode: inode 0 or nonexistent inode\n");
printk("free_inode: inode 0 or non-existent inode\n");
unlock_super (inode->i_sb);
return;
}
......
......@@ -129,11 +129,11 @@ static void read_inode(struct inode * inode)
* NFS uses this to get the authentication correct. -- jrs
*/
int notify_change(struct inode * inode)
int notify_change(int flags, struct inode * inode)
{
if (inode->i_sb && inode->i_sb->s_op &&
inode->i_sb->s_op->notify_change)
return inode->i_sb->s_op->notify_change(inode);
return inode->i_sb->s_op->notify_change(flags, inode);
return 0;
}
......
......@@ -40,9 +40,10 @@ static int file_ioctl(struct file *filp,unsigned int cmd,unsigned long arg)
put_fs_long(filp->f_inode->i_size - filp->f_pos,
(long *) arg);
return 0;
default:
return -EINVAL;
}
if (filp->f_op && filp->f_op->ioctl)
return filp->f_op->ioctl(filp->f_inode, filp, cmd,arg);
return -EINVAL;
}
......
blkdev.o : blkdev.c /usr/include/linux/errno.h /usr/include/linux/sched.h /usr/include/linux/head.h \
/usr/include/linux/fs.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/signal.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/iso_fs.h \
/usr/include/linux/tty.h /usr/include/linux/termios.h /usr/include/asm/system.h \
/usr/include/linux/stat.h /usr/include/linux/fcntl.h
chrdev.o : chrdev.c /usr/include/linux/errno.h /usr/include/linux/sched.h /usr/include/linux/head.h \
/usr/include/linux/fs.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/signal.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/iso_fs.h \
/usr/include/linux/tty.h /usr/include/linux/termios.h /usr/include/asm/system.h \
/usr/include/linux/stat.h /usr/include/linux/fcntl.h
dir.o : dir.c /usr/include/linux/errno.h /usr/include/asm/segment.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/iso_fs.h \
/usr/include/linux/kernel.h /usr/include/linux/stat.h /usr/include/linux/string.h \
/usr/include/linux/mm.h
fifo.o : fifo.c /usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/iso_fs.h
file.o : file.c /usr/include/asm/segment.h /usr/include/asm/system.h /usr/include/linux/sched.h \
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h /usr/include/linux/kernel.h \
/usr/include/linux/signal.h /usr/include/linux/time.h /usr/include/linux/param.h \
/usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \
/usr/include/linux/iso_fs.h /usr/include/linux/fcntl.h /usr/include/linux/errno.h \
/usr/include/linux/stat.h /usr/include/linux/locks.h
inode.o : inode.c /usr/include/linux/config.h /usr/include/linux/autoconf.h \
/usr/include/linux/stat.h /usr/include/linux/sched.h /usr/include/linux/head.h \
/usr/include/linux/fs.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/signal.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/iso_fs.h \
/usr/include/linux/string.h /usr/include/linux/locks.h /usr/include/asm/system.h \
/usr/include/asm/segment.h /usr/include/linux/errno.h
namei.o : namei.c /usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/iso_fs.h /usr/include/linux/string.h \
/usr/include/linux/stat.h /usr/include/linux/fcntl.h /usr/include/asm/segment.h \
/usr/include/linux/errno.h
rock.o : rock.c /usr/include/linux/config.h /usr/include/linux/autoconf.h /usr/include/linux/stat.h \
/usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/iso_fs.h /usr/include/linux/string.h \
rock.h
symlink.o : symlink.c /usr/include/asm/segment.h /usr/include/linux/errno.h \
/usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/iso_fs.h /usr/include/linux/stat.h
util.o : util.c
......@@ -214,11 +214,7 @@ static int isofs_file_read(struct inode * inode, struct file * filp, char * buf,
if (*bhe) {/* test for valid buffer */
wait_on_buffer(*bhe);
if (!(*bhe)->b_uptodate) {
do {
brelse(*bhe);
if (++bhe == &buflist[NBUF])
bhe = buflist;
} while (bhe != bhb);
left = 0;
break;
}
}
......
......@@ -191,7 +191,8 @@ static int copy_flock(struct file *filp, struct file_lock *fl, struct flock *l)
return 0;
if (!S_ISREG(filp->f_inode->i_mode))
return 0;
if (l->l_type != F_UNLCK && l->l_type != F_RDLCK && l->l_type != F_WRLCK)
if (l->l_type != F_UNLCK && l->l_type != F_RDLCK && l->l_type != F_WRLCK
&& l->l_type != F_SHLCK && l->l_type != F_EXLCK)
return 0;
switch (l->l_whence) {
case 0 /*SEEK_SET*/ : start = 0; break;
......
bitmap.o : bitmap.c /usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/minix_fs.h /usr/include/linux/stat.h \
/usr/include/linux/string.h
blkdev.o : blkdev.c /usr/include/linux/errno.h /usr/include/linux/sched.h /usr/include/linux/head.h \
/usr/include/linux/fs.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/signal.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/minix_fs.h \
/usr/include/linux/tty.h /usr/include/linux/termios.h /usr/include/asm/system.h \
/usr/include/linux/stat.h /usr/include/linux/fcntl.h
chrdev.o : chrdev.c /usr/include/linux/errno.h /usr/include/linux/sched.h /usr/include/linux/head.h \
/usr/include/linux/fs.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/signal.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/minix_fs.h \
/usr/include/linux/tty.h /usr/include/linux/termios.h /usr/include/asm/system.h \
/usr/include/linux/stat.h /usr/include/linux/fcntl.h
dir.o : dir.c /usr/include/asm/segment.h /usr/include/linux/errno.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/minix_fs.h \
/usr/include/linux/stat.h
fifo.o : fifo.c /usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/minix_fs.h
file.o : file.c /usr/include/asm/segment.h /usr/include/asm/system.h /usr/include/linux/sched.h \
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h /usr/include/linux/kernel.h \
/usr/include/linux/signal.h /usr/include/linux/time.h /usr/include/linux/param.h \
/usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \
/usr/include/linux/minix_fs.h /usr/include/linux/errno.h /usr/include/linux/fcntl.h \
/usr/include/linux/stat.h /usr/include/linux/locks.h
inode.o : inode.c /usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/minix_fs.h /usr/include/linux/string.h \
/usr/include/linux/stat.h /usr/include/linux/locks.h /usr/include/asm/system.h \
/usr/include/asm/segment.h
namei.o : namei.c /usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/minix_fs.h /usr/include/linux/string.h \
/usr/include/linux/stat.h /usr/include/linux/fcntl.h /usr/include/linux/errno.h \
/usr/include/asm/segment.h
symlink.o : symlink.c /usr/include/asm/segment.h /usr/include/linux/errno.h \
/usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/minix_fs.h /usr/include/linux/stat.h
truncate.o : truncate.c /usr/include/linux/errno.h /usr/include/linux/sched.h \
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h /usr/include/linux/kernel.h \
/usr/include/linux/signal.h /usr/include/linux/time.h /usr/include/linux/param.h \
/usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \
/usr/include/linux/minix_fs.h /usr/include/linux/tty.h /usr/include/linux/termios.h \
/usr/include/asm/system.h /usr/include/linux/stat.h /usr/include/linux/fcntl.h
......@@ -102,7 +102,7 @@ int minix_new_block(struct super_block * sb)
int i,j;
if (!sb) {
printk("trying to get new block from nonexistant device\n");
printk("trying to get new block from nonexistent device\n");
return 0;
}
repeat:
......@@ -126,10 +126,6 @@ int minix_new_block(struct super_block * sb)
printk("new_block: cannot get block");
return 0;
}
if (bh->b_count != 1) {
printk("new block: count is != 1");
return 0;
}
clear_block(bh->b_data);
bh->b_uptodate = 1;
bh->b_dirt = 1;
......
dir.o : dir.c /usr/include/asm/segment.h /usr/include/linux/sched.h /usr/include/linux/head.h \
/usr/include/linux/fs.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/signal.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/msdos_fs.h \
/usr/include/linux/errno.h /usr/include/linux/stat.h
fat.o : fat.c /usr/include/linux/msdos_fs.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/kernel.h /usr/include/linux/errno.h \
/usr/include/linux/stat.h
file.o : file.c /usr/include/asm/segment.h /usr/include/asm/system.h /usr/include/linux/sched.h \
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h /usr/include/linux/kernel.h \
/usr/include/linux/signal.h /usr/include/linux/time.h /usr/include/linux/param.h \
/usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \
/usr/include/linux/msdos_fs.h /usr/include/linux/errno.h /usr/include/linux/fcntl.h \
/usr/include/linux/stat.h
inode.o : inode.c /usr/include/linux/msdos_fs.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/kernel.h /usr/include/linux/sched.h \
/usr/include/linux/head.h /usr/include/linux/mm.h /usr/include/linux/signal.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/errno.h \
/usr/include/linux/string.h /usr/include/linux/ctype.h /usr/include/linux/stat.h \
/usr/include/linux/locks.h /usr/include/asm/segment.h
misc.o : misc.c /usr/include/linux/msdos_fs.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/sched.h /usr/include/linux/head.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/signal.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/errno.h \
/usr/include/linux/string.h /usr/include/linux/stat.h
namei.o : namei.c /usr/include/asm/segment.h /usr/include/linux/sched.h /usr/include/linux/head.h \
/usr/include/linux/fs.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/signal.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/msdos_fs.h \
/usr/include/linux/errno.h /usr/include/linux/string.h /usr/include/linux/stat.h
This diff is collapsed.
......@@ -577,8 +577,10 @@ static int nfs_rename(struct inode *old_dir, const char *old_name, int old_len,
error = nfs_proc_rename(NFS_SERVER(old_dir),
NFS_FH(old_dir), old_filename,
NFS_FH(new_dir), new_filename);
if (!error)
if (!error) {
nfs_lookup_cache_remove(old_dir, NULL, old_filename);
nfs_lookup_cache_remove(new_dir, NULL, new_filename);
}
iput(old_dir);
iput(new_dir);
return error;
......
......@@ -58,6 +58,7 @@ static int nfs_file_read(struct inode *inode, struct file *file, char *buf,
int n;
struct nfs_fattr fattr;
char *data;
off_t pos;
if (!inode) {
printk("nfs_file_read: inode = NULL\n");
......@@ -68,8 +69,9 @@ static int nfs_file_read(struct inode *inode, struct file *file, char *buf,
inode->i_mode);
return -EINVAL;
}
pos = file->f_pos;
if (file->f_pos + count > inode->i_size)
count = inode->i_size - file->f_pos;
count = inode->i_size - pos;
if (count <= 0)
return 0;
n = NFS_SERVER(inode)->rsize;
......@@ -79,19 +81,20 @@ static int nfs_file_read(struct inode *inode, struct file *file, char *buf,
if (hunk > n)
hunk = n;
result = nfs_proc_read(NFS_SERVER(inode), NFS_FH(inode),
file->f_pos, hunk, data, &fattr);
pos, hunk, data, &fattr);
if (result < 0) {
kfree_s(data, n);
return result;
}
memcpy_tofs(buf, data, result);
file->f_pos += result;
pos += result;
buf += result;
if (result < n) {
i += result;
break;
}
}
file->f_pos = pos;
kfree_s(data, n);
nfs_refresh_inode(inode, &fattr);
return i;
......@@ -106,6 +109,7 @@ static int nfs_file_write(struct inode *inode, struct file *file, char *buf,
int n;
struct nfs_fattr fattr;
char *data;
int pos;
if (!inode) {
printk("nfs_file_write: inode = NULL\n");
......@@ -118,8 +122,9 @@ static int nfs_file_write(struct inode *inode, struct file *file, char *buf,
}
if (count <= 0)
return 0;
pos = file->f_pos;
if (file->f_flags & O_APPEND)
file->f_pos = inode->i_size;
pos = inode->i_size;
n = NFS_SERVER(inode)->wsize;
data = (char *) kmalloc(n, GFP_KERNEL);
for (i = 0; i < count; i += n) {
......@@ -128,18 +133,19 @@ static int nfs_file_write(struct inode *inode, struct file *file, char *buf,
hunk = n;
memcpy_fromfs(data, buf, hunk);
result = nfs_proc_write(NFS_SERVER(inode), NFS_FH(inode),
file->f_pos, hunk, data, &fattr);
pos, hunk, data, &fattr);
if (result < 0) {
kfree_s(data, n);
return result;
}
file->f_pos += hunk;
pos += hunk;
buf += hunk;
if (hunk < n) {
i += hunk;
break;
}
}
file->f_pos = pos;
kfree_s(data, n);
nfs_refresh_inode(inode, &fattr);
return i;
......
......@@ -20,7 +20,7 @@
extern int close_fp(struct file *filp);
static int nfs_notify_change(struct inode *);
static int nfs_notify_change(int, struct inode *);
static void nfs_put_super(struct super_block *);
static void nfs_statfs(struct super_block *, struct statfs *);
......@@ -125,8 +125,7 @@ void nfs_statfs(struct super_block *sb, struct statfs *buf)
error = nfs_proc_statfs(&sb->u.nfs_sb.s_server, &sb->u.nfs_sb.s_root,
&res);
if (error) {
if (error != -EINTR)
printk("nfs_statfs: statfs error = %d\n", -error);
printk("nfs_statfs: statfs error = %d\n", -error);
res.bsize = res.blocks = res.bfree = res.bavail = 0;
}
put_fs_long(res.bsize, &buf->f_bsize);
......@@ -181,20 +180,36 @@ struct inode *nfs_fhget(struct super_block *sb, struct nfs_fh *fhandle,
return inode;
}
int nfs_notify_change(struct inode *inode)
int nfs_notify_change(int flags, struct inode *inode)
{
struct nfs_sattr sattr;
struct nfs_fattr fattr;
int error;
sattr.mode = inode->i_mode;
sattr.uid = inode->i_uid;
sattr.gid = inode->i_gid;
sattr.size = S_ISREG(inode->i_mode) ? inode->i_size : -1;
sattr.mtime.seconds = inode->i_mtime;
sattr.mtime.useconds = 0;
sattr.atime.seconds = inode->i_atime;
sattr.atime.useconds = 0;
if (flags & NOTIFY_MODE)
sattr.mode = inode->i_mode;
else
sattr.mode = -1;
if (flags & NOTIFY_UIDGID) {
sattr.uid = inode->i_uid;
sattr.gid = inode->i_gid;
}
else
sattr.uid = sattr.gid = -1;
if (flags & NOTIFY_SIZE)
sattr.size = S_ISREG(inode->i_mode) ? inode->i_size : -1;
else
sattr.size = -1;
if (flags & NOTIFY_TIME) {
sattr.mtime.seconds = inode->i_mtime;
sattr.mtime.useconds = 0;
sattr.atime.seconds = inode->i_atime;
sattr.atime.useconds = 0;
}
else {
sattr.mtime.seconds = sattr.mtime.useconds = -1;
sattr.atime.seconds = sattr.atime.useconds = -1;
}
error = nfs_proc_setattr(NFS_SERVER(inode), NFS_FH(inode),
&sattr, &fattr);
if (!error)
......
......@@ -26,9 +26,8 @@
#include <netinet/in.h>
static int proc_debug = 0;
#ifdef NFS_PROC_DEBUG
static int proc_debug = 0;
#define PRINTK if (proc_debug) printk
#else
#define PRINTK if (0) printk
......@@ -70,11 +69,13 @@ static inline int *xdr_encode_string(int *p, char *string)
return p;
}
static inline int *xdr_decode_string(int *p, char *string)
static inline int *xdr_decode_string(int *p, char *string, int maxlen)
{
int len;
unsigned int len;
len = ntohl(*p++);
if (len > maxlen)
return NULL;
memcpy(string, (char *) p, len);
string[len] = '\0';
p += (len + 3) >> 2;
......@@ -93,11 +94,13 @@ static inline int *xdr_encode_data(int *p, char *data, int len)
return p;
}
static inline int *xdr_decode_data(int *p, char *data, int *lenp)
static inline int *xdr_decode_data(int *p, char *data, int *lenp, int maxlen)
{
int len;
unsigned int len;
len = *lenp = ntohl(*p++);
if (len > maxlen)
return NULL;
memcpy(data, (char *) p, len);
data[len] = '\0';
p += (len + 3) >> 2;
......@@ -142,7 +145,8 @@ static int *xdr_encode_sattr(int *p, struct nfs_sattr *sattr)
static int *xdr_decode_entry(int *p, struct nfs_entry *entry)
{
entry->fileid = ntohl(*p++);
p = xdr_decode_string(p, entry->name);
if (!(p = xdr_decode_string(p, entry->name, NFS_MAXNAMLEN)))
return NULL;
entry->cookie = ntohl(*p++);
entry->eof = 0;
return p;
......@@ -178,6 +182,8 @@ int nfs_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
p = xdr_decode_fattr(p, fattr);
PRINTK("NFS reply getattr\n");
}
else
PRINTK("NFS reply getattr failed = %d\n", status);
free_page((long) p0);
return -nfs_stat_to_errno(status);
}
......@@ -203,6 +209,8 @@ int nfs_proc_setattr(struct nfs_server *server, struct nfs_fh *fhandle,
p = xdr_decode_fattr(p, fattr);
PRINTK("NFS reply setattr\n");
}
else
PRINTK("NFS reply setattr failed = %d\n", status);
free_page((long) p0);
return -nfs_stat_to_errno(status);
}
......@@ -233,6 +241,8 @@ int nfs_proc_lookup(struct nfs_server *server, struct nfs_fh *dir, char *name,
p = xdr_decode_fattr(p, fattr);
PRINTK("NFS reply lookup\n");
}
else
PRINTK("NFS reply lookup failed = %d\n", status);
free_page((long) p0);
return -nfs_stat_to_errno(status);
}
......@@ -254,9 +264,15 @@ int nfs_proc_readlink(struct nfs_server *server, struct nfs_fh *fhandle,
if (!(p = nfs_rpc_verify(p0)))
status = NFSERR_IO;
else if ((status = ntohl(*p++)) == NFS_OK) {
p = xdr_decode_string(p, res);
PRINTK("NFS reply readlink %s\n", res);
}
if (!(p = xdr_decode_string(p, res, NFS_MAXPATHLEN))) {
printk("nfs_proc_readlink: giant pathname\n");
status = NFSERR_IO;
}
else
PRINTK("NFS reply readlink %s\n", res);
}
else
PRINTK("NFS reply readlink failed = %d\n", status);
free_page((long) p0);
return -nfs_stat_to_errno(status);
}
......@@ -283,9 +299,15 @@ int nfs_proc_read(struct nfs_server *server, struct nfs_fh *fhandle,
status = NFSERR_IO;
else if ((status = ntohl(*p++)) == NFS_OK) {
p = xdr_decode_fattr(p, fattr);
p = xdr_decode_data(p, data, &len);
PRINTK("NFS reply read %d\n", len);
}
if (!(p = xdr_decode_data(p, data, &len, count))) {
printk("nfs_proc_read: giant data size\n");
status = NFSERR_IO;
}
else
PRINTK("NFS reply read %d\n", len);
}
else
PRINTK("NFS reply read failed = %d\n", status);
free_page((long) p0);
return (status == NFS_OK) ? len : -nfs_stat_to_errno(status);
}
......@@ -314,6 +336,8 @@ int nfs_proc_write(struct nfs_server *server, struct nfs_fh *fhandle,
p = xdr_decode_fattr(p, fattr);
PRINTK("NFS reply write\n");
}
else
PRINTK("NFS reply write failed = %d\n", status);
free_page((long) p0);
return -nfs_stat_to_errno(status);
}
......@@ -342,6 +366,8 @@ int nfs_proc_create(struct nfs_server *server, struct nfs_fh *dir,
p = xdr_decode_fattr(p, fattr);
PRINTK("NFS reply create\n");
}
else
PRINTK("NFS reply create failed = %d\n", status);
free_page((long) p0);
return -nfs_stat_to_errno(status);
}
......@@ -365,6 +391,8 @@ int nfs_proc_remove(struct nfs_server *server, struct nfs_fh *dir, char *name)
else if ((status = ntohl(*p++)) == NFS_OK) {
PRINTK("NFS reply remove\n");
}
else
PRINTK("NFS reply remove failed = %d\n", status);
free_page((long) p0);
return -nfs_stat_to_errno(status);
}
......@@ -392,6 +420,8 @@ int nfs_proc_rename(struct nfs_server *server,
else if ((status = ntohl(*p++)) == NFS_OK) {
PRINTK("NFS reply rename\n");
}
else
PRINTK("NFS reply rename failed = %d\n", status);
free_page((long) p0);
return -nfs_stat_to_errno(status);
}
......@@ -417,6 +447,8 @@ int nfs_proc_link(struct nfs_server *server, struct nfs_fh *fhandle,
else if ((status = ntohl(*p++)) == NFS_OK) {
PRINTK("NFS reply link\n");
}
else
PRINTK("NFS reply link failed = %d\n", status);
free_page((long) p0);
return -nfs_stat_to_errno(status);
}
......@@ -443,6 +475,8 @@ int nfs_proc_symlink(struct nfs_server *server, struct nfs_fh *dir,
else if ((status = ntohl(*p++)) == NFS_OK) {
PRINTK("NFS reply symlink\n");
}
else
PRINTK("NFS reply symlink failed = %d\n", status);
free_page((long) p0);
return -nfs_stat_to_errno(status);
}
......@@ -471,6 +505,8 @@ int nfs_proc_mkdir(struct nfs_server *server, struct nfs_fh *dir,
p = xdr_decode_fattr(p, fattr);
PRINTK("NFS reply mkdir\n");
}
else
PRINTK("NFS reply mkdir failed = %d\n", status);
free_page((long) p0);
return -nfs_stat_to_errno(status);
}
......@@ -494,6 +530,8 @@ int nfs_proc_rmdir(struct nfs_server *server, struct nfs_fh *dir, char *name)
else if ((status = ntohl(*p++)) == NFS_OK) {
PRINTK("NFS reply rmdir\n");
}
else
PRINTK("NFS reply rmdir failed = %d\n", status);
free_page((long) p0);
return -nfs_stat_to_errno(status);
}
......@@ -521,13 +559,25 @@ int nfs_proc_readdir(struct nfs_server *server, struct nfs_fh *fhandle,
if (!(p = nfs_rpc_verify(p0)))
status = NFSERR_IO;
else if ((status = ntohl(*p++)) == NFS_OK) {
for (i = 0; i < count && *p++; i++)
p = xdr_decode_entry(p, entry++);
eof = (i == count && !*p++ && *p++) || (i < count && *p++);
if (eof && i)
entry[-1].eof = 1;
PRINTK("NFS reply readdir %d %s\n", i, eof ? "eof" : "");
}
for (i = 0; i < count && *p++; i++) {
if (!(p = xdr_decode_entry(p, entry++)))
break;
}
if (!p) {
printk("nfs_proc_readdir: giant filename\n");
status = NFSERR_IO;
}
else {
eof = (i == count && !*p++ && *p++)
|| (i < count && *p++);
if (eof && i)
entry[-1].eof = 1;
PRINTK("NFS reply readdir %d %s\n", i,
eof ? "eof" : "");
}
}
else
PRINTK("NFS reply readdir failed = %d\n", status);
free_page((long) p0);
return (status == NFS_OK) ? i : -nfs_stat_to_errno(status);
}
......@@ -552,6 +602,8 @@ int nfs_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
p = xdr_decode_fsinfo(p, res);
PRINTK("NFS reply statfs\n");
}
else
PRINTK("NFS reply statfs failed = %d\n", status);
free_page((long) p0);
return -nfs_stat_to_errno(status);
}
......@@ -595,27 +647,32 @@ static int *nfs_rpc_header(int *p, int procedure)
static int *nfs_rpc_verify(int *p)
{
int n;
unsigned int n;
p++;
if ((n = ntohl(*p++)) != RPC_REPLY) {
printk("nfs_rpc_verify: not an RPC reply: %d\n", n);
return 0;
return NULL;
}
if ((n = ntohl(*p++)) != RPC_MSG_ACCEPTED) {
printk("nfs_rpc_verify: RPC call rejected: %d\n", n);
return 0;
return NULL;
}
switch (n = ntohl(*p++)) {
case RPC_AUTH_NULL: case RPC_AUTH_UNIX: case RPC_AUTH_SHORT:
break;
default:
printk("nfs_rpc_verify: bad RPC authentication type: %d\n", n);
return NULL;
}
if ((n = ntohl(*p++)) != RPC_AUTH_NULL && n != RPC_AUTH_UNIX) {
printk("nfs_rpc_verify: bad RPC authentication type: %d\n",
n);
return 0;
if ((n = ntohl(*p++)) > 400) {
printk("nfs_rpc_verify: giant auth size\n");
return NULL;
}
n = ntohl(*p++);
p += (n + 3) >> 2;
if ((n = ntohl(*p++)) != RPC_SUCCESS) {
printk("nfs_rpc_verify: RPC call failed: %d\n", n);
return 0;
return NULL;
}
return p;
}
......
......@@ -90,7 +90,7 @@ static int do_nfs_rpc_call(struct nfs_server *server, int *start, int *end)
goto re_select;
#endif
current->timeout = 0;
result = -EINTR;
result = -ERESTARTSYS;
break;
}
if (!current->timeout) {
......
......@@ -89,7 +89,7 @@ int sys_truncate(const char * path, unsigned int length)
inode->i_op->truncate(inode);
inode->i_atime = inode->i_mtime = CURRENT_TIME;
inode->i_dirt = 1;
error = notify_change(inode);
error = notify_change(NOTIFY_SIZE, inode);
iput(inode);
return error;
}
......@@ -110,7 +110,7 @@ int sys_ftruncate(unsigned int fd, unsigned int length)
inode->i_op->truncate(inode);
inode->i_atime = inode->i_mtime = CURRENT_TIME;
inode->i_dirt = 1;
return notify_change(inode);
return notify_change(NOTIFY_SIZE, inode);
}
/* If times==NULL, set access and modification to current time,
......@@ -149,7 +149,7 @@ int sys_utime(char * filename, struct utimbuf * times)
inode->i_mtime = modtime;
inode->i_ctime = CURRENT_TIME;
inode->i_dirt = 1;
error = notify_change(inode);
error = notify_change(NOTIFY_TIME, inode);
iput(inode);
return error;
}
......@@ -247,7 +247,7 @@ int sys_fchmod(unsigned int fd, mode_t mode)
inode->i_mode &= ~S_ISGID;
inode->i_ctime = CURRENT_TIME;
inode->i_dirt = 1;
return notify_change(inode);
return notify_change(NOTIFY_MODE, inode);
}
int sys_chmod(const char * filename, mode_t mode)
......@@ -271,7 +271,7 @@ int sys_chmod(const char * filename, mode_t mode)
inode->i_mode &= ~S_ISGID;
inode->i_ctime = CURRENT_TIME;
inode->i_dirt = 1;
error = notify_change(inode);
error = notify_change(NOTIFY_MODE, inode);
iput(inode);
return error;
}
......@@ -298,7 +298,7 @@ int sys_fchown(unsigned int fd, uid_t user, gid_t group)
inode->i_gid = group;
inode->i_ctime = CURRENT_TIME;
inode->i_dirt = 1;
return notify_change(inode);
return notify_change(NOTIFY_UIDGID, inode);
}
return -EPERM;
}
......@@ -326,7 +326,7 @@ int sys_chown(const char * filename, uid_t user, gid_t group)
inode->i_gid = group;
inode->i_ctime = CURRENT_TIME;
inode->i_dirt = 1;
error = notify_change(inode);
error = notify_change(NOTIFY_UIDGID, inode);
iput(inode);
return error;
}
......@@ -380,7 +380,7 @@ int sys_open(const char * filename,int flag,int mode)
inode->i_size = 0;
if (inode->i_op && inode->i_op->truncate)
inode->i_op->truncate(inode);
if ((i = notify_change(inode))) {
if ((i = notify_change(NOTIFY_SIZE, inode))) {
iput(inode);
current->filp[fd] = NULL;
f->f_count--;
......
array.o : array.c /usr/include/linux/types.h /usr/include/linux/errno.h /usr/include/linux/sched.h \
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/signal.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/tty.h \
/usr/include/linux/termios.h /usr/include/asm/system.h /usr/include/asm/segment.h \
/usr/include/asm/io.h
base.o : base.c /usr/include/asm/segment.h /usr/include/linux/errno.h /usr/include/linux/sched.h \
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h /usr/include/linux/kernel.h \
/usr/include/linux/signal.h /usr/include/linux/time.h /usr/include/linux/param.h \
/usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \
/usr/include/linux/proc_fs.h /usr/include/linux/stat.h
fd.o : fd.c /usr/include/asm/segment.h /usr/include/linux/errno.h /usr/include/linux/sched.h \
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h /usr/include/linux/kernel.h \
/usr/include/linux/signal.h /usr/include/linux/time.h /usr/include/linux/param.h \
/usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \
/usr/include/linux/proc_fs.h /usr/include/linux/stat.h
inode.o : inode.c /usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/proc_fs.h /usr/include/linux/string.h \
/usr/include/linux/stat.h /usr/include/linux/locks.h /usr/include/asm/system.h \
/usr/include/asm/segment.h
link.o : link.c /usr/include/asm/segment.h /usr/include/linux/errno.h /usr/include/linux/sched.h \
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h /usr/include/linux/kernel.h \
/usr/include/linux/signal.h /usr/include/linux/time.h /usr/include/linux/param.h \
/usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \
/usr/include/linux/minix_fs.h /usr/include/linux/stat.h
mem.o : mem.c /usr/include/linux/types.h /usr/include/linux/errno.h /usr/include/linux/sched.h \
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/signal.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/asm/segment.h \
/usr/include/asm/io.h
root.o : root.c /usr/include/asm/segment.h /usr/include/linux/errno.h /usr/include/linux/sched.h \
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h /usr/include/linux/kernel.h \
/usr/include/linux/signal.h /usr/include/linux/time.h /usr/include/linux/param.h \
/usr/include/linux/resource.h /usr/include/linux/vm86.h /usr/include/linux/math_emu.h \
/usr/include/linux/proc_fs.h /usr/include/linux/stat.h
......@@ -43,7 +43,16 @@ static int get_loadavg(char * buffer)
static int get_uptime(char * buffer)
{
return sprintf(buffer,"%d\n",(jiffies+jiffies_offset)/HZ);
unsigned long uptime;
unsigned long idle;
uptime = jiffies + jiffies_offset;
idle = task[0]->utime + task[0]->stime;
return sprintf(buffer,"%d.%02d %d.%02d\n",
uptime / HZ,
uptime % HZ,
idle / HZ,
idle % HZ);
}
static int get_meminfo(char * buffer)
......@@ -284,7 +293,7 @@ static int array_read(struct inode * inode, struct file * file,char * buf, int c
char * page;
int length;
int end;
int type, pid;
unsigned int type, pid;
if (count < 0)
return -EINVAL;
......
......@@ -89,8 +89,8 @@ int proc_match(int len,const char * name,struct proc_dir_entry * de)
static int proc_lookupbase(struct inode * dir,const char * name, int len,
struct inode ** result)
{
unsigned int pid;
int i, ino;
unsigned int pid, ino;
int i;
*result = NULL;
if (!dir)
......
......@@ -127,6 +127,13 @@ extern unsigned long inode_init(unsigned long start, unsigned long end);
#define FIBMAP 1 /* bmap access */
#define FIGETBSZ 2 /* get the block size used for bmap */
/* these flags tell notify_change what is being changed */
#define NOTIFY_SIZE 1
#define NOTIFY_MODE 2
#define NOTIFY_TIME 4
#define NOTIFY_UIDGID 8
typedef char buffer_block[BLOCK_SIZE];
struct buffer_head {
......@@ -275,7 +282,7 @@ struct inode_operations {
struct super_operations {
void (*read_inode) (struct inode *);
int (*notify_change) (struct inode *);
int (*notify_change) (int flags, struct inode *);
void (*write_inode) (struct inode *);
void (*put_inode) (struct inode *);
void (*put_super) (struct super_block *);
......@@ -318,7 +325,7 @@ extern void sync_inodes(dev_t dev);
extern void sync_dev(dev_t dev);
extern void sync_supers(dev_t dev);
extern int bmap(struct inode * inode,int block);
extern int notify_change(struct inode * inode);
extern int notify_change(int flags, struct inode * inode);
extern int namei(const char * pathname, struct inode ** res_inode);
extern int lnamei(const char * pathname, struct inode ** res_inode);
extern int permission(struct inode * inode,int mask);
......
......@@ -17,6 +17,7 @@ enum {
TIMER_BH = 0,
CONSOLE_BH,
SERIAL_BH,
TTY_BH,
INET_BH,
KEYBOARD_BH
};
......
......@@ -264,6 +264,7 @@ extern unsigned long startup_time;
extern int jiffies_offset;
extern int need_resched;
extern int hard_math;
extern int ignore_irq13;
#define CURRENT_TIME (startup_time+(jiffies+jiffies_offset)/HZ)
......
......@@ -20,8 +20,8 @@ struct async_struct {
int baud_base;
int port;
int irq;
int flags;
int type;
int flags; /* defined in tty.h */
int type; /* UART type */
struct tty_struct *tty;
unsigned long timer;
int timeout;
......@@ -30,9 +30,11 @@ struct async_struct {
int x_char; /* xon/xoff characater */
int event;
int line;
int count; /* # of fd on device */
int blocked_open; /* # of blocked opens */
struct wait_queue *open_wait;
struct async_struct *next_port; /* For the linked list */
struct async_struct *prev_port;
};
/*
......@@ -44,6 +46,7 @@ struct async_struct {
#define RS_EVENT_HUP_PGRP 2
#define RS_EVENT_BREAK_INT 3
#define RS_EVENT_DO_SAK 4
#define RS_EVENT_OPEN_WAKEUP 5
/*
* These are the UART port assignments, expressed as offsets from the base
......
......@@ -16,6 +16,25 @@ struct ip_config
unsigned long paddr;
unsigned long router;
unsigned long net;
unsigned long up:1;
unsigned long up:1,destroy:1;
};
#define SIOCSARP 0x2501
#define SIOCGARP 0x2502
#define SIOCDARP 0x2503
/*
* ARP ioctl request
*/
struct arpreq {
struct sockaddr arp_pa; /* protocol address */
struct sockaddr arp_ha; /* hardware address */
int arp_flags; /* flags */
};
#define ATF_COM 0x02
#define ATF_PERM 0x04
#define ATF_PUBL 0x08
#define ATF_USETRAILERS 0x10
#endif
......@@ -38,6 +38,8 @@
#define TIOCPKT 0x5420
#define FIONBIO 0x5421
#define TIOCNOTTY 0x5422
#define TIOCSETD 0x5423
#define TIOCGETD 0x5424
#define FIONCLEX 0x5450 /* these numbers need to be adjusted. */
#define FIOCLEX 0x5451
#define FIOASYNC 0x5452
......@@ -225,4 +227,9 @@ struct termios {
#define TCSADRAIN 1
#define TCSAFLUSH 2
/* line disciplines */
#define N_TTY 0
#define N_SLIP 1
#define N_MOUSE 2
#endif
......@@ -10,6 +10,7 @@
#include <asm/system.h>
#define NR_CONSOLES 8
#define NR_LDISCS 16
/*
* These are set up by the setup-routine at boot-time:
......@@ -104,7 +105,9 @@ struct serial_struct {
#define ASYNC_FLAGS 0x0036 /* Possible legal async flags */
/* Internal flags used only by kernel/chr_drv/serial.c */
#define ASYNC_NO_IRQ 0x80000000 /* No IRQ was initialized */
#define ASYNC_INITIALIZED 0x80000000 /* Serial port was initialized */
#define ASYNC_CALLOUT_ACTIVE 0x40000000 /* Call out device is active */
#define ASYNC_NORMAL_ACTIVE 0x20000000 /* Normal device is active */
#define IS_A_CONSOLE(min) (((min) & 0xC0) == 0x00)
#define IS_A_SERIAL(min) (((min) & 0xC0) == 0x40)
......@@ -188,6 +191,7 @@ struct tty_struct {
unsigned char stopped:1, status_changed:1, packet:1;
unsigned char ctrl_status;
short line;
int disc;
int flags;
int count;
struct winsize winsize;
......@@ -197,12 +201,38 @@ struct tty_struct {
int (*ioctl)(struct tty_struct *tty, struct file * file,
unsigned int cmd, unsigned int arg);
void (*throttle)(struct tty_struct * tty, int status);
void (*set_termios)(struct tty_struct *tty, struct termios * old);
struct tty_struct *link;
unsigned char *write_data_ptr;
int write_data_cnt;
void (*write_data_callback)(void * data);
void * write_data_arg;
struct tty_queue read_q;
struct tty_queue write_q;
struct tty_queue secondary;
};
struct tty_ldisc {
int flags;
/*
* The following routines are called from above.
*/
int (*open)(struct tty_struct *);
void (*close)(struct tty_struct *);
int (*read)(struct tty_struct * tty, struct file * file,
char * buf, int nr);
int (*write)(struct tty_struct * tty, struct file * file,
char * buf, int nr);
int (*ioctl)(struct tty_struct * tty, struct file * file,
unsigned int cmd, unsigned int arg);
/*
* The following routines are called from below.
*/
void (*handler)(struct tty_struct *);
};
#define LDISC_FLAG_DEFINED 0x00000001
/*
* These are the different types of thottle status which can be sent
* to the low-level tty driver. The tty_io.c layer is responsible for
......@@ -256,7 +286,9 @@ extern void tty_write_flush(struct tty_struct *);
extern void tty_read_flush(struct tty_struct *);
extern struct tty_struct *tty_table[];
extern int tty_check_write[];
extern struct tty_struct * redirect;
extern struct tty_ldisc ldiscs[];
extern int fg_console;
extern unsigned long video_num_columns;
extern unsigned long video_num_lines;
......@@ -282,6 +314,7 @@ extern void flush_input(struct tty_struct * tty);
extern void flush_output(struct tty_struct * tty);
extern void wait_until_sent(struct tty_struct * tty);
extern void copy_to_cooked(struct tty_struct * tty);
extern int tty_register_ldisc(int disc, struct tty_ldisc *new);
extern int tty_ioctl(struct inode *, struct file *, unsigned int, unsigned int);
extern int is_orphaned_pgrp(int pgrp);
......@@ -290,6 +323,7 @@ extern int tty_signal(int sig, struct tty_struct *tty);
extern int kill_pg(int pgrp, int sig, int priv);
extern int kill_sl(int sess, int sig, int priv);
extern void tty_hangup(struct tty_struct * tty);
extern void tty_unhangup(struct file *filp);
extern void do_SAK(struct tty_struct *tty);
/* tty write functions */
......@@ -300,7 +334,6 @@ extern void con_write(struct tty_struct * tty);
/* serial.c */
extern int rs_open(struct tty_struct * tty, struct file * filp);
extern void change_speed(unsigned int line);
/* pty.c */
......
......@@ -249,6 +249,23 @@ void start_kernel(void)
floppy_init();
sock_init();
sti();
/*
* check if exception 16 works correctly.. This is truly evil
* code: it disables the high 8 interrupts to make sure that
* the irq13 doesn't happen. But as this will lead to a lockup
* if no exception16 arrives, it depends on the fact that the
* high 8 interrupts will be re-enabled by the next timer tick.
* So the irq13 will happen eventually, but the exception 16
* should get there first..
*/
if (hard_math) {
unsigned short control_word;
__asm__("fninit ; fnstcw %0 ; fwait":"=m" (*&control_word));
control_word &= 0xffc0;
__asm__("fldcw %0 ; fwait"::"m" (*&control_word));
outb_p(inb_p(0x21) | (1 << 2), 0x21);
__asm__("fldz ; fld1 ; fdiv %st,%st(1) ; fwait");
}
move_to_user_mode();
if (!fork()) /* we count on this going ok */
init();
......@@ -288,6 +305,7 @@ void init(void)
printf(linux_banner);
execve("/etc/init",argv_init,envp_init);
execve("/bin/init",argv_init,envp_init);
execve("/sbin/init",argv_init,envp_init);
/* if this fails, fall through to original stuff */
if (!(pid=fork())) {
......
This diff is collapsed.
This diff is collapsed.
......@@ -20,9 +20,6 @@
+---------------------------------------------------------------------------+
***NOTE*** THIS SHOULD BE REGARDED AS AN ALPHA TEST VERSION
(although the beta version may be identical)
wm-FPU-emu is an FPU emulator for Linux. It is derived from wm-emu387
which is my 80387 emulator for djgpp (gcc under msdos); wm-emu387 was
......@@ -48,6 +45,14 @@ Please report bugs, etc to me at:
--Bill Metzenthen
Oct 1992
[ note: I have advanced the version number from alpha numbers
to beta numbers. This is not meant to indicate any major
changes but rather the fact that the emulator has been a
standard part of the Linux distribution for some months
and is currently reasonably stable. WM Jan 1993 ]
----------------------- Internals of wm-FPU-emu -----------------------
Numeric algorithms:
......@@ -84,7 +89,7 @@ is confined to five files:
----------------------- Limitations of wm-FPU-emu -----------------------
There are a number of differences between the current wm-FPU-emu
(version ALPHA 0.7) and the 80486 FPU (apart from bugs). Some of the
(version beta 1.0) and the 80486 FPU (apart from bugs). Some of the
more important differences are listed below:
Internal computations do not use de-normal numbers (but External
......
......@@ -221,7 +221,7 @@ void exception(int n)
{
int i, int_type;
int_type = 0;
int_type = 0; /* Needed only to stop compiler warnings */
if ( n & EX_INTERNAL )
{
int_type = n - EX_INTERNAL;
......
......@@ -37,6 +37,13 @@
#define __BAD__ Un_impl /* Not implemented */
#ifndef NO_UNDOC_CODE /* Un-documented FPU op-codes supported by default. */
/* WARNING: These codes are not documented by Intel in their 80486 manual
and may not work on FPU clones or later Intel FPUs. */
/* Changes to support the un-doc codes provided by Linus Torvalds. */
#define _d9_d8_ fstp_i /* unofficial code (19) */
#define _dc_d0_ fcom_st /* unofficial code (14) */
#define _dc_d8_ fcompst /* unofficial code (1c) */
......@@ -58,6 +65,22 @@ static FUNC st_instr_table[64] = {
fdivr_, trig_b, __BAD__, __BAD__, fdiv_i, __BAD__, fdivp_, __BAD__,
};
#else /* Support only documented FPU op-codes */
static FUNC st_instr_table[64] = {
fadd__, fld_i_, __BAD__, __BAD__, fadd_i, ffree_, faddp_, __BAD__,
fmul__, fxch_i, __BAD__, __BAD__, fmul_i, __BAD__, fmulp_, __BAD__,
fcom_st, fp_nop, __BAD__, __BAD__, __BAD__, fst_i_, __BAD__, __BAD__,
fcompst, __BAD__, __BAD__, __BAD__, __BAD__, fstp_i, fcompp, __BAD__,
fsub__, fp_etc, __BAD__, finit_, fsubri, fucom_, fsubrp, fstsw_,
fsubr_, fconst, fucompp, __BAD__, fsub_i, fucomp, fsubp_, __BAD__,
fdiv__, trig_a, __BAD__, __BAD__, fdivri, __BAD__, fdivrp, __BAD__,
fdivr_, trig_b, __BAD__, __BAD__, fdiv_i, __BAD__, fdivp_, __BAD__,
};
#endif NO_UNDOC_CODE
#define _NONE_ 0 /* Take no special action */
#define _REG0_ 1 /* Need to check for not empty st(0) */
#define _REGI_ 2 /* Need to check for not empty st(0) and st(rm) */
......@@ -65,6 +88,10 @@ static FUNC st_instr_table[64] = {
#define _PUSH_ 3 /* Need to check for space to push onto stack */
#define _null_ 4 /* Function illegal or not implemented */
#ifndef NO_UNDOC_CODE
/* Un-documented FPU op-codes supported by default. (see above) */
static unsigned char type_table[64] = {
_REGI_, _NONE_, _null_, _null_, _REGI_, _REGi_, _REGI_, _REGi_,
_REGI_, _REGI_, _null_, _null_, _REGI_, _REGI_, _REGI_, _REGI_,
......@@ -76,6 +103,21 @@ static unsigned char type_table[64] = {
_REGI_, _NONE_, _null_, _null_, _REGI_, _null_, _REGI_, _null_
};
#else /* Support only documented FPU op-codes */
static unsigned char type_table[64] = {
_REGI_, _NONE_, _null_, _null_, _REGI_, _REGi_, _REGI_, _null_,
_REGI_, _REGI_, _null_, _null_, _REGI_, _null_, _REGI_, _null_,
_REGI_, _NONE_, _null_, _null_, _null_, _REG0_, _null_, _null_,
_REGI_, _null_, _null_, _null_, _null_, _REG0_, _REGI_, _null_,
_REGI_, _NONE_, _null_, _NONE_, _REGI_, _REGI_, _REGI_, _NONE_,
_REGI_, _NONE_, _REGI_, _null_, _REGI_, _REGI_, _REGI_, _null_,
_REGI_, _NONE_, _null_, _null_, _REGI_, _null_, _REGI_, _null_,
_REGI_, _NONE_, _null_, _null_, _REGI_, _null_, _REGI_, _null_
};
#endif NO_UNDOC_CODE
/* Be careful when using any of these global variables...
they might change if swapping is triggered */
......
......@@ -115,7 +115,7 @@ void get_address(unsigned char FPU_modrm)
{
unsigned char mod;
long *cpu_reg_ptr;
int offset = 0;
int offset = 0; /* Initialized just to stop compiler warnings. */
mod = (FPU_modrm >> 6) & 3;
......
......@@ -48,7 +48,7 @@ void load_store_instr(char type)
{
FPU_REG *pop_ptr; /* We need a version of FPU_st0_ptr which won't change. */
pop_ptr = NULL;
pop_ptr = NULL; /* Initialized just to stop compiler warnings. */
switch ( type_table[(int) (unsigned) type] )
{
case _NONE_:
......
......@@ -48,7 +48,7 @@ _reg_div:
movb SIGN(%esi),%cl
cmpb %cl,SIGN(%ebx)
setneb (%edi) // Set the sign, requires neg=1, pos=0
setne (%edi) // Set the sign, requires SIGN_NEG=1, SIGN_POS=0
add $SIGL_OFFSET,%ebx
add $SIGL_OFFSET,%esi
......
......@@ -8,5 +8,5 @@
| |
+---------------------------------------------------------------------------*/
#define FPU_VERSION "wm-FPU-emu version ALPHA 0.8"
#define FPU_VERSION "wm-FPU-emu version BETA 1.0"
floppy.o : floppy.c /usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/timer.h /usr/include/linux/fdreg.h \
/usr/include/linux/fd.h /usr/include/linux/errno.h /usr/include/asm/dma.h /usr/include/asm/io.h \
/usr/include/asm/system.h /usr/include/asm/segment.h blk.h
genhd.o : genhd.c /usr/include/linux/config.h /usr/include/linux/autoconf.h \
/usr/include/linux/fs.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/genhd.h /usr/include/linux/kernel.h
hd.o : hd.c /usr/include/linux/config.h /usr/include/linux/autoconf.h /usr/include/linux/errno.h \
/usr/include/linux/signal.h /usr/include/linux/sched.h /usr/include/linux/head.h \
/usr/include/linux/fs.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/timer.h /usr/include/linux/hdreg.h \
/usr/include/linux/genhd.h /usr/include/asm/system.h /usr/include/asm/io.h /usr/include/asm/segment.h \
blk.h
ll_rw_blk.o : ll_rw_blk.c /usr/include/linux/sched.h /usr/include/linux/head.h \
/usr/include/linux/fs.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/signal.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/errno.h \
/usr/include/linux/string.h /usr/include/linux/config.h /usr/include/linux/autoconf.h \
/usr/include/linux/locks.h /usr/include/asm/system.h blk.h
ramdisk.o : ramdisk.c /usr/include/linux/config.h /usr/include/linux/autoconf.h \
/usr/include/linux/sched.h /usr/include/linux/head.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h \
/usr/include/linux/kernel.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/minix_fs.h /usr/include/linux/string.h \
/usr/include/asm/system.h /usr/include/asm/segment.h blk.h
......@@ -46,10 +46,8 @@ static void extended_partition(struct gendisk *hd, int dev)
while (1) {
if ((current_minor & mask) >= (4 + hd->max_p))
return;
if (!(bh = bread(dev,0,1024))) {
printk("Unable to read partition table of device %04x\n",dev);
if (!(bh = bread(dev,0,1024)))
return;
}
/*
* This block is from a device that we're about to stomp on.
* So make sure nobody thinks this block is usable.
......@@ -66,11 +64,9 @@ static void extended_partition(struct gendisk *hd, int dev)
!(hd->part[current_minor].nr_sects = p->nr_sects))
goto done; /* shouldn't happen */
hd->part[current_minor].start_sect = this_sector + p->start_sect;
printk(" Logical part %d start %d size %d end %d\n\r",
mask & current_minor, hd->part[current_minor].start_sect,
hd->part[current_minor].nr_sects,
hd->part[current_minor].start_sect +
hd->part[current_minor].nr_sects - 1);
printk(" %s%c%d", hd->major_name,
'a'+(current_minor >> hd->minor_shift),
mask & current_minor);
current_minor++;
p++;
/*
......@@ -96,19 +92,22 @@ static void extended_partition(struct gendisk *hd, int dev)
static void check_partition(struct gendisk *hd, unsigned int dev)
{
static int first_time = 1;
int i, minor = current_minor;
struct buffer_head *bh;
struct partition *p;
unsigned long first_sector;
int mask = (1 << hd->minor_shift) - 1;
if (first_time)
printk("Partition check:\n");
first_time = 0;
first_sector = hd->part[MINOR(dev)].start_sect;
if (!(bh = bread(dev,0,1024))) {
printk("Unable to read partition table of device %04x\n",dev);
printk(" unable to read partition table of device %04x\n",dev);
return;
}
printk("%s%c :\n\r", hd->major_name, 'a'+(minor >> hd->minor_shift));
printk(" %s%c:", hd->major_name, 'a'+(minor >> hd->minor_shift));
current_minor += 4; /* first "extra" minor */
if (*(unsigned short *) (bh->b_data+510) == 0xAA55) {
p = 0x1BE + (void *)bh->b_data;
......@@ -116,13 +115,13 @@ static void check_partition(struct gendisk *hd, unsigned int dev)
if (!(hd->part[minor].nr_sects = p->nr_sects))
continue;
hd->part[minor].start_sect = first_sector + p->start_sect;
printk(" part %d start %d size %d end %d \n\r", i,
hd->part[minor].start_sect, hd->part[minor].nr_sects,
hd->part[minor].start_sect + hd->part[minor].nr_sects - 1);
printk(" %s%c%d", hd->major_name,'a'+(minor >> hd->minor_shift), i);
if ((current_minor & 0x3f) >= 60)
continue;
if (p->sys_ind == EXTENDED_PARTITION) {
printk(" <");
extended_partition(hd, (hd->major << 8) | minor);
printk(" >");
}
}
/*
......@@ -138,16 +137,14 @@ static void check_partition(struct gendisk *hd, unsigned int dev)
continue;
hd->part[current_minor].start_sect = p->start_sect;
hd->part[current_minor].nr_sects = p->nr_sects;
printk(" DM part %d start %d size %d end %d\n\r",
current_minor & mask,
hd->part[current_minor].start_sect,
hd->part[current_minor].nr_sects,
hd->part[current_minor].start_sect +
hd->part[current_minor].nr_sects - 1);
printk(" %s%c%d", hd->major_name,
'a'+(current_minor >> hd->minor_shift),
current_minor & mask);
}
}
} else
printk("Bad partition table on dev %04x\n",dev);
printk(" bad partition table");
printk("\n");
brelse(bh);
}
......@@ -212,9 +209,6 @@ int sys_setup(void * BIOS)
nr += p->nr_real;
}
if (nr)
printk("Partition table%s ok.\n\r",(nr>1)?"s":"");
if (ramdisk_size)
rd_load();
mount_root();
......
......@@ -49,8 +49,9 @@ static inline unsigned char CMOS_READ(unsigned char addr)
#define HD_DELAY 0
/* Max read/write errors/sector */
#define MAX_ERRORS 7
#define MAX_ERRORS 16 /* Max read/write errors/sector */
#define RESET_FREQ 8 /* Reset controller every 8th retry */
#define RECAL_FREQ 4 /* Recalibrate every 4th retry */
#define MAX_HD 2
static void recal_intr(void);
......@@ -62,6 +63,7 @@ static char busy[MAX_HD] = {0, };
static struct wait_queue * busy_wait = NULL;
static int reset = 0;
static int hd_error = 0;
#if (HD_DELAY > 0)
unsigned long last_req, read_timer();
......@@ -111,12 +113,14 @@ static int win_result(void)
int i=inb_p(HD_STATUS);
if ((i & (BUSY_STAT | READY_STAT | WRERR_STAT | SEEK_STAT | ERR_STAT))
== (READY_STAT | SEEK_STAT))
== (READY_STAT | SEEK_STAT)) {
hd_error = 0;
return 0; /* ok */
}
printk("HD: win_result: status = 0x%02x\n",i);
if (i&1) {
i=inb(HD_ERROR);
printk("HD: win_result: error = 0x%02x\n",i);
hd_error = inb(HD_ERROR);
printk("HD: win_result: error = 0x%02x\n",hd_error);
}
return 1;
}
......@@ -219,8 +223,8 @@ static void reset_controller(void)
outb(hd_info[0].ctl & 0x0f ,HD_CMD);
if (drive_busy())
printk("HD-controller still busy\n\r");
if ((i = inb(HD_ERROR)) != 1)
printk("HD-controller reset failed: %02x\n\r",i);
if ((hd_error = inb(HD_ERROR)) != 1)
printk("HD-controller reset failed: %02x\n\r",hd_error);
}
static void reset_hd(void)
......@@ -259,19 +263,26 @@ void unexpected_hd_interrupt(void)
SET_TIMER;
}
/*
* bad_rw_intr() now tries to be a bit smarter and does things
* according to the error returned by the controller.
* -Mika Liljeberg (liljeber@cs.Helsinki.FI)
*/
static void bad_rw_intr(void)
{
int i;
int dev;
if (!CURRENT)
return;
if (++CURRENT->errors >= MAX_ERRORS)
dev = MINOR(CURRENT->dev) >> 6;
if (++CURRENT->errors >= MAX_ERRORS || (hd_error & BBD_ERR)) {
end_request(0);
else if (CURRENT->errors > MAX_ERRORS/2)
recalibrate[dev] = 1;
} else if (CURRENT->errors % RESET_FREQ == 0)
reset = 1;
else
for (i=0; i < NR_HD; i++)
recalibrate[i] = 1;
else if ((hd_error & TRK0_ERR) || CURRENT->errors % RECAL_FREQ == 0)
recalibrate[dev] = 1;
/* Otherwise just retry */
}
static inline int wait_DRQ(void)
......@@ -302,8 +313,8 @@ static void read_intr(void)
sti();
printk("HD: read_intr: status = 0x%02x\n",i);
if (i & ERR_STAT) {
i = (unsigned) inb(HD_ERROR);
printk("HD: read_intr: error = 0x%02x\n",i);
hd_error = (unsigned) inb(HD_ERROR);
printk("HD: read_intr: error = 0x%02x\n",hd_error);
}
bad_rw_intr();
cli();
......@@ -351,8 +362,8 @@ static void write_intr(void)
sti();
printk("HD: write_intr: status = 0x%02x\n",i);
if (i & ERR_STAT) {
i = (unsigned) inb(HD_ERROR);
printk("HD: write_intr: error = 0x%02x\n",i);
hd_error = (unsigned) inb(HD_ERROR);
printk("HD: write_intr: error = 0x%02x\n",hd_error);
}
bad_rw_intr();
cli();
......
This diff is collapsed.
......@@ -206,8 +206,8 @@ static void scan_scsis (void)
((SCmd.sense_buffer[0] & 0x70) >> 4) == 7) {
if (SCmd.sense_buffer[2] &0xe0)
continue; /* No devices here... */
if((SCmd.sense_buffer[2] & 0xf != NOT_READY) &&
(SCmd.sense_buffer[2] & 0xf != UNIT_ATTENTION))
if(((SCmd.sense_buffer[2] & 0xf) != NOT_READY) &&
((SCmd.sense_buffer[2] & 0xf) != UNIT_ATTENTION))
continue;
}
else
......
......@@ -506,7 +506,24 @@ void wd7000_revision(void)
}
static const char *wd_bases[] = {(char *)0xce000};
static const char *wd_bases[] = {
(char *)0xde000,
(char *)0xdc000,
(char *)0xda000,
(char *)0xd8000,
(char *)0xd6000,
(char *)0xd4000,
(char *)0xd2000,
(char *)0xd0000,
(char *)0xce000,
(char *)0xcc000,
(char *)0xca000,
(char *)0xc8000,
(char *)0xc6000,
(char *)0xc4000,
(char *)0xc2000,
(char *)0xc0000
};
typedef struct {
char * signature;
unsigned offset;
......@@ -603,8 +620,8 @@ int wd7000_biosparam(int size, int dev, int* info)
* this way, so I think it will work OK.
*/
{
info[0] = 32;
info[1] = 64;
info[0] = 64;
info[1] = 32;
info[2] = (size + 2047) >> 11;
if (info[2] >= 1024) info[2] = 1024;
return 0;
......
This diff is collapsed.
......@@ -48,12 +48,13 @@ static void mouse_interrupt(int unused)
buttons = inb(MSE_DATA_PORT);
dy |= (buttons & 0xf) << 4;
buttons = ((buttons >> 5) & 0x07);
mouse.buttons = buttons;
mouse.latch_buttons |= buttons;
mouse.dx += dx;
mouse.dy += dy;
mouse.ready = 1;
wake_up_interruptible(&mouse.wait);
if (dx != 0 || dy != 0 || buttons != mouse.buttons) {
mouse.buttons = buttons;
mouse.dx += dx;
mouse.dy += dy;
mouse.ready = 1;
wake_up_interruptible(&mouse.wait);
}
MSE_INT_ON();
}
......@@ -75,7 +76,7 @@ static int open_mouse(struct inode * inode, struct file * file)
mouse.ready = 0;
mouse.dx = 0;
mouse.dy = 0;
mouse.buttons = mouse.latch_buttons = 0x80;
mouse.buttons = 0x87;
if (request_irq(MOUSE_IRQ, mouse_interrupt)) {
mouse.active = 0;
return -EBUSY;
......@@ -99,7 +100,7 @@ static int read_mouse(struct inode * inode, struct file * file, char * buffer, i
if (!mouse.ready)
return -EAGAIN;
MSE_INT_OFF();
put_fs_byte(mouse.latch_buttons | 0x80, buffer);
put_fs_byte(mouse.buttons | 0x80, buffer);
if (mouse.dx < -127)
mouse.dx = -127;
if (mouse.dx > 127)
......@@ -114,7 +115,6 @@ static int read_mouse(struct inode * inode, struct file * file, char * buffer, i
put_fs_byte(0x00, buffer + i);
mouse.dx = 0;
mouse.dy = 0;
mouse.latch_buttons = mouse.buttons;
mouse.ready = 0;
MSE_INT_ON();
return i;
......@@ -159,7 +159,7 @@ unsigned long bus_mouse_init(unsigned long kmem_start)
mouse.present = 1;
mouse.active = 0;
mouse.ready = 0;
mouse.buttons = mouse.latch_buttons = 0x80;
mouse.buttons = 0x87;
mouse.dx = 0;
mouse.dy = 0;
mouse.wait = NULL;
......
......@@ -66,6 +66,7 @@ static unsigned char video_page; /* Initial video page */
static unsigned short video_port_reg; /* Video register select port */
static unsigned short video_port_val; /* Video register value port */
static int can_do_color = 0;
static int printable = 0;
static struct {
unsigned short vc_video_erase_char; /* Background erase character */
......@@ -1239,7 +1240,6 @@ return s;
long con_init(long kmem_start)
{
char *display_desc = "????";
char *display_ptr;
int currcons = 0;
long base;
int orig_x = ORIG_X;
......@@ -1268,7 +1268,7 @@ long con_init(long kmem_start)
{
video_type = VIDEO_TYPE_EGAM;
video_mem_term = 0xb8000;
display_desc = "EGAm";
display_desc = "EGA+";
}
else
{
......@@ -1287,7 +1287,7 @@ long con_init(long kmem_start)
{
video_type = VIDEO_TYPE_EGAC;
video_mem_term = 0xc0000;
display_desc = "EGAc";
display_desc = "EGA+";
}
else
{
......@@ -1297,15 +1297,6 @@ long con_init(long kmem_start)
}
}
/* Let the user know what kind of display driver we are using */
display_ptr = ((char *)video_mem_base) + video_size_row - 8;
while (*display_desc)
{
*display_ptr++ = *display_desc++;
display_ptr++;
}
/* Initialize the variables used for scrolling (mostly EGA/VGA) */
base = (long)vc_scrmembuf;
......@@ -1337,6 +1328,12 @@ long con_init(long kmem_start)
save_cur(currcons);
gotoxy(currcons,orig_x,orig_y);
update_screen(fg_console);
printable = 1;
printk("Console: %s %s %dx%d, %d virtual consoles\n",
can_do_color?"colour":"mono",
display_desc,
video_num_columns,video_num_lines,
NR_CONSOLES);
return kmem_start;
}
......@@ -1456,8 +1453,8 @@ void console_print(const char * b)
int currcons = fg_console;
char c;
if (currcons<0 || currcons>=NR_CONSOLES)
currcons = 0;
if (!printable || currcons<0 || currcons>=NR_CONSOLES)
return;
while ((c = *(b++)) != 0) {
if (c == 10 || c == 13 || need_wrap) {
if (c != 13)
......
......@@ -16,13 +16,14 @@
#include <linux/sched.h>
#include <linux/tty.h>
#include <linux/fcntl.h>
#include <linux/interrupt.h>
#include <asm/system.h>
#include <asm/io.h>
#include <asm/bitops.h>
static void pty_close(struct tty_struct * tty, struct file * filp)
{
if (!tty)
if (!tty || (tty->count > 1))
return;
wake_up_interruptible(&tty->read_q.proc_list);
if (!tty->link)
......@@ -50,6 +51,10 @@ static inline void pty_copy(struct tty_struct * from, struct tty_struct * to)
}
TTY_READ_FLUSH(to);
wake_up_interruptible(&from->write_q.proc_list);
if (from->write_data_cnt) {
set_bit(from->line, &tty_check_write);
mark_bh(TTY_BH);
}
}
/*
......
This diff is collapsed.
sound_stub.o : sound_stub.c
This diff is collapsed.
......@@ -2,6 +2,10 @@
* linux/kernel/chr_drv/tty_ioctl.c
*
* Copyright (C) 1991, 1992 Linus Torvalds
*
* Modified by Fred N. van Kempen, 01/29/93, to add line disciplines
* which can be dynamically activated and de-activated by the line
* discipline handling modules (like SLIP).
*/
#include <linux/types.h>
......@@ -16,6 +20,13 @@
#include <asm/segment.h>
#include <asm/system.h>
#undef DEBUG
#ifdef DEBUG
# define PRINTK(x) printk (x)
#else
# define PRINTK(x) /**/
#endif
extern int session_of_pgrp(int pgrp);
extern int do_screendump(int arg);
extern int kill_pg(int pgrp, int sig, int priv);
......@@ -119,34 +130,43 @@ static int get_termios(struct tty_struct * tty, struct termios * termios)
return 0;
}
static int check_change(struct tty_struct * tty, int channel)
{
/* If we try to set the state of terminal and we're not in the
foreground, send a SIGTTOU. If the signal is blocked or
ignored, go ahead and perform the operation. POSIX 7.2) */
if (current->tty != channel)
return 0;
if (tty->pgrp <= 0 || tty->pgrp == current->pgrp)
return 0;
if (is_orphaned_pgrp(current->pgrp))
return -EIO;
if (is_ignored(SIGTTOU))
return 0;
(void) kill_pg(current->pgrp,SIGTTOU,1);
return -ERESTARTSYS;
}
static int set_termios(struct tty_struct * tty, struct termios * termios,
int channel)
{
int i;
unsigned short old_cflag = tty->termios->c_cflag;
struct termios old_termios = *tty->termios;
/* If we try to set the state of terminal and we're not in the
foreground, send a SIGTTOU. If the signal is blocked or
ignored, go ahead and perform the operation. POSIX 7.2) */
if ((current->tty == channel) &&
(tty->pgrp != current->pgrp)) {
if (is_orphaned_pgrp(current->pgrp))
return -EIO;
if (!is_ignored(SIGTTOU)) {
(void) kill_pg(current->pgrp,SIGTTOU,1);
return -ERESTARTSYS;
}
}
i = check_change(tty, channel);
if (i)
return i;
for (i=0 ; i< (sizeof (*termios)) ; i++)
((char *)tty->termios)[i]=get_fs_byte(i+(char *)termios);
if (IS_A_SERIAL(channel) && tty->termios->c_cflag != old_cflag)
change_speed(channel-64);
/* puting mpty's into echo mode is very bad, and I think under
some situations can cause the kernel to do nothing but
copy characters back and forth. -RAB */
if (IS_A_PTY_MASTER(channel)) tty->termios->c_lflag &= ~ECHO;
if (tty->set_termios)
(*tty->set_termios)(tty, &old_termios);
return 0;
}
......@@ -176,18 +196,11 @@ static int set_termio(struct tty_struct * tty, struct termio * termio,
{
int i;
struct termio tmp_termio;
unsigned short old_cflag = tty->termios->c_cflag;
if ((current->tty == channel) &&
(tty->pgrp > 0) &&
(tty->pgrp != current->pgrp)) {
if (is_orphaned_pgrp(current->pgrp))
return -EIO;
if (!is_ignored(SIGTTOU)) {
(void) kill_pg(current->pgrp,SIGTTOU,1);
return -ERESTARTSYS;
}
}
struct termios old_termios = *tty->termios;
i = check_change(tty, channel);
if (i)
return i;
for (i=0 ; i< (sizeof (*termio)) ; i++)
((char *)&tmp_termio)[i]=get_fs_byte(i+(char *)termio);
......@@ -213,8 +226,10 @@ static int set_termio(struct tty_struct * tty, struct termio * termio,
tty->termios->c_line = tmp_termio.c_line;
for(i=0 ; i < NCC ; i++)
tty->termios->c_cc[i] = tmp_termio.c_cc[i];
if (IS_A_SERIAL(channel) && tty->termios->c_cflag != old_cflag)
change_speed(channel-64);
if (tty->set_termios)
(*tty->set_termios)(tty, &old_termios);
return 0;
}
......@@ -253,6 +268,31 @@ static int get_window_size(struct tty_struct * tty, struct winsize * ws)
return 0;
}
/* Set the discipline of a tty line. */
static int tty_set_ldisc(struct tty_struct *tty, int ldisc)
{
if ((ldisc < N_TTY) || (ldisc >= NR_LDISCS) ||
!(ldiscs[ldisc].flags & LDISC_FLAG_DEFINED))
return -EINVAL;
if (tty->disc == ldisc)
return 0; /* We are already in the desired discipline */
/* Shutdown the current discipline. */
wait_until_sent(tty);
flush_input(tty);
if (ldiscs[tty->disc].close)
ldiscs[tty->disc].close(tty);
/* Now set up the new line discipline. */
tty->disc = ldisc;
if (ldiscs[tty->disc].open)
return(ldiscs[tty->disc].open(tty));
else
return 0;
}
int tty_ioctl(struct inode * inode, struct file * file,
unsigned int cmd, unsigned int arg)
{
......@@ -262,6 +302,7 @@ int tty_ioctl(struct inode * inode, struct file * file,
int pgrp;
int dev;
int termios_dev;
int retval;
if (MAJOR(file->f_rdev) != 4) {
printk("tty_ioctl: tty pseudo-major != 4\n");
......@@ -434,7 +475,13 @@ int tty_ioctl(struct inode * inode, struct file * file,
tty->session = 0;
}
return 0;
case TIOCGETD:
verify_area((void *) arg,4);
put_fs_long(tty->disc, (unsigned long *) arg);
return 0;
case TIOCSETD:
arg = get_fs_long((unsigned long *) arg);
return tty_set_ldisc(tty, arg);
case TIOCPKT:
{
int on;
......@@ -450,9 +497,16 @@ int tty_ioctl(struct inode * inode, struct file * file,
}
default:
if (tty->ioctl)
return (tty->ioctl)(tty, file, cmd, arg);
else
return -EINVAL;
if (tty->ioctl) {
retval = (tty->ioctl)(tty, file, cmd, arg);
if (retval != -EINVAL)
return retval;
}
if (ldiscs[tty->disc].ioctl) {
retval = (ldiscs[tty->disc].ioctl)
(tty, file, cmd, arg);
return retval;
}
return -EINVAL;
}
}
......@@ -20,7 +20,7 @@
#include <asm/segment.h>
#include <asm/system.h>
#define MAX_TASKS_PER_USER ((NR_TASKS/4)*3)
#define MAX_TASKS_PER_USER (NR_TASKS/2)
long last_pid=0;
......@@ -41,11 +41,12 @@ void verify_area(void * addr,int size)
static int find_empty_process(void)
{
int i, task_nr;
int this_user_tasks = 0;
int this_user_tasks;
repeat:
if ((++last_pid) & 0xffff0000)
if ((++last_pid) & 0xffff8000)
last_pid=1;
this_user_tasks = 0;
for(i=0 ; i < NR_TASKS ; i++) {
if (!task[i])
continue;
......
......@@ -239,8 +239,6 @@ void free_irq(unsigned int irq)
restore_flags(flags);
}
extern void do_coprocessor_error(long,long);
/*
* Note that on a 486, we don't want to do a SIGFPE on a irq13
* as the irq is unreliable, and exception 16 works correctly
......@@ -251,12 +249,10 @@ extern void do_coprocessor_error(long,long);
static void math_error_irq(int cpl)
{
outb(0,0xF0);
do_coprocessor_error(0,0);
}
static void math_error_irq_486(int cpl)
{
outb(0,0xF0); /* even this is probably not needed.. */
if (ignore_irq13)
return;
send_sig(SIGFPE, last_task_used_math, 1);
__asm__("fninit");
}
static void no_action(int cpl) { }
......@@ -271,18 +267,12 @@ static struct sigaction ignore_IRQ = {
void init_IRQ(void)
{
int i;
unsigned long cr0;
for (i = 0; i < 16 ; i++)
set_intr_gate(0x20+i,bad_interrupt[i]);
if (irqaction(2,&ignore_IRQ))
printk("Unable to get IRQ2 for cascade\n");
__asm__("movl %%cr0,%%eax":"=a" (cr0));
if (cr0 & CR0_NE)
i = request_irq(13,math_error_irq_486);
else
i = request_irq(13,math_error_irq);
if (i)
if (request_irq(13,math_error_irq))
printk("Unable to get IRQ13 for math-error handler\n");
/* intialize the bottom half routines. */
......
......@@ -30,6 +30,7 @@
int need_resched = 0;
int hard_math = 0; /* set by boot/head.S */
int ignore_irq13 = 0; /* set if exception 16 works */
unsigned long * prof_buffer = NULL;
unsigned long prof_len = 0;
......@@ -316,9 +317,11 @@ static struct timer_list * next_timer = NULL;
void add_timer(long jiffies, void (*fn)(void))
{
struct timer_list * p;
unsigned long flags;
if (!fn)
return;
save_flags(flags);
cli();
if (jiffies <= 0)
(fn)();
......@@ -342,8 +345,10 @@ void add_timer(long jiffies, void (*fn)(void))
p->next->jiffies = jiffies;
p = p->next;
}
if (p->next)
p->next->jiffies -= p->jiffies;
}
sti();
restore_flags(flags);
}
unsigned long timer_active = 0;
......
......@@ -414,7 +414,13 @@ int sys_times(struct tms * tbuf)
int sys_brk(unsigned long end_data_seg)
{
unsigned long rlim;
rlim = current->rlim[RLIMIT_DATA].rlim_cur;
if (rlim >= RLIM_INFINITY)
rlim = 0xffffffff;
if (end_data_seg >= current->end_code &&
end_data_seg-current->end_code <= rlim &&
end_data_seg < current->start_stack - 16384)
current->brk = end_data_seg;
return current->brk;
......@@ -657,10 +663,11 @@ int sys_getrusage(int who, struct rusage *ru)
int sys_gettimeofday(struct timeval *tv, struct timezone *tz)
{
if (tv) {
unsigned long nowtime = jiffies+jiffies_offset;
verify_area(tv, sizeof *tv);
put_fs_long(startup_time + CT_TO_SECS(jiffies+jiffies_offset),
put_fs_long(startup_time + CT_TO_SECS(nowtime),
(unsigned long *) tv);
put_fs_long(CT_TO_USECS(jiffies+jiffies_offset),
put_fs_long(CT_TO_USECS(nowtime),
((unsigned long *) tv)+1);
}
if (tz) {
......
......@@ -168,6 +168,7 @@ void do_stack_segment(long esp,long error_code)
void do_coprocessor_error(long esp, long error_code)
{
ignore_irq13 = 1;
send_sig(SIGFPE, last_task_used_math, 1);
__asm__("fninit");
}
......
_exit.o : _exit.c /usr/include/linux/unistd.h
close.o : close.c /usr/include/linux/unistd.h
ctype.o : ctype.c /usr/include/linux/ctype.h
dup.o : dup.c /usr/include/linux/unistd.h
errno.o : errno.c
execve.o : execve.c /usr/include/linux/unistd.h
malloc.o : malloc.c /usr/include/linux/kernel.h /usr/include/linux/mm.h /usr/include/linux/fs.h \
/usr/include/linux/limits.h /usr/include/linux/wait.h /usr/include/linux/types.h \
/usr/include/linux/dirent.h /usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h \
/usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h \
/usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h \
/usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h \
/usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h /usr/include/linux/string.h \
/usr/include/asm/system.h
open.o : open.c /usr/include/linux/unistd.h /usr/lib/gcc-lib/i386-linux/2.3.2/include/stdarg.h
setsid.o : setsid.c /usr/include/linux/types.h /usr/include/linux/unistd.h
string.o : string.c /usr/include/linux/types.h /usr/include/linux/string.h
wait.o : wait.c /usr/include/linux/unistd.h /usr/include/linux/types.h
write.o : write.c /usr/include/linux/unistd.h /usr/include/linux/types.h
memory.o : memory.c /usr/include/asm/system.h /usr/include/linux/signal.h /usr/include/linux/sched.h \
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h /usr/include/linux/kernel.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/errno.h \
/usr/include/linux/string.h
mmap.o : mmap.c /usr/include/linux/stat.h /usr/include/linux/sched.h /usr/include/linux/head.h \
/usr/include/linux/fs.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/signal.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/errno.h \
/usr/include/linux/mman.h /usr/include/linux/string.h /usr/include/asm/segment.h \
/usr/include/asm/system.h
swap.o : swap.c /usr/include/linux/mm.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/kernel.h /usr/include/linux/sched.h \
/usr/include/linux/head.h /usr/include/linux/signal.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/errno.h /usr/include/linux/string.h \
/usr/include/linux/stat.h /usr/include/asm/system.h
......@@ -263,11 +263,11 @@ int unmap_page_range(unsigned long from, unsigned long size)
}
for (pc = pcnt; pc--; page_table++) {
if ((page = *page_table) != 0) {
--current->rss;
*page_table = 0;
if (1 & page)
if (1 & page) {
--current->rss;
free_page(0xfffff000 & page);
else
} else
swap_free(page >> 1);
}
}
......@@ -394,15 +394,12 @@ static unsigned long put_page(struct task_struct * tsk,unsigned long page,unsign
return 0;
}
page_table = (unsigned long *) (tsk->tss.cr3 + ((address>>20) & 0xffc));
if ((*page_table)&1)
if ((*page_table) & PAGE_PRESENT)
page_table = (unsigned long *) (0xfffff000 & *page_table);
else {
tmp = get_free_page(GFP_KERNEL);
if (!tmp) {
oom(tsk);
tmp = BAD_PAGETABLE;
}
*page_table = tmp | PAGE_ACCESSED | 7;
printk("put_page: bad page directory entry\n");
oom(tsk);
*page_table = BAD_PAGETABLE | PAGE_ACCESSED | 7;
return 0;
}
page_table += (address >> PAGE_SHIFT) & 0x3ff;
......@@ -771,6 +768,7 @@ void do_page_fault(unsigned long *esp, unsigned long error_code)
{
unsigned long address;
unsigned long user_esp = 0;
unsigned long stack_limit;
unsigned int bit;
extern void die_if_kernel();
......@@ -789,6 +787,16 @@ void do_page_fault(unsigned long *esp, unsigned long error_code)
do_wp_page(error_code, address, current, user_esp);
else
do_no_page(error_code, address, current, user_esp);
if (!user_esp)
return;
stack_limit = current->rlim[RLIMIT_STACK].rlim_cur;
if (stack_limit >= RLIM_INFINITY)
return;
if (stack_limit >= current->start_stack)
return;
stack_limit = current->start_stack - stack_limit;
if (user_esp < stack_limit)
send_sig(SIGSEGV, current, 1);
return;
}
printk("Unable to handle kernel paging request at address %08x\n",address);
......
socket.o : socket.c /usr/include/linux/signal.h /usr/include/linux/errno.h /usr/include/linux/sched.h \
/usr/include/linux/head.h /usr/include/linux/fs.h /usr/include/linux/limits.h \
/usr/include/linux/wait.h /usr/include/linux/types.h /usr/include/linux/dirent.h \
/usr/include/linux/vfs.h /usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h \
/usr/include/linux/ext_fs_i.h /usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h \
/usr/include/linux/nfs_fs_i.h /usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h \
/usr/include/linux/ext_fs_sb.h /usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h \
/usr/include/linux/nfs_fs_sb.h /usr/include/linux/mm.h /usr/include/linux/kernel.h \
/usr/include/linux/time.h /usr/include/linux/param.h /usr/include/linux/resource.h \
/usr/include/linux/vm86.h /usr/include/linux/math_emu.h /usr/include/linux/stat.h \
/usr/include/linux/socket.h /usr/include/linux/fcntl.h /usr/include/linux/termios.h \
/usr/include/linux/config.h /usr/include/linux/autoconf.h /usr/include/asm/system.h \
/usr/include/asm/segment.h kern_sock.h socketcall.h
unix.o : unix.c /usr/include/linux/signal.h /usr/include/linux/sched.h /usr/include/linux/head.h \
/usr/include/linux/fs.h /usr/include/linux/limits.h /usr/include/linux/wait.h \
/usr/include/linux/types.h /usr/include/linux/dirent.h /usr/include/linux/vfs.h \
/usr/include/linux/pipe_fs_i.h /usr/include/linux/minix_fs_i.h /usr/include/linux/ext_fs_i.h \
/usr/include/linux/msdos_fs_i.h /usr/include/linux/iso_fs_i.h /usr/include/linux/nfs_fs_i.h \
/usr/include/linux/nfs.h /usr/include/linux/minix_fs_sb.h /usr/include/linux/ext_fs_sb.h \
/usr/include/linux/msdos_fs_sb.h /usr/include/linux/iso_fs_sb.h /usr/include/linux/nfs_fs_sb.h \
/usr/include/linux/mm.h /usr/include/linux/kernel.h /usr/include/linux/time.h \
/usr/include/linux/param.h /usr/include/linux/resource.h /usr/include/linux/vm86.h \
/usr/include/linux/math_emu.h /usr/include/linux/errno.h /usr/include/linux/string.h \
/usr/include/linux/stat.h /usr/include/linux/socket.h /usr/include/linux/un.h \
/usr/include/linux/fcntl.h /usr/include/linux/termios.h /usr/include/asm/system.h \
/usr/include/asm/segment.h kern_sock.h
......@@ -37,6 +37,10 @@ struct socket {
void *dummy;
};
#define SOCK_INODE(S) ((struct inode *)(S)->dummy)
extern struct socket sockets[NSOCKETS];
#define last_socket (sockets + NSOCKETS - 1)
struct proto_ops {
int (*init)(void);
int (*create)(struct socket *sock, int protocol);
......@@ -69,7 +73,7 @@ struct proto_ops {
int (*getsockopt)(struct socket *sock, int level, int optname,
char *optval, int *optlen);
int (*fcntl) (struct socket *sock, unsigned int cmd,
unsigned long arg);
unsigned long arg);
};
extern int sock_awaitconn(struct socket *mysock, struct socket *servsock);
......
......@@ -70,10 +70,7 @@ static struct file_operations socket_file_ops = {
sock_close
};
#define SOCK_INODE(S) ((struct inode *)(S)->dummy)
static struct socket sockets[NSOCKETS];
#define last_socket (sockets + NSOCKETS - 1)
struct socket sockets[NSOCKETS];
static struct wait_queue *socket_wait_free = NULL;
/*
......@@ -177,8 +174,11 @@ sock_alloc(int wait)
return NULL;
}
SOCK_INODE(sock)->i_mode = S_IFSOCK;
SOCK_INODE(sock)->i_uid = current->euid;
SOCK_INODE(sock)->i_gid = current->egid;
sock->wait = &SOCK_INODE(sock)->i_wait;
PRINTK(("sock_alloc: socket 0x%x, inode 0x%x\n",
PRINTK(("sock_alloc: socket 0x%x,inode 0x%x\n",
sock, SOCK_INODE(sock)));
return sock;
}
......@@ -951,11 +951,10 @@ sock_init(void)
for (sock = sockets; sock <= last_socket; ++sock)
sock->state = SS_FREE;
for (i = ok = 0; i < NPROTO; ++i) {
printk("sock_init: initializing family %d (%s)\n",
proto_table[i].family, proto_table[i].name);
if ((*proto_table[i].ops->init)() < 0) {
printk("sock_init: init failed.\n",
proto_table[i].family);
printk("sock_init: init failed family %d (%s)\n",
proto_table[i].family,
proto_table[i].name);
proto_table[i].family = -1;
}
else
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment