Put in proper address information for Poul-Henning Kamp.
[unix-history] / sbin / mount_isofs / mount_isofs.c
... / ...
CommitLineData
1#ifndef lint
2static char rcsid[] = "$Header: /a/cvs/386BSD/src/sbin/mount_isofs/mount_isofs.c,v 1.2 1993/07/20 03:33:49 jkh Exp $";
3#endif
4
5#include <stdio.h>
6#include <sys/types.h>
7#include <sys/mount.h>
8
9void
10usage ()
11{
12 fprintf (stderr, "usage: mount_iso bdev dir\n");
13 exit (1);
14}
15
16int
17main (argc, argv)
18int argc;
19char **argv;
20{
21 char *dev;
22 char *dir;
23 struct ufs_args args;
24 int c;
25 int opts;
26
27 opts = MNT_RDONLY;
28
29 argc--;
30 argv++;
31 while (argc > 2) {
32 if (!strcmp("-F", argv[0])) {
33 argc--; argv++;
34 opts |= atoi(argv[0]);
35 argc--; argv++;
36 } else if (!strcmp(argv[0], "-norrip")) {
37 opts |= MNT_NORRIP;
38 argc--; argv++;
39 } else
40 usage();
41 }
42
43 dev = argv[0];
44 dir = argv[1];
45
46 args.fspec = dev;
47 args.exflags = MNT_EXRDONLY | opts;
48 args.exroot = 0;
49
50 if (mount (MOUNT_ISOFS, dir, MNT_RDONLY, &args) < 0) {
51 perror ("mount");
52 exit (1);
53 }
54
55 exit (0);
56}
57