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  * Redistribution and use in source and binary forms are permitted provided
13  * that: (1) source distributions retain this entire copyright notice and
14  * comment, and (2) distributions including binaries display the following
15  * acknowledgement:  ``This product includes software developed by the
16  * University of California, Berkeley and its contributors'' in the
17  * documentation or other materials provided with the distribution and in
18  * all advertising materials mentioning features or use of this software.
19  * Neither the name of the University nor the names of its contributors may
20  * be used to endorse or promote products derived from this software without
21  * specific prior written permission.
22  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
23  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
24  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
25  *
26  *	@(#)mount_irix.c	5.1 (Berkeley) 03/17/91
27  */
28 
29 
30 /*
31  * IRIX Mount helper
32  */
33 
34 #include "misc-irix.h"
35 
36 /*
37  * Map from conventional mount arguments
38  * to IRIX style arguments.
39  */
40 irix_mount(fsname, dir, flags, type, data)
41 char *fsname;
42 char *dir;
43 int flags;
44 int type;
45 void *data;
46 {
47 	int size;
48 
49 #ifdef DEBUG
50 	dlog("irix_mount: fsname %s, dir %s, type %d", fsname, dir, type);
51 #endif /* DEBUG */
52 
53 	if (type == MOUNT_TYPE_NFS) {
54 
55 		size = sizeof (struct nfs_args);
56 
57 		return mount(dir, dir, (MS_FSS|MS_DATA|flags),
58 			     type, (struct nfs_args *) data, size);
59 
60 	} else if (type == MOUNT_TYPE_UFS) {
61 
62 		return mount(fsname, dir, (MS_FSS|flags), type);
63 
64 	} else {
65 		return EINVAL;
66 	}
67 
68 }
69