1 /*
2  * $Id: mount_irix.c,v 5.2.1.1 90/10/21 22:30:59 jsp Exp $
3  *
4  * Copyright (c) 1990 Jan-Simon Pendry
5  * Copyright (c) 1990 Imperial College of Science, Technology & Medicine
6  * Copyright (c) 1990 The Regents of the University of California.
7  * All rights reserved.
8  *
9  * This code is derived from software contributed to Berkeley by
10  * Jan-Simon Pendry at Imperial College, London.
11  *
12  * %sccs.include.redist.c%
13  *
14  *	@(#)mount_irix.c	5.2 (Berkeley) 03/17/91
15  */
16 
17 
18 /*
19  * IRIX Mount helper
20  */
21 
22 #include "misc-irix.h"
23 
24 /*
25  * Map from conventional mount arguments
26  * to IRIX style arguments.
27  */
28 irix_mount(fsname, dir, flags, type, data)
29 char *fsname;
30 char *dir;
31 int flags;
32 int type;
33 void *data;
34 {
35 	int size;
36 
37 #ifdef DEBUG
38 	dlog("irix_mount: fsname %s, dir %s, type %d", fsname, dir, type);
39 #endif /* DEBUG */
40 
41 	if (type == MOUNT_TYPE_NFS) {
42 
43 		size = sizeof (struct nfs_args);
44 
45 		return mount(dir, dir, (MS_FSS|MS_DATA|flags),
46 			     type, (struct nfs_args *) data, size);
47 
48 	} else if (type == MOUNT_TYPE_UFS) {
49 
50 		return mount(fsname, dir, (MS_FSS|flags), type);
51 
52 	} else {
53 		return EINVAL;
54 	}
55 
56 }
57