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