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

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

68int
69main(argc, argv)
70 int argc;
71 char *argv[];
72{
73 struct union_args args;
74 int ch, mntflags;
75 char target[MAXPATHLEN];
76
77 mntflags = 0;
78 args.mntflags = UNMNT_ABOVE;
79 while ((ch = getopt(argc, argv, "bo:r")) != EOF)
80 switch (ch) {
81 case 'b':
82 args.mntflags &= ~UNMNT_OPMASK;
83 args.mntflags |= UNMNT_BELOW;

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

104 err(1, "%s", target);
105
106 if (subdir(target, argv[1]) || subdir(argv[1], target))
107 errx(1, "%s (%s) and %s are not distinct paths",
108 argv[0], target, argv[1]);
109
110 args.target = target;
111
112 if (mount(MOUNT_UNION, argv[1], mntflags, &args))
113 err(1, NULL);
114 exit(0);
115}
116
117int
118subdir(p, dir)
119 const char *p;
120 const char *dir;

--- 20 unchanged lines hidden ---