Put in proper address information for Poul-Henning Kamp.
[unix-history] / sbin / mount_isofs / mount_isofs.c
CommitLineData
4c213a4a 1#ifndef lint
b0e7e6a9 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 $";
4c213a4a
JH
3#endif
4
15637ed4
RG
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;
15637ed4
RG
25 int opts;
26
27 opts = MNT_RDONLY;
28
4c213a4a
JH
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")) {
b0e7e6a9 37 opts |= MNT_NORRIP;
4c213a4a
JH
38 argc--; argv++;
39 } else
40 usage();
15637ed4
RG
41 }
42
4c213a4a
JH
43 dev = argv[0];
44 dir = argv[1];
15637ed4
RG
45
46 args.fspec = dev;
4c213a4a 47 args.exflags = MNT_EXRDONLY | opts;
15637ed4
RG
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