lkml.org 
[lkml]   [1998]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[2.1.71+:Patch] ftape compile fixes
  I've been modifying it since 2.1.7something.  I finally made a patch for
2.1.77 which has been working fine through pre-2.1.80-2. The purpose of
this patch is to get ftape to compile and work... well so far work. :)
I'm not going for correctness and I'm sure most of it isn't.

------------------------------------------------------------------------------
mrj@gr.cns.net Jeff DeFouw
MrJ WorldWide Free-Net IRC Network (WWFIN) Technical Director
------------------------------------------------------------------------------diff -ur /tmp/linux-2.1.77/drivers/char/ftape/lowlevel/fdc-io.c linux-2.1.77/drivers/char/ftape/lowlevel/fdc-io.c
--- /tmp/linux-2.1.77/drivers/char/ftape/lowlevel/fdc-io.c Thu Dec 4 17:20:55 1997
+++ linux-2.1.77/drivers/char/ftape/lowlevel/fdc-io.c Tue Dec 23 22:03:50 1997
@@ -385,7 +385,7 @@
int fdc_interrupt_wait(unsigned int time)
{
struct wait_queue wait = {current, NULL};
- int current_blocked = current->blocked;
+ sigset_t current_blocked = current->blocked;
static int resetting = 0;
TRACE_FUN(ft_t_fdc_dma);

@@ -401,7 +401,7 @@
/* timeout time will be up to USPT microseconds too long ! */
current->timeout = jiffies + (1000 * time + FT_USPT - 1) / FT_USPT;
current->state = TASK_INTERRUPTIBLE;
- current->blocked = _BLOCK_ALL; /* isn't this already set by the
+ sigfillset(&current->blocked); /* isn't this already set by the
* high level routines?
*/
add_wait_queue(&ftape_wait_intr, &wait);
diff -ur /tmp/linux-2.1.77/drivers/char/ftape/lowlevel/ftape-ctl.c linux-2.1.77/drivers/char/ftape/lowlevel/ftape-ctl.c
--- /tmp/linux-2.1.77/drivers/char/ftape/lowlevel/ftape-ctl.c Thu Dec 4 17:18:21 1997
+++ linux-2.1.77/drivers/char/ftape/lowlevel/ftape-ctl.c Tue Dec 23 22:05:27 1997
@@ -794,8 +794,8 @@
i, *ft_buffer[i]->address);
}
}
- if ((current->signal & _DONT_BLOCK) &&
- !(current->signal & _NEVER_BLOCK) &&
+ if ((current->signal.sig[0] & _DONT_BLOCK) &&
+ !(current->signal.sig[0] & _NEVER_BLOCK) &&
ftape_tape_running) {
TRACE(ft_t_warn,
"Interrupted by fatal signal and tape still running");
diff -ur /tmp/linux-2.1.77/drivers/char/ftape/lowlevel/ftape-rw.c linux-2.1.77/drivers/char/ftape/lowlevel/ftape-rw.c
--- /tmp/linux-2.1.77/drivers/char/ftape/lowlevel/ftape-rw.c Thu Dec 4 17:18:21 1997
+++ linux-2.1.77/drivers/char/ftape/lowlevel/ftape-rw.c Tue Dec 23 22:04:43 1997
@@ -432,7 +432,7 @@
*/
result = ftape_ready_wait(ftape_timeout.pause,&status);
}
- } while (ftape_tape_running && (current->signal & _NEVER_BLOCK) == 0);
+ } while (ftape_tape_running && (current->signal.sig[0] & _NEVER_BLOCK) == 0);
#ifndef TESTING
ft_location.known = 0;
#endif
@@ -660,7 +660,7 @@
* to find a way to skip an EMPTY_SEGMENT. !!! FIXME !!!
*/
if (ftape_read_id() < 0 || !ft_location.known ||
- (current->signal & _DONT_BLOCK)) {
+ (current->signal.sig[0] & _DONT_BLOCK)) {
ft_location.known = 0;
if (!ftape_tape_running ||
++failures > FT_SECTORS_PER_SEGMENT) {
@@ -775,7 +775,7 @@
fast_seek(count, 1);
logical_forward();
if (ftape_read_id() < 0 || !ft_location.known ||
- (current->signal & _DONT_BLOCK)) {
+ (current->signal.sig[0] & _DONT_BLOCK)) {
if ((!ftape_tape_running && !ft_location.known) ||
++failures > FT_SECTORS_PER_SEGMENT) {
TRACE_ABORT(-EIO, ft_t_err,
@@ -1001,7 +1001,7 @@
while (result < 0 &&
retry++ <= 5 &&
!ft_failure &&
- (current->signal & _DONT_BLOCK) == 0) {
+ (current->signal.sig[0] & _DONT_BLOCK) == 0) {

if (retry && start_offset < 5) {
start_offset ++;
diff -ur /tmp/linux-2.1.77/drivers/char/ftape/lowlevel/ftape-tracing.h linux-2.1.77/drivers/char/ftape/lowlevel/ftape-tracing.h
--- /tmp/linux-2.1.77/drivers/char/ftape/lowlevel/ftape-tracing.h Thu Dec 4 17:18:21 1997
+++ linux-2.1.77/drivers/char/ftape/lowlevel/ftape-tracing.h Tue Dec 23 22:09:22 1997
@@ -171,7 +171,7 @@
* but rather into ftape-rw.h (maybe)
*/
#define FT_SIGNAL_EXIT(sig_mask) \
- if (current->signal & (sig_mask)) { \
+ if (current->signal.sig[0] & (sig_mask)) { \
TRACE_ABORT(-EINTR, \
ft_t_warn, \
"interrupted by non-blockable signal"); \
diff -ur /tmp/linux-2.1.77/drivers/char/ftape/zftape/zftape-init.c linux-2.1.77/drivers/char/ftape/zftape/zftape-init.c
--- /tmp/linux-2.1.77/drivers/char/ftape/zftape/zftape-init.c Thu Dec 4 17:18:23 1997
+++ linux-2.1.77/drivers/char/ftape/zftape/zftape-init.c Tue Dec 23 22:10:10 1997
@@ -73,7 +73,7 @@
/* 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 @@
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,7 +186,8 @@
/* 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;
}
}
@@ -210,7 +211,7 @@
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 +236,7 @@
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 +244,7 @@
"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 +262,7 @@
#endif
{
int result = -EIO;
- int old_sigmask;
+ sigset_t old_sigmask;
TRACE_FUN(ft_t_flow);

if (!busy_flag ||
@@ -276,7 +277,7 @@
"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, };
@@ -307,7 +308,7 @@
#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 +320,7 @@
"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 +344,7 @@
#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 +356,7 @@
"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);
\
 
 \ /
  Last update: 2005-03-22 13:41    [from the cache]
©2003-2011 Jasper Spaans