Deleted Added
full compact
1/*
2 * Copyright (c) 1992, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software donated to Berkeley by
6 * Jan-Simon Pendry.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

67int
68main(argc, argv)
69 int argc;
70 char *argv[];
71{
72 struct null_args args;
73 int ch, mntflags;
74 char target[MAXPATHLEN];
75
76 mntflags = 0;
77 while ((ch = getopt(argc, argv, "o:")) != EOF)
78 switch(ch) {
79 case 'o':
80 getmntopts(optarg, mopts, &mntflags);
81 break;
82 case '?':

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

93 err(1, "%s", target);
94
95 if (subdir(target, argv[1]) || subdir(argv[1], target))
96 errx(1, "%s (%s) and %s are not distinct paths",
97 argv[0], target, argv[1]);
98
99 args.target = target;
100
101 if (mount(MOUNT_NULL, argv[1], mntflags, &args))
102 err(1, NULL);
103 exit(0);
104}
105
106int
107subdir(p, dir)
108 const char *p;
109 const char *dir;

--- 20 unchanged lines hidden ---