]> git.neil.brown.name Git - history.git/commitdiff
Import pre2.0.4 pre2.0.4
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:11:00 +0000 (15:11 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:11:00 +0000 (15:11 -0500)
22 files changed:
Documentation/Changes
Makefile
README
arch/i386/kernel/entry.S
drivers/block/floppy.c
drivers/net/Space.c
drivers/net/dlci.c
drivers/scsi/scsi.c
fs/isofs/rock.c
fs/locks.c
fs/proc/procfs_syms.c
fs/read_write.c
include/asm-i386/math_emu.h
include/linux/fs.h
include/linux/if_frad.h
include/linux/ip_fw.h
include/linux/mcdx.h
include/linux/sockios.h
net/appletalk/ddp.c
net/ipv4/af_inet.c
net/netsyms.c
net/unix/af_unix.c

index 6b9a98ab790c443455d9c278513a67664ecd4e16..dce17cca968672dc3b130267894544b7b2f71d04 100644 (file)
@@ -29,6 +29,8 @@ Current Releases
 - Gpm                   1.06
 - SysVinit              2.60
 - Util-linux            2.5
+- Mtools                3.0
+- Fdutils               4.3
 
 Upgrade notes
 *************
@@ -304,6 +306,31 @@ Please send info about any other packages that 1.3.x "broke" or about
 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
 *************************************************
 
@@ -408,3 +435,16 @@ Util-linux
 
 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
index 6f6fff2096c8080a069cb05237888341de16644f..b32bd115b76a4f1d211980bae4c945d64f6c1613 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION = 1
 PATCHLEVEL = 99
-SUBLEVEL = 3
+SUBLEVEL = 4
 
 ARCH = i386
 
diff --git a/README b/README
index 817978321bd861b903ddb4f09b1876655ddad6b3..8e85e14754ad18bab9e27195fd20d6f8839abe73 100644 (file)
--- a/README
+++ b/README
@@ -1,27 +1,10 @@
 
-       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
@@ -60,16 +43,16 @@ INSTALLING the kernel:
  - 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
@@ -118,7 +101,6 @@ CONFIGURING the kernel:
        "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
@@ -166,7 +148,10 @@ COMPILING the kernel:
 
    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
index 0d2ca57fcd7047ce63196c4619e025864b965de6..d788639a1f83d988376ab672cf687ca064115a6e 100644 (file)
@@ -78,7 +78,6 @@ priority      =  8
 signal         = 12
 blocked                = 16
 flags          = 20
-errno          = 24
 dbgreg6                = 52
 dbgreg7                = 56
 exec_domain    = 60
@@ -298,18 +297,12 @@ ENTRY(system_call)
        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)
@@ -322,12 +315,7 @@ ENTRY(system_call)
 #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
index ce2cc4a060a5db3da2ba6c9f74346580ca909d63..58530bc3efb1e9713fd8e57539b35f7afb3775a1 100644 (file)
@@ -534,6 +534,7 @@ static int fd_eject(int drive)
        udelay(500);
        set_dor(0, ~0x80, 0);
        udelay(500);
+       return 0;
 }
 #else
 #define fd_eject(x) -EINVAL
index edcb43178d740fe03122cec628f6e7a0b5994ce7..275e07005e770f6cc4a5d1ae5d0c33a5daa55455 100644 (file)
@@ -224,15 +224,6 @@ ethif_probe(struct device *dev)
 #   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 *);
        
index 157dd5a6e05103aca89443ad0e2d0b31798f3f07..37d0f9bbc6b6c45d6ff3acab312fe6a168caf491 100644 (file)
@@ -5,7 +5,7 @@
  *             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>
  *
@@ -20,6 +20,8 @@
  *                                     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
@@ -52,7 +54,7 @@
 #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];
 
@@ -277,135 +279,6 @@ static int dlci_transmit(struct sk_buff *skb, struct device *dev)
    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;
@@ -446,9 +319,10 @@ int dlci_config(struct device *dev, struct dlci_conf *conf, int get)
    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);
@@ -461,26 +335,12 @@ int dlci_ioctl(struct device *dev, struct ifreq *ifr, int cmd)
          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:
@@ -559,6 +419,169 @@ static struct enet_statistics *dlci_get_stats(struct device *dev)
    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;
@@ -574,7 +597,7 @@ int dlci_init(struct device *dev)
    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;
@@ -622,18 +645,18 @@ int dlci_setup(void)
 }
 
 #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 */
index 4bf48ec78a18c576db3be75814d51fde238963f5..f04f3f5cf374dd8bf002d9d3469a64946f923027 100644 (file)
@@ -201,14 +201,14 @@ static void scsi_dump_status(void);
     #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
@@ -2255,15 +2255,16 @@ static int update_timeout(Scsi_Cmnd * SCset, int timeout)
      * 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;
index 09963f0d88bfca62b890c49de681586eab9f32c3..aef0846ba0c115b86d9344c3f76595135639452c 100644 (file)
@@ -333,6 +333,7 @@ int parse_rock_ridge_inode(struct iso_directory_record * de,
       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;
@@ -356,10 +357,20 @@ int parse_rock_ridge_inode(struct iso_directory_record * de,
             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;
@@ -475,6 +486,7 @@ char * get_rock_ridge_symlink(struct inode * inode)
       break;
     case SIG('S','L'):
       {int slen;
+       struct SL_component * oldslp;
        struct SL_component * slp;
        slen = rr->len - 5;
        slp = &rr->u.SL.link;
@@ -503,10 +515,25 @@ char * get_rock_ridge_symlink(struct inode * inode)
           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'):
index c7949bd769d21d87b848cdde2f822957d94d451f..8226b6be37b9ca60debd095b582b7f501b38e56c 100644 (file)
@@ -257,6 +257,7 @@ int fcntl_setlk(unsigned int fd, unsigned int cmd, struct flock *l)
        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.
         */
@@ -268,6 +269,7 @@ int fcntl_setlk(unsigned int fd, unsigned int cmd, struct flock *l)
                        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))
@@ -291,8 +293,8 @@ int fcntl_setlk(unsigned int fd, unsigned int cmd, struct flock *l)
        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
@@ -332,36 +334,23 @@ void locks_remove_locks(struct task_struct *task, struct file *filp)
 
 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));
@@ -369,11 +358,24 @@ int locks_verify_area(int read_write, struct inode *inode, struct file *filp,
        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:
@@ -412,9 +414,9 @@ repeat:
                        goto repeat;
                }
        }
-#endif
        return (0);
 }
+#endif
 
 /* Verify a "struct flock" and copy it to a "struct file_lock" as a POSIX
  * style lock.
@@ -939,10 +941,15 @@ static char *lock_get_status(struct file_lock *fl, char *p, int id, char *pfx)
 
        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  ");
index 86fe3dc4ca932f66b53d324a7325b3152b403c1c..7a538e24081251428f48377e1fc733bef27c0778 100644 (file)
@@ -15,7 +15,9 @@ static struct symbol_table procfs_syms = {
 /* 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),
index 2318b9fe240c244791c90eb31ef87ab2dda7b933..e12808a4fc72d8ada3e0137c49551f5a2070e13f 100644 (file)
@@ -15,7 +15,7 @@
 
 #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;
index b3708ef66b1635a946a84cfa724d3fc132bf3e76..c5f34ddac82cef5654fed5bf4df03a4ce6bc4438 100644 (file)
@@ -1,6 +1,7 @@
-#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);
index 2649c51dad5574fc978ef4720433fd076ac68f20..5bc6e6e85c7ac60d3185ec9b7f67245f9d6d0e7f 100644 (file)
@@ -359,29 +359,36 @@ extern void locks_remove_locks(struct task_struct *task, struct file *filp);
 #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);
 }
 
index bacb44b9ad69bee0c5c562504daf6156e3cb91ef..6dcbed8156bd378b762d8b1873e68eee28c9312d 100644 (file)
 #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
 {
index 461979d0bd5f95163816dd93dc1e45be41696ecc..5e0e24a1c5e4e6cf0f1570f01a62d7c43f1a55b5 100644 (file)
 #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 */
index 41437f32ff2994337086e900b4fe529d8c5b2252..99a608695e0c0c7941469be35db623170a7c5962 100644 (file)
 #warning Perhaps irq and i/o settings are wrong.
 #endif
 
-#endif         /* __MCDX_H */
\ No newline at end of file
+#endif         /* __MCDX_H */
index c268b6e06131e1a086ca0eee93c33151ecdef775..12a8ae45e74f2033646aff740b1b7689b5c60733 100644 (file)
 #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 */
 
index 2d6bd446a56aca5a91681070ae5af71ad41c7306..1e03feb647ec6a426d04c6940d4e0dd91417f62f 100644 (file)
@@ -830,7 +830,7 @@ int atif_ioctl(int cmd, void *arg)
                                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++)
index 007c70ff1a6f13747064fdafeefd5405eacdf28f..fcc99e7d0d921fb5f2d5845f796cf95629eb6e6a 100644 (file)
@@ -48,6 +48,7 @@
  *             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
@@ -112,6 +113,14 @@ extern int afinet_get_info(char *, char **, off_t, int, int);
 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;
 
 /*
@@ -1292,6 +1301,24 @@ static int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
                        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)))
index 605542b52852252b6c3350a826f54db18e202fff..cfb52888cda22df771a0a8f0ee9a4b42082c6269 100644 (file)
@@ -51,6 +51,9 @@ extern void destroy_EII_client(struct datalink_proto *);
 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>
@@ -85,6 +88,11 @@ static struct symbol_table net_syms = {
        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),
index b3e8c056bf13587f52ae86cebdde8b74595c9e0c..1ea9cae4aaca5f472f5729da073ba3f379485fc8 100644 (file)
@@ -505,6 +505,7 @@ static int unix_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le
                        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);