summaryrefslogtreecommitdiffstats
path: root/drivers/char/ftape/zftape
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-03-17 22:05:47 +0000
commit27cfca1ec98e91261b1a5355d10a8996464b63af (patch)
tree8e895a53e372fa682b4c0a585b9377d67ed70d0e /drivers/char/ftape/zftape
parent6a76fb7214c477ccf6582bd79c5b4ccc4f9c41b1 (diff)
Look Ma' what I found on my harddisk ...
o New faster syscalls for 2.1.x, too o Upgrade to 2.1.89. Don't try to run this. It's flaky as hell. But feel free to debug ...
Diffstat (limited to 'drivers/char/ftape/zftape')
-rw-r--r--drivers/char/ftape/zftape/.cvsignore1
-rw-r--r--drivers/char/ftape/zftape/zftape-init.c37
-rw-r--r--drivers/char/ftape/zftape/zftape-rw.c1
-rw-r--r--drivers/char/ftape/zftape/zftape-rw.h1
-rw-r--r--drivers/char/ftape/zftape/zftape_syms.c1
5 files changed, 18 insertions, 23 deletions
diff --git a/drivers/char/ftape/zftape/.cvsignore b/drivers/char/ftape/zftape/.cvsignore
index 4671378ae..857dd22e9 100644
--- a/drivers/char/ftape/zftape/.cvsignore
+++ b/drivers/char/ftape/zftape/.cvsignore
@@ -1 +1,2 @@
.depend
+.*.flags
diff --git a/drivers/char/ftape/zftape/zftape-init.c b/drivers/char/ftape/zftape/zftape-init.c
index c6a4f4506..0c8a6f9eb 100644
--- a/drivers/char/ftape/zftape/zftape-init.c
+++ b/drivers/char/ftape/zftape/zftape-init.c
@@ -73,7 +73,7 @@ const ftape_info *zft_status;
/* Local vars.
*/
static int busy_flag = 0;
-static int orig_sigmask;
+static sigset_t orig_sigmask;
/* the interface to the kernel vfs layer
*/
@@ -171,7 +171,7 @@ static int zft_open(struct inode *ino, struct file *filep)
TRACE_ABORT(-ENXIO, ft_t_err, "failed: illegal unit nr");
}
orig_sigmask = current->blocked;
- current->blocked = _BLOCK_ALL;
+ sigfillset(&current->blocked);
result = _zft_open(MINOR(ino->i_rdev), filep->f_flags & O_ACCMODE);
if (result < 0) {
current->blocked = orig_sigmask; /* restore mask */
@@ -186,18 +186,15 @@ static int zft_open(struct inode *ino, struct file *filep)
/* Mask signals that will disturb proper operation of the
* program that is calling.
*/
- current->blocked = orig_sigmask | _DO_BLOCK;
+ current->blocked = orig_sigmask;
+ sigaddsetmask (&current->blocked, _DO_BLOCK);
TRACE_EXIT 0;
}
}
/* Close floppy tape device
*/
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,31)
static int zft_close(struct inode *ino, struct file *filep)
-#else
-static void zft_close(struct inode *ino, struct file *filep)
-#endif
{
int result;
TRACE_FUN(ft_t_flow);
@@ -210,7 +207,7 @@ static void zft_close(struct inode *ino, struct file *filep)
TRACE_EXIT; /* keep busy_flag !(?) */
#endif
}
- current->blocked = _BLOCK_ALL;
+ sigfillset(&current->blocked);
result = _zft_close();
if (result < 0) {
TRACE(ft_t_err, "_zft_close failed");
@@ -235,7 +232,7 @@ static int zft_ioctl(struct inode *ino, struct file *filep,
unsigned int command, unsigned long arg)
{
int result = -EIO;
- int old_sigmask;
+ sigset_t old_sigmask;
TRACE_FUN(ft_t_flow);
if (!busy_flag || MINOR(ino->i_rdev) != zft_unit || ft_failure) {
@@ -243,7 +240,7 @@ static int zft_ioctl(struct inode *ino, struct file *filep,
"failed: not busy, failure or wrong unit");
}
old_sigmask = current->blocked; /* save mask */
- current->blocked = _BLOCK_ALL;
+ sigfillset(&current->blocked);
/* This will work as long as sizeof(void *) == sizeof(long) */
result = _zft_ioctl(command, (void *) arg);
current->blocked = old_sigmask; /* restore mask */
@@ -261,7 +258,7 @@ static int zft_mmap(struct inode *ino,
#endif
{
int result = -EIO;
- int old_sigmask;
+ sigset_t old_sigmask;
TRACE_FUN(ft_t_flow);
if (!busy_flag ||
@@ -276,18 +273,14 @@ static int zft_mmap(struct inode *ino,
"failed: not busy, failure or wrong unit");
}
old_sigmask = current->blocked; /* save mask */
- current->blocked = _BLOCK_ALL;
+ sigfillset(&current->blocked);
if ((result = ftape_mmap(vma)) >= 0) {
#ifndef MSYNC_BUG_WAS_FIXED
static struct vm_operations_struct dummy = { NULL, };
vma->vm_ops = &dummy;
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,45)
- vma->vm_dentry = dget(filep->f_dentry);
-#else
- vma_set_inode (vma, ino);
- inode_inc_count (ino);
-#endif
+ vma->vm_file = filep;
+ filep->f_count++;
}
current->blocked = old_sigmask; /* restore mask */
TRACE_EXIT result;
@@ -307,7 +300,7 @@ static int zft_read(struct inode *ino, struct file *fp, char *buff,
#endif
{
int result = -EIO;
- int old_sigmask;
+ sigset_t old_sigmask;
#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,60)
struct inode *ino = fp->f_dentry->d_inode;
#endif
@@ -319,7 +312,7 @@ static int zft_read(struct inode *ino, struct file *fp, char *buff,
"failed: not busy, failure or wrong unit");
}
old_sigmask = current->blocked; /* save mask */
- current->blocked = _BLOCK_ALL;
+ sigfillset(&current->blocked);
result = _zft_read(buff, req_len);
current->blocked = old_sigmask; /* restore mask */
TRACE(ft_t_data_flow, "return with count: %d", result);
@@ -343,7 +336,7 @@ static int zft_write(struct inode *ino, struct file *fp, char *buff,
#endif
{
int result = -EIO;
- int old_sigmask;
+ sigset_t old_sigmask;
#if LINUX_VERSION_CODE >= KERNEL_VER(2,1,60)
struct inode *ino = fp->f_dentry->d_inode;
#endif
@@ -355,7 +348,7 @@ static int zft_write(struct inode *ino, struct file *fp, char *buff,
"failed: not busy, failure or wrong unit");
}
old_sigmask = current->blocked; /* save mask */
- current->blocked = _BLOCK_ALL;
+ sigfillset(&current->blocked);
result = _zft_write(buff, req_len);
current->blocked = old_sigmask; /* restore mask */
TRACE(ft_t_data_flow, "return with count: %d", result);
diff --git a/drivers/char/ftape/zftape/zftape-rw.c b/drivers/char/ftape/zftape/zftape-rw.c
index d8ae9f1e7..784068096 100644
--- a/drivers/char/ftape/zftape/zftape-rw.c
+++ b/drivers/char/ftape/zftape/zftape-rw.c
@@ -24,6 +24,7 @@
* zftape.
*/
+#include <linux/config.h> /* for CONFIG_ZFT_DFLT_BLK_SZ */
#include <linux/errno.h>
#include <linux/mm.h>
#include <asm/segment.h>
diff --git a/drivers/char/ftape/zftape/zftape-rw.h b/drivers/char/ftape/zftape/zftape-rw.h
index a8622867b..69678229e 100644
--- a/drivers/char/ftape/zftape/zftape-rw.h
+++ b/drivers/char/ftape/zftape/zftape-rw.h
@@ -28,6 +28,7 @@
*
*/
+#include <linux/config.h> /* for CONFIG_ZFT_DFLT_BLK_SZ */
#include "../zftape/zftape-buffers.h"
#define SEGMENTS_PER_TAPE (ft_segments_per_track * ft_tracks_per_tape)
diff --git a/drivers/char/ftape/zftape/zftape_syms.c b/drivers/char/ftape/zftape/zftape_syms.c
index 71b3175a5..09e77bf10 100644
--- a/drivers/char/ftape/zftape/zftape_syms.c
+++ b/drivers/char/ftape/zftape/zftape_syms.c
@@ -24,7 +24,6 @@
* the ftape floppy tape driver exports
*/
-#include <linux/config.h>
#define __NO_VERSION__
#include <linux/module.h>