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