- Gpm 1.06
- SysVinit 2.60
- Util-linux 2.5
+- Mtools 3.0
+- Fdutils 4.3
Upgrade notes
*************
any new features of 1.3.x that require extra or new packages for use to
Chris Ricker (gt1355b@prism.gatech.edu).
+Mtools and fdutils
+==================
+
+ The floppy ioctl numbering scheme has changed in 1.3.x. For
+backwards compatibility, the old numbering scheme was supported
+throughout 1.3.x. A warning will be printed in 2.0.x when the old
+numbers are used, and their use will be discontinued entirely in 2.1.x
+
+ In order to avoid trouble, you need to recompile any programs that
+emit floppy ioctls. These include mtools and fdutils. You can get
+mtools at:
+
+ftp://ftp.imag.fr/pub/Linux/ZLIBC/mtools/mtools-3.0.src.tar.gz
+ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/mtools-3.0.src.tar.gz
+ftp://tsx-11.mit.edu/pub/linux/sources/usr.bin/mtools-3.0.src.tar.gz
+
+You can get fdutils at:
+
+ftp://ftp.imag.fr/pub/Linux/ZLIBC/fdutils/fdutils-4.3.src.tar.gz
+ftp://sunsite.unc.edu/pub/Linux/system/Misc/fdutils-4.3.src.tar.gz
+ftp://tsx-11.mit.edu/pub/linux/sources/sbin/fdutils-4.3.src.tar.gz
+
+ In the future, the ioctl used by fdformat might be discontinued
+altogether. Please use superformat (included in fdutils) instead.
+
How to know the version of the installed programs
*************************************************
ftp://sunsite.unc.edu/pub/Linux/system/Misc/util-linux-2.5.tar.gz
+Mtools
+======
+
+ftp://ftp.imag.fr/pub/Linux/ZLIBC/mtools/mtools-3.0.src.tar.gz
+ftp://sunsite.unc.edu/pub/Linux/utils/disk-management/mtools-3.0.src.tar.gz
+ftp://tsx-11.mit.edu/pub/linux/sources/usr.bin/mtools-3.0.src.tar.gz
+
+Fdutils
+=======
+
+ftp://ftp.imag.fr/pub/Linux/ZLIBC/fdutils/fdutils-4.3.src.tar.gz
+ftp://sunsite.unc.edu/pub/Linux/system/Misc/fdutils-4.3.src.tar.gz
+ftp://tsx-11.mit.edu/pub/linux/sources/sbin/fdutils-4.3.src.tar.gz
VERSION = 1
PATCHLEVEL = 99
-SUBLEVEL = 3
+SUBLEVEL = 4
ARCH = i386
- Linux kernel release 1.3.xx
+ Linux kernel release 2.0.xx
-These are the release notes for linux version 1.3. Read them carefully,
+These are the release notes for linux version 2.0. Read them carefully,
as they tell you what this is all about, explain how to install the
kernel, and what to do if something goes wrong.
-Linux version 1.3 is a DEVELOPMENT kernel, and not intended for general
-public use. Different releases may have various and sometimes severe
-bugs. It is *strongly* recommended that you back up the previous kernel
-before installing any new 1.3.xx release.
-
-If you need to use a proven and stable Linux kernel, please
-use 1.0.9 or 1.2.13. All features found in the 1.3.xx releases
-will be contained in 2.0 when the code base has stabilized again.
-
-If you decide to use 1.3, it might be a good idea to follow the kernel
-channel, available as newsgroup (under linux.dev.kernel) and as mailing
-list. To subscribe to the latter, e-mail majordomo@vger.rutgers.edu,
-and put in the body of the message "subscribe linux-kernel" or
-"subscribe linux-kernel-digest" for a daily digest of the mailing list
-(it is a high-traffic list). Note that getting subscribed or unsubscribed
-sometimes takes days or even weeks.
-
WHAT IS LINUX?
Linux is a Unix clone written from scratch by Linus Torvalds with
- If you install the full sources, do a
cd /usr/src
- gzip -cd linux-1.3.XX.tar.gz | tar xfv -
+ gzip -cd linux-2.0.XX.tar.gz | tar xfv -
to get it all put in place. Replace "XX" with the version number of the
latest kernel.
- - You can also upgrade between 1.3.xx releases by patching. For a large
- set of revisions, it is not worth the effort since the full set of
- patches is bigger than a new kernel distribution. Instead, get the
- latest full source archive and install as above. Then, get all newer
- patch files, and do
+ - You can also upgrade between 2.0.xx releases by patching. Each
+ patch that is released for 2.0.xx contains only bugfixes. No
+ new features will be added to the Linux kernel until the 2.1.xx
+ development effort begins. To install by patching, get all the
+ newer patch files and do
cd /usr/src
gzip -cd patchXX.gz | patch -p0
"make menuconfig" Text based color menus, radiolists & dialogs.
"make xconfig" X windows based configuration tool.
-
NOTES on "make config":
- having unnecessary drivers will make the kernel bigger, and can
under some circumstances lead to problems: probing for a
For some, this is on a floppy disk, in which case you can "cp
/usr/src/linux/arch/i386/boot/zImage /dev/fd0" to make a bootable
- floppy.
+ floppy. Note that as of Linux 2.0.0, a kernel copied to a 720k
+ double-density 3.5" floppy disk no longer boots. In this case,
+ it is highly recommended that you install LILO on your
+ double-density bootfloppy or switch to high-density floppies.
If you boot Linux from the hard drive, chances are you use LILO which
uses the kernel image as specified in the file /etc/lilo.conf. The
signal = 12
blocked = 16
flags = 20
-errno = 24
dbgreg6 = 52
dbgreg7 = 56
exec_domain = 60
movl SYMBOL_NAME(current_set),%ebx
#endif
andl $~CF_MASK,EFLAGS(%esp) # clear carry - assume no errors
- movl $0,errno(%ebx)
movl %db6,%edx
movl %edx,dbgreg6(%ebx) # save current hardware debugging status
testb $0x20,flags(%ebx) # PF_TRACESYS
jne 1f
call *%eax
movl %eax,EAX(%esp) # save the return value
- movl errno(%ebx),%edx
- negl %edx
- je ret_from_sys_call
- movl %edx,EAX(%esp)
- orl $(CF_MASK),EFLAGS(%esp) # set carry to indicate error
jmp ret_from_sys_call
ALIGN
1: call SYMBOL_NAME(syscall_trace)
#else
movl SYMBOL_NAME(current_set),%eax
#endif
- movl errno(%eax),%edx
- negl %edx
- je 1f
- movl %edx,EAX(%esp)
- orl $(CF_MASK),EFLAGS(%esp) # set carry to indicate error
-1: call SYMBOL_NAME(syscall_trace)
+ call SYMBOL_NAME(syscall_trace)
ALIGN
.globl ret_from_sys_call
udelay(500);
set_dor(0, ~0x80, 0);
udelay(500);
+ return 0;
}
#else
#define fd_eject(x) -EINVAL
# define NEXT_DEV (&sdla0_dev)
#endif
-/* This must be AFTER the various FRADs so it initializes FIRST! */
-
-#ifdef CONFIG_DLCI
- extern int dlci_init(struct device *);
- static struct device dlci_dev = { "dlci", 0, 0, 0, 0, 0, 0, 0, 0, 0, NEXT_DEV, dlci_init, };
-# undef NEXT_DEV
-# define NEXT_DEV (&dlci_dev)
-#endif
-
#ifdef CONFIG_NETROM
extern int nr_init(struct device *);
* interfaces. Requires 'dlcicfg' program to create usable
* interfaces, the initial one, 'dlci' is for IOCTL use only.
*
- * Version: @(#)dlci.c 0.20 13 Apr 1996
+ * Version: @(#)dlci.c 0.25 13 May 1996
*
* Author: Mike McLagan <mike.mclagan@linux.org>
*
* returned from the FRAD, the packet is
* sent back to Linux for re-transmission
*
+ * 0.25 Mike McLagan Converted to use SIOC IOCTL calls
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
#include <net/sock.h>
static const char *devname = "dlci";
-static const char *version = "DLCI driver v0.20, 13 Apr 1996, mike.mclagan@linux.org";
+static const char *version = "DLCI driver v0.25, 13 May 1996, mike.mclagan@linux.org";
static struct device *open_dev[CONFIG_DLCI_COUNT];
return(ret);
}
-int dlci_add(struct dlci_add *new)
-{
- struct device *master, *slave;
- struct dlci_local *dlp;
- struct frad_local *flp;
- struct dlci_add dlci;
- int err, i;
- char buf[10];
-
- err = verify_area(VERIFY_WRITE, new, sizeof(*new));
- if (err)
- return(err);
-
- memcpy_fromfs(&dlci, new, sizeof(dlci));
-
- /* validate slave device */
- slave = dev_get(dlci.devname);
- if (!slave)
- return(-ENODEV);
-
- if (slave->type != ARPHRD_FRAD)
- return(-EINVAL);
-
- /* check for registration */
- for (i=0;i<sizeof(basename) / sizeof(char *); i++)
- if ((basename[i]) &&
- (strncmp(dlci.devname, basename[i], strlen(basename[i])) == 0) &&
- (strlen(dlci.devname) > strlen(basename[i])))
- break;
-
- if (i == sizeof(basename) / sizeof(char *))
- return(-EINVAL);
-
- /* check for too many open devices : should this be dynamic ? */
- for(i=0;i<CONFIG_DLCI_COUNT;i++)
- if (!open_dev[i])
- break;
-
- if (i == CONFIG_DLCI_COUNT)
- return(-ENOSPC); /* #### Alan: Comments on this?? */
-
- /* create device name */
- sprintf(buf, "%s%02i", devname, i);
-
- master = kmalloc(sizeof(*master), GFP_KERNEL);
- if (!master)
- return(-ENOMEM);
-
- memset(master, 0, sizeof(*master));
- master->name = kmalloc(strlen(buf) + 1, GFP_KERNEL);
-
- if (!master->name)
- {
- kfree(master);
- return(-ENOMEM);
- }
-
- strcpy(master->name, buf);
- master->init = dlci_init;
- master->flags = 0;
-
- err = register_netdev(master);
- if (err < 0)
- {
- kfree(master->name);
- kfree(master);
- return(err);
- }
-
- *(short *)(master->dev_addr) = dlci.dlci;
-
- dlp = (struct dlci_local *) master->priv;
- dlp->slave = slave;
-
- flp = slave->priv;
- err = flp ? (*flp->assoc)(slave, master) : -EINVAL;
- if (err < 0)
- {
- unregister_netdev(master);
- kfree(master->priv);
- kfree(master->name);
- kfree(master);
- return(err);
- }
-
- memcpy_tofs(new->devname, buf, strlen(buf) + 1);
- open_dev[i] = master;
-
- MOD_INC_USE_COUNT;
-
- return(0);
-}
-
-int dlci_del(struct device *master)
-{
- struct dlci_local *dlp;
- struct frad_local *flp;
- struct device *slave;
- int i, err;
-
- if (master->start)
- return(-EBUSY);
-
- dlp = master->priv;
- slave = dlp->slave;
- flp = slave->priv;
-
- err = (*flp->deassoc)(slave, master);
- if (err)
- return(err);
-
- unregister_netdev(master);
-
- for(i=0;i<CONFIG_DLCI_COUNT;i++)
- if (master == open_dev[i])
- break;
-
- if (i<CONFIG_DLCI_COUNT)
- open_dev[i] = NULL;
-
- kfree(master->priv);
- kfree(master->name);
- kfree(master);
-
- MOD_DEC_USE_COUNT;
-
- return(0);
-}
-
int dlci_config(struct device *dev, struct dlci_conf *conf, int get)
{
struct dlci_conf config;
return(0);
}
-int dlci_ioctl(struct device *dev, struct ifreq *ifr, int cmd)
+int dlci_dev_ioctl(struct device *dev, struct ifreq *ifr, int cmd)
{
struct dlci_local *dlp;
+ int err, len;
if (!suser())
return(-EPERM);
if (!*(short *)(dev->dev_addr))
return(-EINVAL);
- strcpy(ifr->ifr_slave, dlp->slave->name);
- break;
-
- case DLCI_DEVADD:
- /* can only add on the primary device */
- if (*(short *)(dev->dev_addr))
- return(-EINVAL);
-
- return(dlci_add((struct dlci_add *) ifr->ifr_data));
- break;
-
- case DLCI_DEVDEL:
- /* can't delete the primary device */
- if (!*(short *)(dev->dev_addr))
- return(-EINVAL);
-
- if (dev->start)
- return(-EBUSY);
+ len = strlen(dlp->slave->name) + 1;
+ err = verify_area(VERIFY_WRITE, ifr->ifr_slave, len);
+ if (err)
+ return err;
- return(dlci_del(dev));
+ memcpy_tofs(ifr->ifr_slave, dlp->slave->name, len);
break;
case DLCI_GET_CONF:
return(&dlp->stats);
}
+int dlci_add(struct dlci_add *dlci)
+{
+ struct device *master, *slave;
+ struct dlci_local *dlp;
+ struct frad_local *flp;
+ int err, i;
+ char buf[10];
+
+ /* validate slave device */
+ slave = dev_get(dlci->devname);
+ if (!slave)
+ return(-ENODEV);
+
+ if (slave->type != ARPHRD_FRAD)
+ return(-EINVAL);
+
+ /* check for registration */
+ for (i=0;i<sizeof(basename) / sizeof(char *); i++)
+ if ((basename[i]) &&
+ (strncmp(dlci->devname, basename[i], strlen(basename[i])) == 0) &&
+ (strlen(dlci->devname) > strlen(basename[i])))
+ break;
+
+ if (i == sizeof(basename) / sizeof(char *))
+ return(-EINVAL);
+
+ /* check for too many open devices : should this be dynamic ? */
+ for(i=0;i<CONFIG_DLCI_COUNT;i++)
+ if (!open_dev[i])
+ break;
+
+ if (i == CONFIG_DLCI_COUNT)
+ return(-ENOSPC); /* #### Alan: Comments on this?? */
+
+ /* create device name */
+ sprintf(buf, "%s%02i", devname, i);
+
+ master = kmalloc(sizeof(*master), GFP_KERNEL);
+ if (!master)
+ return(-ENOMEM);
+
+ memset(master, 0, sizeof(*master));
+ master->name = kmalloc(strlen(buf) + 1, GFP_KERNEL);
+
+ if (!master->name)
+ {
+ kfree(master);
+ return(-ENOMEM);
+ }
+
+ strcpy(master->name, buf);
+ master->init = dlci_init;
+ master->flags = 0;
+
+ err = register_netdev(master);
+ if (err < 0)
+ {
+ kfree(master->name);
+ kfree(master);
+ return(err);
+ }
+
+ *(short *)(master->dev_addr) = dlci->dlci;
+
+ dlp = (struct dlci_local *) master->priv;
+ dlp->slave = slave;
+
+ flp = slave->priv;
+ err = flp ? (*flp->assoc)(slave, master) : -EINVAL;
+ if (err < 0)
+ {
+ unregister_netdev(master);
+ kfree(master->priv);
+ kfree(master->name);
+ kfree(master);
+ return(err);
+ }
+
+ strcpy(dlci->devname, buf);
+ open_dev[i] = master;
+ MOD_INC_USE_COUNT;
+ return(0);
+}
+
+int dlci_del(struct dlci_add *dlci)
+{
+ struct dlci_local *dlp;
+ struct frad_local *flp;
+ struct device *master, *slave;
+ int i, err;
+
+ /* validate slave device */
+ master = dev_get(dlci->devname);
+ if (!master)
+ return(-ENODEV);
+
+ if (master->start)
+ return(-EBUSY);
+
+ dlp = master->priv;
+ slave = dlp->slave;
+ flp = slave->priv;
+
+ err = (*flp->deassoc)(slave, master);
+ if (err)
+ return(err);
+
+ unregister_netdev(master);
+
+ for(i=0;i<CONFIG_DLCI_COUNT;i++)
+ if (master == open_dev[i])
+ break;
+
+ if (i<CONFIG_DLCI_COUNT)
+ open_dev[i] = NULL;
+
+ kfree(master->priv);
+ kfree(master->name);
+ kfree(master);
+
+ MOD_DEC_USE_COUNT;
+
+ return(0);
+}
+
+int dlci_ioctl(unsigned int cmd, void *arg)
+{
+ int err;
+ struct dlci_add add;
+
+ if (!suser())
+ return(-EPERM);
+
+ err=verify_area(VERIFY_READ, arg, sizeof(struct dlci_add));
+ if (err)
+ return(err);
+
+ memcpy_fromfs(&add, arg, sizeof(struct dlci_add));
+
+ switch (cmd)
+ {
+ case SIOCADDDLCI:
+ err = verify_area(VERIFY_WRITE, arg, sizeof(struct dlci_add));
+ if (err)
+ return(err);
+
+ err = dlci_add(&add);
+
+ if (!err)
+ memcpy_tofs(arg, &add, sizeof(struct dlci_add));
+ break;
+
+ case SIOCDELDLCI:
+ err = dlci_del(&add);
+ break;
+
+ default:
+ err = -EINVAL;
+ }
+
+ return(err);
+}
+
int dlci_init(struct device *dev)
{
struct dlci_local *dlp;
dev->flags = 0;
dev->open = dlci_open;
dev->stop = dlci_close;
- dev->do_ioctl = dlci_ioctl;
+ dev->do_ioctl = dlci_dev_ioctl;
dev->hard_start_xmit = dlci_transmit;
dev->hard_header = dlci_header;
dev->get_stats = dlci_get_stats;
}
#ifdef MODULE
-static struct device dlci = {"dlci", 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, dlci_init, };
+
+extern int (*dlci_ioctl_hook)(unsigned int, void *);
int init_module(void)
{
- dlci_setup();
- return(register_netdev(&dlci));
+ dlci_ioctl_hook = dlci_ioctl;
+
+ return(dlci_setup());
}
void cleanup_module(void)
{
- unregister_netdev(&dlci);
- if (dlci.priv)
- kfree(dlci.priv);
+ dlci_ioctl_hook = NULL;
}
#endif /* MODULE */
#define ABORT_TIMEOUT SCSI_TIMEOUT
#define RESET_TIMEOUT SCSI_TIMEOUT
#else
- #define SENSE_TIMEOUT (1*HZ)
- #define RESET_TIMEOUT (5*HZ)
- #define ABORT_TIMEOUT (5*HZ)
+ #define SENSE_TIMEOUT (5*HZ/10)
+ #define RESET_TIMEOUT (5*HZ/10)
+ #define ABORT_TIMEOUT (5*HZ/10)
#endif
-#define MIN_RESET_DELAY (3*HZ)
+#define MIN_RESET_DELAY (2*HZ)
-/* Do not call reset on error if we just did a reset within 10 sec. */
+/* Do not call reset on error if we just did a reset within 15 sec. */
#define MIN_RESET_PERIOD (15*HZ)
/* The following devices are known not to tolerate a lun != 0 scan for
* it is called twice per SCSI operation: once when internal_cmnd is
* called, and again when scsi_done completes the command. To limit
* the load this routine can cause, we shortcut processing if no clock
- * ticks have occurred since the last time it was called. This may
- * cause the computation of least below to be inaccurate, but it will
- * be corrected after the next clock tick.
+ * ticks have occurred since the last time it was called.
*/
if (jiffies == time_start && timer_table[SCSI_TIMER].expires > 0) {
if(SCset){
oldto = SCset->timeout;
SCset->timeout = timeout;
+ if (timeout > 0 &&
+ jiffies + timeout < timer_table[SCSI_TIMER].expires)
+ timer_table[SCSI_TIMER].expires = jiffies + timeout;
}
restore_flags(flags);
return oldto;
case SIG('S','L'):
{int slen;
struct SL_component * slp;
+ struct SL_component * oldslp;
slen = rr->len - 5;
slp = &rr->u.SL.link;
inode->i_size = symlink_len;
printk("Symlink component flag not implemented\n");
};
slen -= slp->len + 2;
+ oldslp = slp;
slp = (struct SL_component *) (((char *) slp) + slp->len + 2);
- if(slen < 2) break;
- if(!rootflag) inode->i_size += 1;
+ if(slen < 2) {
+ if( ((rr->u.SL.flags & 1) != 0)
+ && ((oldslp->flags & 1) == 0) ) inode->i_size += 1;
+ break;
+ }
+
+ /*
+ * If this component record isnt continued, then append a '/'.
+ */
+ if( (!rootflag)
+ && ((oldslp->flags & 1) == 0) ) inode->i_size += 1;
}
}
symlink_len = inode->i_size;
break;
case SIG('S','L'):
{int slen;
+ struct SL_component * oldslp;
struct SL_component * slp;
slen = rr->len - 5;
slp = &rr->u.SL.link;
printk("Symlink component flag not implemented (%d)\n",slen);
};
slen -= slp->len + 2;
+ oldslp = slp;
slp = (struct SL_component *) (((char *) slp) + slp->len + 2);
- if(slen < 2) break;
- if(!rootflag) strcat(rpnt,"/");
+ if(slen < 2) {
+ /*
+ * If there is another SL record, and this component record
+ * isn't continued, then add a slash.
+ */
+ if( ((rr->u.SL.flags & 1) != 0)
+ && ((oldslp->flags & 1) == 0) ) strcat(rpnt,"/");
+ break;
+ }
+
+ /*
+ * If this component record isnt continued, then append a '/'.
+ */
+ if( (!rootflag)
+ && ((oldslp->flags & 1) == 0) ) strcat(rpnt,"/");
+
};
break;
case SIG('C','E'):
if (!(inode = filp->f_inode))
return (-EINVAL);
+#ifdef CONFIG_LOCK_MANDATORY
/* Don't allow mandatory locks on files that may be memory mapped
* and shared.
*/
vma = vma->vm_next_share;
} while (vma != inode->i_mmap);
}
+#endif
memcpy_fromfs(&flock, l, sizeof(flock));
if (!posix_make_lock(filp, &file_lock, &flock))
if (count < 5) {
count++;
printk(KERN_WARNING
- "fcntl_setlk() called by process %d with broken flock() emulation\n",
- current->pid);
+ "fcntl_setlk() called by process %d (%s) with broken flock() emulation\n",
+ current->pid, current->comm);
}
}
#endif
int locks_verify_locked(struct inode *inode)
{
+#ifdef CONFIG_LOCK_MANDATORY
/* Candidates for mandatory locking have the setgid bit set
* but no group execute bit - an otherwise meaningless combination.
*/
if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
return (locks_mandatory_locked(inode));
- return (0);
-}
-
-int locks_mandatory_locked(struct inode *inode)
-{
-#ifdef CONFIG_LOCK_MANDATORY
- struct file_lock *fl;
-
- /* Search the lock list for this inode for any POSIX locks.
- */
- for (fl = inode->i_flock; fl != NULL; fl = fl->fl_next) {
- if ((fl->fl_flags & F_POSIX) && (fl->fl_owner != current))
- return (-EAGAIN);
- }
-#endif
+#endif
return (0);
}
int locks_verify_area(int read_write, struct inode *inode, struct file *filp,
unsigned int offset, unsigned int count)
{
+#ifdef CONFIG_LOCK_MANDATORY
/* Candidates for mandatory locking have the setgid bit set
* but no group execute bit - an otherwise meaningless combination.
*/
-#ifdef CONFIG_LOCK_MANDATORY
if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
return (locks_mandatory_area(read_write, inode, filp, offset,
count));
return (0);
}
+#ifdef CONFIG_LOCK_MANDATORY
+int locks_mandatory_locked(struct inode *inode)
+{
+ struct file_lock *fl;
+
+ /* Search the lock list for this inode for any POSIX locks.
+ */
+ for (fl = inode->i_flock; fl != NULL; fl = fl->fl_next) {
+ if ((fl->fl_flags & F_POSIX) && (fl->fl_owner != current))
+ return (-EAGAIN);
+ }
+ return (0);
+}
+
int locks_mandatory_area(int read_write, struct inode *inode,
struct file *filp, unsigned int offset,
unsigned int count)
{
-#ifdef CONFIG_LOCK_MANDATORY
struct file_lock *fl;
repeat:
goto repeat;
}
}
-#endif
return (0);
}
+#endif
/* Verify a "struct flock" and copy it to a "struct file_lock" as a POSIX
* style lock.
p += sprintf(p, "%d:%s ", id, pfx);
if (fl->fl_flags & F_POSIX) {
+#ifdef CONFIG_LOCK_MANDATORY
p += sprintf(p, "%s %s ",
(fl->fl_flags & F_BROKEN) ? "BROKEN" : "POSIX ",
((fl->fl_file->f_inode->i_mode & (S_IXGRP | S_ISGID))
== S_ISGID) ? "MANDATORY" : "ADVISORY ");
+#else
+ p += sprintf(p, "%s ADVISORY ",
+ (fl->fl_flags & F_BROKEN) ? "BROKEN" : "POSIX ");
+#endif
}
else {
p += sprintf(p, "FLOCK ADVISORY ");
/* Should this be surrounded with "#ifdef CONFIG_MODULES" ? */
#include <linux/symtab_begin.h>
X(proc_register),
+ X(proc_register_dynamic),
X(proc_unregister),
+ X(proc_root),
X(in_group_p),
X(generate_cluster),
X(proc_net_inode_operations),
#include <asm/segment.h>
-asmlinkage int sys_lseek(unsigned int fd, off_t offset, unsigned int origin)
+asmlinkage long sys_lseek(unsigned int fd, off_t offset, unsigned int origin)
{
struct file * file;
long tmp = -1;
-#ifndef _LINUX_MATH_EMU_H
-#define _LINUX_MATH_EMU_H
+#ifndef _I386_MATH_EMU_H
+#define _I386_MATH_EMU_H
+#include <asm/sigcontext.h>
void restore_i387_soft(struct _fpstate *buf);
struct _fpstate * save_i387_soft(struct _fpstate * buf);
#define FLOCK_VERIFY_READ 1
#define FLOCK_VERIFY_WRITE 2
+#ifdef CONFIG_LOCK_MANDATORY
extern int locks_mandatory_locked(struct inode *inode);
+extern int locks_mandatory_area(int read_write, struct inode *inode,
+ struct file *filp, unsigned int offset,
+ unsigned int count);
+#endif
+
extern inline int locks_verify_locked(struct inode *inode)
{
+#ifdef CONFIG_LOCK_MANDATORY
/* Candidates for mandatory locking have the setgid bit set
* but no group execute bit - an otherwise meaningless combination.
*/
if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
return (locks_mandatory_locked(inode));
+#endif
return (0);
}
-extern int locks_mandatory_area(int read_write, struct inode *inode,
- struct file *filp, unsigned int offset,
- unsigned int count);
extern inline int locks_verify_area(int read_write, struct inode *inode,
struct file *filp, unsigned int offset,
unsigned int count)
{
+#ifdef CONFIG_LOCK_MANDATORY
/* Candidates for mandatory locking have the setgid bit set
* but no group execute bit - an otherwise meaningless combination.
*/
if ((inode->i_mode & (S_ISGID | S_IXGRP)) == S_ISGID)
return (locks_mandatory_area(read_write, inode, filp, offset,
count));
+#endif
return (0);
}
#ifndef _FRAD_H_
#define _FRAD_H_
-/* Structures and constants associated with the DLCI device driver */
+#include <linux/if.h>
-#define DLCI_DEVADD (SIOCDEVPRIVATE)
-#define DLCI_DEVDEL (SIOCDEVPRIVATE + 1)
+/* Structures and constants associated with the DLCI device driver */
struct dlci_add
{
#ifndef _IP_FW_H
#define _IP_FW_H
+#include <linux/icmp.h>
+#include <linux/in.h>
+#include <linux/ip.h>
+#include <linux/tcp.h>
+#include <linux/udp.h>
+
struct ip_fw
{
struct ip_fw *fw_next; /* Next firewall on chain */
#warning Perhaps irq and i/o settings are wrong.
#endif
-#endif /* __MCDX_H */
\ No newline at end of file
+#endif /* __MCDX_H */
#define SIOCGIFMAP 0x8970 /* Get device parameters */
#define SIOCSIFMAP 0x8971 /* Set device parameters */
+/* DLCI configuration calls */
+
+#define SIOCADDDLCI 0x8980 /* Create new DLCI device */
+#define SIOCDELDLCI 0x8981 /* Delete DLCI device */
/* Device private ioctl calls */
limit=ntohs(nr->nr_lastnet);
if(limit-ntohs(nr->nr_firstnet) > 256)
{
- printk(KERN_WARING "Too many routes/iface.\n");
+ printk(KERN_WARNING "Too many routes/iface.\n");
return -EINVAL;
}
for(ct=ntohs(nr->nr_firstnet);ct<=limit;ct++)
* Alan Cox : Only sendmsg/recvmsg now supported.
* Alan Cox : Locked down bind (see security list).
* Alan Cox : Loosened bind a little.
+ * Mike McLagan : ADD/DEL DLCI Ioctls
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
extern int tcp_get_info(char *, char **, off_t, int, int);
extern int udp_get_info(char *, char **, off_t, int, int);
+#ifdef CONFIG_DLCI
+extern int dlci_ioctl(unsigned int, void*);
+#endif
+
+#ifdef CONFIG_DLCI_MODULE
+int (*dlci_ioctl_hook)(unsigned int, void *) = NULL;
+#endif
+
int (*rarp_ioctl_hook)(unsigned int,void*) = NULL;
/*
return -ENOPKG;
#endif
+ case SIOCADDDLCI:
+ case SIOCDELDLCI:
+#ifdef CONFIG_DLCI
+ return(dlci_ioctl(cmd, (void *) arg));
+#endif
+
+#ifdef CONFIG_DLCI_MODULE
+
+#ifdef CONFIG_KERNELD
+ if (dlci_ioctl_hook == NULL)
+ request_module("dlci");
+#endif
+
+ if (dlci_ioctl_hook)
+ return((*dlci_ioctl_hook)(cmd, (void *) arg));
+#endif
+ return -ENOPKG;
+
default:
if ((cmd >= SIOCDEVPRIVATE) &&
(cmd <= (SIOCDEVPRIVATE + 15)))
extern void destroy_8023_client(struct datalink_proto *);
#endif
+#ifdef CONFIG_DLCI_MODULE
+extern int (*dlci_ioctl_hook)(unsigned int, void *);
+#endif
static struct symbol_table net_syms = {
#include <linux/symtab_begin.h>
X(inet_add_protocol),
X(inet_del_protocol),
X(rarp_ioctl_hook),
+
+#ifdef CONFIG_DLCI_MODULE
+ X(dlci_ioctl_hook),
+#endif
+
X(init_etherdev),
X(ip_rt_route),
X(icmp_send),
return err;
skb->sk=sk; /* So they know it is us */
skb->free=1;
+ skb->h.filp=NULL;
sk->state=TCP_CLOSE;
unix_mkname(sunaddr, addr_len);
other=unix_find_other(sunaddr->sun_path, &err);