patch-2.0.1 linux/arch/alpha/kernel/osf_sys.c
Next file: linux/arch/alpha/kernel/process.c
Previous file: linux/arch/alpha/kernel/irq.c
Back to the patch index
Back to the overall index
- Lines: 37
- Date:
Wed Jun 26 11:05:40 1996
- Orig file:
v2.0.0/linux/arch/alpha/kernel/osf_sys.c
- Orig date:
Fri Apr 12 15:51:45 1996
diff -u --recursive --new-file v2.0.0/linux/arch/alpha/kernel/osf_sys.c linux/arch/alpha/kernel/osf_sys.c
@@ -125,14 +125,22 @@
return count - buf.count;
}
-asmlinkage int osf_getpriority(int which, int who)
+/*
+ * Alpha syscall convention has no problem returning negative
+ * values:
+ */
+asmlinkage int osf_getpriority(int which, int who, int a2, int a3, int a4,
+ int a5, struct pt_regs regs)
{
extern int sys_getpriority(int, int);
- /*
- * Alpha syscall convention has no problem returning negative
- * values:
- */
- return 20 - sys_getpriority(which, who);
+ int prio;
+
+ prio = sys_getpriority(which, who);
+ if (prio < 0)
+ return prio;
+
+ regs.r0 = 0; /* special return: no errors */
+ return 20 - prio;
}
@@ -177,6 +185,7 @@
if (fd >= NR_OPEN || !(file = current->files->fd[fd]))
return -EBADF;
}
+ flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
return do_mmap(file, addr, len, prot, flags, off);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov