Deleted Added
full compact
mount_msdosfs.c (77162) mount_msdosfs.c (77577)
1/* $NetBSD: mount_msdos.c,v 1.18 1997/09/16 12:24:18 lukem Exp $ */
2
3/*
4 * Copyright (c) 1994 Christopher G. Demetriou
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 18 unchanged lines hidden (view full) ---

27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#ifndef lint
34static const char rcsid[] =
1/* $NetBSD: mount_msdos.c,v 1.18 1997/09/16 12:24:18 lukem Exp $ */
2
3/*
4 * Copyright (c) 1994 Christopher G. Demetriou
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 18 unchanged lines hidden (view full) ---

27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#ifndef lint
34static const char rcsid[] =
35 "$FreeBSD: head/sbin/mount_msdosfs/mount_msdosfs.c 77162 2001-05-25 08:14:14Z ru $";
35 "$FreeBSD: head/sbin/mount_msdosfs/mount_msdosfs.c 77577 2001-06-01 10:57:26Z ru $";
36#endif /* not lint */
37
38#include <sys/param.h>
39#include <sys/mount.h>
40#include <sys/stat.h>
41
42#include <fs/msdosfs/msdosfsmount.h>
43

--- 124 unchanged lines hidden (view full) ---

168 if (!set_uid)
169 args.uid = sb.st_uid;
170 if (!set_gid)
171 args.gid = sb.st_gid;
172 if (!set_mask)
173 args.mask = sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
174 }
175
36#endif /* not lint */
37
38#include <sys/param.h>
39#include <sys/mount.h>
40#include <sys/stat.h>
41
42#include <fs/msdosfs/msdosfsmount.h>
43

--- 124 unchanged lines hidden (view full) ---

168 if (!set_uid)
169 args.uid = sb.st_uid;
170 if (!set_gid)
171 args.gid = sb.st_gid;
172 if (!set_mask)
173 args.mask = sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
174 }
175
176 error = getvfsbyname("msdos", &vfc);
177 if (error && vfsisloadable("msdos")) {
178 if (vfsload("msdos"))
179 err(EX_OSERR, "vfsload(msdos)");
176 error = getvfsbyname("msdosfs", &vfc);
177 if (error && vfsisloadable("msdosfs")) {
178 if (vfsload("msdosfs"))
179 err(EX_OSERR, "vfsload(msdosfs)");
180 endvfsent(); /* clear cache */
180 endvfsent(); /* clear cache */
181 error = getvfsbyname("msdos", &vfc);
181 error = getvfsbyname("msdosfs", &vfc);
182 }
183 if (error)
184 errx(EX_OSERR, "msdos filesystem is not available");
185
186 if (mount(vfc.vfc_name, mntpath, mntflags, &args) < 0)
187 err(EX_OSERR, "%s", dev);
188
189 exit (0);

--- 56 unchanged lines hidden (view full) ---

246 errx(EX_USAGE, "invalid file mode: %s", s);
247 return (rv);
248}
249
250void
251usage()
252{
253 fprintf(stderr, "%s\n%s\n",
182 }
183 if (error)
184 errx(EX_OSERR, "msdos filesystem is not available");
185
186 if (mount(vfc.vfc_name, mntpath, mntflags, &args) < 0)
187 err(EX_OSERR, "%s", dev);
188
189 exit (0);

--- 56 unchanged lines hidden (view full) ---

246 errx(EX_USAGE, "invalid file mode: %s", s);
247 return (rv);
248}
249
250void
251usage()
252{
253 fprintf(stderr, "%s\n%s\n",
254 "usage: mount_msdos [-o options] [-u user] [-g group] [-m mask]",
255 " [-s] [-l] [-9] [-L locale] [-W table] bdev dir");
254 "usage: mount_msdosfs [-o options] [-u user] [-g group] [-m mask]",
255 " [-s] [-l] [-9] [-L locale] [-W table] bdev dir");
256 exit(EX_USAGE);
257}
258
259void
260load_u2wtable (pargs, name)
261 struct msdosfs_args *pargs;
262 char *name;
263{

--- 76 unchanged lines hidden ---
256 exit(EX_USAGE);
257}
258
259void
260load_u2wtable (pargs, name)
261 struct msdosfs_args *pargs;
262 char *name;
263{

--- 76 unchanged lines hidden ---