To: linux-m68k@lists.linux-m68k.org
Subject: L68K: 2.1.101
X-Yow: Who wants some OYSTERS with SEN-SEN an' COOL WHIP?
From: Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Date: 18 May 1998 10:38:52 +0200
Sender: owner-linux-m68k@phil.uni-sb.de

A few more changes for 2.1.101:

- add sys_cap[gs]et
- initialize floppy driver only once
- change suser to capable
- remove support for TIOCSER[GS]WILD to follow pc serial driver
- merge driver/scsi/Makefile with official one
- fix inode link counting in devpts fs

Andreas.

----------------------------------------------------------------------
--- linux-2.1.101/arch/m68k/kernel/entry.S.~1~	Fri Apr  3 17:41:19 1998
+++ linux-2.1.101/arch/m68k/kernel/entry.S	Fri May  8 18:12:19 1998
@@ -580,6 +580,8 @@
 	.long SYMBOL_NAME(sys_pwrite)
 	.long SYMBOL_NAME(sys_lchown);
 	.long SYMBOL_NAME(sys_getcwd)
+	.long SYMBOL_NAME(sys_capget)
+	.long SYMBOL_NAME(sys_capset)           /* 185 */
 	.rept NR_syscalls-(.-SYMBOL_NAME(sys_call_table))/4
 		.long SYMBOL_NAME(sys_ni_syscall)
 	.endr
--- linux-2.1.101/drivers/block/ll_rw_blk.c.~1~	Fri May 15 17:36:14 1998
+++ linux-2.1.101/drivers/block/ll_rw_blk.c	Mon May 11 18:20:29 1998
@@ -828,12 +828,6 @@
 #endif
 #ifdef CONFIG_MAC_FLOPPY
 	swim3_init();
-#endif
-#ifdef CONFIG_AMIGA_FLOPPY
-	amiga_floppy_init();
-#endif
-#ifdef CONFIG_ATARI_FLOPPY
-	atari_floppy_init();
 #endif
 #ifdef CONFIG_AMIGA_FLOPPY
 	amiga_floppy_init();
--- linux-2.1.101/drivers/char/console.new.c.~1~	Fri May 15 17:36:33 1998
+++ linux-2.1.101/drivers/char/console.new.c	Fri May  8 21:46:48 1998
@@ -299,7 +299,7 @@
 	    long p, q;
 
 	    /* prevent users from taking too much memory */
-	    if (currcons >= MAX_NR_USER_CONSOLES && !suser())
+	    if (currcons >= MAX_NR_USER_CONSOLES && !capable(CAP_SYS_RESOURCE))
 	      return -EPERM;
 
 	    /* due to the granularity of kmalloc, we waste some memory here */
--- linux-2.1.101/drivers/char/m68kserial.c.~1~	Fri May 15 17:36:43 1998
+++ linux-2.1.101/drivers/char/m68kserial.c	Fri May 15 18:21:39 1998
@@ -665,7 +665,7 @@
 	     (new_serial.close_delay != info->close_delay) ||
 	     ((new_serial.flags & ~ASYNC_USR_MASK) !=
 	      (info->flags & ~ASYNC_USR_MASK)))
-	    && !suser())
+	    && !capable(CAP_SYS_ADMIN))
 		return -EPERM;
 
 	/*
@@ -768,8 +768,7 @@
 		return -ENODEV;
 
 	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
-	    (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGWILD)  &&
-	    (cmd != TIOCSERSWILD) && (cmd != TIOCSERGSTRUCT) &&
+	    (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
 	    (cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
 		if (tty->flags & (1 << TTY_IO_ERROR))
 		    return -EIO;
@@ -792,17 +791,8 @@
 			/* return do_autoconfig(info); */
 			return ( 0 );
 
-		case TIOCSERGWILD:
-			/* no wild mask */
-			return put_user(0, (unsigned int *) arg);
-
 		case TIOCSERGETLSR: /* Get line status register */
 			return put_user(0, (unsigned int *) arg);
-
-		case TIOCSERSWILD:
-			if (!suser())
-				return -EPERM;
-			return 0;
 
 		case TIOCSERGSTRUCT:
 			if (copy_to_user((struct m68k_async_struct *) arg,
--- linux-2.1.101/drivers/scsi/Makefile.~1~	Mon May  4 18:14:39 1998
+++ linux-2.1.101/drivers/scsi/Makefile	Sun May 17 13:49:01 1998
@@ -187,6 +187,14 @@
   endif
 endif
 
+ifeq ($(CONFIG_SCSI_SGIWD93),y)
+L_OBJS += sgiwd93.o wd33c93.o
+else
+  ifeq ($(CONFIG_SCSI_SGIWD93),m)
+  M_OBJS += sgiwd93.o wd33c93.o
+  endif
+endif
+
 ifeq ($(CONFIG_CYBERSTORM_SCSI),y)
 L_OBJS += NCR53C9x.o cyberstorm.o
 else
@@ -528,19 +536,23 @@
 
 include $(TOPDIR)/Rules.make
 
-53c8xx_d.h 53c8xx_u.h : 53c7,8xx.scr script_asm.pl
-	ln -sf 53c7,8xx.scr fake.c
-	$(CPP) -traditional -DCHIP=810 fake.c | grep -v '^#' | perl script_asm.pl 
+53c8xx_d.h: 53c7,8xx.scr script_asm.pl
+	ln -sf 53c7,8xx.scr fake8.c
+	$(CPP) -traditional -DCHIP=810 fake8.c | grep -v '^#' | perl script_asm.pl 
 	mv script.h 53c8xx_d.h
 	mv scriptu.h 53c8xx_u.h
-	rm fake.c
+	rm fake8.c
+
+53c8xx_u.h: 53c8xx_d.h
 
-53c7xx_d.h 53c7xx_u.h : 53c7xx.scr script_asm.pl
-	ln -sf 53c7xx.scr fake.c
-	$(CPP) -traditional -DCHIP=710 fake.c | grep -v '^#' | perl -s script_asm.pl -ncr7x0_family
+53c7xx_d.h: 53c7xx.scr script_asm.pl
+	ln -sf 53c7xx.scr fake7.c
+	$(CPP) -traditional -DCHIP=710 fake7.c | grep -v '^#' | perl -s script_asm.pl -ncr7x0_family
 	mv script.h 53c7xx_d.h
 	mv scriptu.h 53c7xx_u.h
-	rm fake.c
+	rm fake7.c
+
+53c7xx_u.h: 53c7xx_d.h
 
 53c7xx.o : 53c7xx_d.h
 
--- linux-2.1.101/fs/devpts/inode.c.~1~	Wed Apr  8 20:34:20 1998
+++ linux-2.1.101/fs/devpts/inode.c	Thu May  7 23:32:13 1998
@@ -28,15 +28,6 @@
 
 static struct super_block *mounts = NULL;
 
-static void devpts_put_inode(struct inode *inode)
-{
-}
-
-static void devpts_delete_inode(struct inode *inode)
-{
-	inode->i_size = 0;
-}
-
 static void devpts_put_super(struct super_block *sb)
 {
 	struct devpts_sb_info *sbi = SBI(sb);
@@ -48,6 +39,7 @@
 			if ( inode->i_count != 1 )
 				printk("devpts_put_super: badness: entry %d count %d\n",
 				       i, inode->i_count);
+			inode->i_nlink--;
 			iput(inode);
 		}
 	}
@@ -70,8 +62,8 @@
 static struct super_operations devpts_sops = {
 	devpts_read_inode,
 	devpts_write_inode,
-	devpts_put_inode,
-	devpts_delete_inode,
+	NULL,			/* put_inode */
+	NULL,			/* delete_inode */
 	NULL,			/* notify_change */
 	devpts_put_super,
 	NULL,			/* write_super */
@@ -281,8 +273,6 @@
 	if ( ino >= NR_PTYS )
 		return;		/* Bogus */
 	
-	inode->i_nlink = 1;
-
 	inode->i_mode = S_IFCHR;
 	inode->i_rdev = MKDEV(0,0); /* Gets filled in by devpts_pty_new() */
 
@@ -322,6 +312,7 @@
 			inode->i_gid = sbi->setgid ? sbi->gid : current->fsgid;
 			inode->i_mode = sbi->mode | S_IFCHR;
 			inode->i_rdev = device;
+			inode->i_nlink++;
 			sbi->inodes[number] = inode;
 		}
 	}
@@ -340,7 +331,7 @@
 
 		if ( inode ) {
 			sbi->inodes[number] = NULL;
-			inode->i_nlink = 0; /* Is this right? */
+			inode->i_nlink--;
 			iput(inode);
 		}
 	}
--- linux-2.1.101/include/asm-m68k/unistd.h.~1~	Thu Apr  9 19:16:23 1998
+++ linux-2.1.101/include/asm-m68k/unistd.h	Fri May  8 18:35:08 1998
@@ -188,6 +188,8 @@
 #define __NR_pwrite		181
 #define __NR_lchown		182
 #define __NR_getcwd		183
+#define __NR_capget		184
+#define __NR_capset		185
 
 /* user-visible error numbers are in the range -1 - -122: see
    <asm-m68k/errno.h> */
