patch-1.3.2 linux/arch/alpha/kernel/osf_sys.c
Next file: linux/arch/alpha/kernel/setup.c
Previous file: linux/arch/alpha/kernel/irq.c
Back to the patch index
Back to the overall index
- Lines: 67
- Date:
Fri Jun 16 19:47:45 1995
- Orig file:
v1.3.1/linux/arch/alpha/kernel/osf_sys.c
- Orig date:
Mon Jun 12 12:22:20 1995
diff -u --recursive --new-file v1.3.1/linux/arch/alpha/kernel/osf_sys.c linux/arch/alpha/kernel/osf_sys.c
@@ -26,6 +26,7 @@
#include <linux/major.h>
#include <linux/stat.h>
#include <linux/mman.h>
+#include <linux/shm.h>
#include <asm/segment.h>
#include <asm/system.h>
@@ -41,7 +42,7 @@
extern void put_unnamed_dev(dev_t);
extern asmlinkage int sys_umount(char *);
-extern asmlinkage int sys_swapon(const char *specialfile);
+extern asmlinkage int sys_swapon(const char *specialfile, int swap_flags);
/*
* OSF/1 directory handling functions...
@@ -51,7 +52,7 @@
* offset differences aren't the same as "d_reclen").
*/
#define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de)))
-#define ROUND_UP(x) (((x)+7) & ~7)
+#define ROUND_UP(x) (((x)+3) & ~3)
struct osf_dirent {
unsigned int d_ino;
@@ -115,7 +116,7 @@
buf.basep = basep;
buf.count = count;
buf.error = 0;
- error = file->f_op->readdir(file->f_inode, file, dirent, osf_filldir);
+ error = file->f_op->readdir(file->f_inode, file, &buf, osf_filldir);
if (error < 0)
return error;
if (count == buf.count)
@@ -442,8 +443,8 @@
asmlinkage int osf_swapon(const char * path, int flags, int lowat, int hiwat)
{
- /* for now, simply ignore flags, lowat and hiwat... */
- return sys_swapon(path);
+ /* for now, simply ignore lowat and hiwat... */
+ return sys_swapon(path, flags);
}
asmlinkage unsigned long sys_getpagesize(void)
@@ -491,4 +492,20 @@
break;
}
return 0;
+}
+
+
+asmlinkage long osf_shmat(int shmid, void *shmaddr, int shmflg)
+{
+ unsigned long raddr;
+ int err;
+
+ err = sys_shmat(shmid, shmaddr, shmflg, &raddr);
+ if (err)
+ return err;
+ /*
+ * This works because all user-level addresses are
+ * non-negative longs!
+ */
+ return raddr;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this