mount_nullfs.c (52055) | mount_nullfs.c (63962) |
---|---|
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 --- 31 unchanged lines hidden (view full) --- 40 The Regents of the University of California. All rights reserved.\n"; 41#endif /* not lint */ 42 43#ifndef lint 44#if 0 45static char sccsid[] = "@(#)mount_null.c 8.6 (Berkeley) 4/26/95"; 46#endif 47static const char rcsid[] = | 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 --- 31 unchanged lines hidden (view full) --- 40 The Regents of the University of California. All rights reserved.\n"; 41#endif /* not lint */ 42 43#ifndef lint 44#if 0 45static char sccsid[] = "@(#)mount_null.c 8.6 (Berkeley) 4/26/95"; 46#endif 47static const char rcsid[] = |
48 "$FreeBSD: head/sbin/mount_nullfs/mount_nullfs.c 52055 1999-10-09 11:54:14Z phk $"; | 48 "$FreeBSD: head/sbin/mount_nullfs/mount_nullfs.c 63962 2000-07-28 11:54:09Z sheldonh $"; |
49#endif /* not lint */ 50 51#include <sys/param.h> 52#include <sys/mount.h> 53#include <miscfs/nullfs/null.h> 54 55#include <err.h> 56#include <stdio.h> --- 45 unchanged lines hidden (view full) --- 102 (void)checkpath(argv[1], source); 103 104 if (subdir(target, source) || subdir(source, target)) 105 errx(EX_USAGE, "%s (%s) and %s are not distinct paths", 106 argv[0], target, argv[1]); 107 108 args.target = target; 109 | 49#endif /* not lint */ 50 51#include <sys/param.h> 52#include <sys/mount.h> 53#include <miscfs/nullfs/null.h> 54 55#include <err.h> 56#include <stdio.h> --- 45 unchanged lines hidden (view full) --- 102 (void)checkpath(argv[1], source); 103 104 if (subdir(target, source) || subdir(source, target)) 105 errx(EX_USAGE, "%s (%s) and %s are not distinct paths", 106 argv[0], target, argv[1]); 107 108 args.target = target; 109 |
110 error = getvfsbyname("null", &vfc); 111 if (error && vfsisloadable("null")) { 112 if(vfsload("null")) 113 err(EX_OSERR, "vfsload(null)"); | 110 error = getvfsbyname("nullfs", &vfc); 111 if (error && vfsisloadable("nullfs")) { 112 if(vfsload("nullfs")) 113 err(EX_OSERR, "vfsload(nullfs)"); |
114 endvfsent(); | 114 endvfsent(); |
115 error = getvfsbyname("null", &vfc); | 115 error = getvfsbyname("nullfs", &vfc); |
116 } 117 if (error) 118 errx(EX_OSERR, "null/loopback filesystem is not available"); 119 120 if (mount(vfc.vfc_name, source, mntflags, &args)) 121 err(1, NULL); 122 exit(0); 123} --- 25 unchanged lines hidden --- | 116 } 117 if (error) 118 errx(EX_OSERR, "null/loopback filesystem is not available"); 119 120 if (mount(vfc.vfc_name, source, mntflags, &args)) 121 err(1, NULL); 122 exit(0); 123} --- 25 unchanged lines hidden --- |