autil.c (82794) | autil.c (119679) |
---|---|
1/* | 1/* |
2 * Copyright (c) 1997-2001 Erez Zadok | 2 * Copyright (c) 1997-2003 Erez Zadok |
3 * Copyright (c) 1990 Jan-Simon Pendry 4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine 5 * Copyright (c) 1990 The Regents of the University of California. 6 * All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by 9 * Jan-Simon Pendry at Imperial College, London. 10 * --- 22 unchanged lines hidden (view full) --- 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * %W% (Berkeley) %G% 40 * | 3 * Copyright (c) 1990 Jan-Simon Pendry 4 * Copyright (c) 1990 Imperial College of Science, Technology & Medicine 5 * Copyright (c) 1990 The Regents of the University of California. 6 * All rights reserved. 7 * 8 * This code is derived from software contributed to Berkeley by 9 * Jan-Simon Pendry at Imperial College, London. 10 * --- 22 unchanged lines hidden (view full) --- 33 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 34 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 35 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 36 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 37 * SUCH DAMAGE. 38 * 39 * %W% (Berkeley) %G% 40 * |
41 * $Id: autil.c,v 1.4.2.2 2001/04/29 05:08:35 ib42 Exp $ | 41 * $Id: autil.c,v 1.4.2.5 2003/04/14 01:23:09 ezk Exp $ |
42 * 43 */ 44 45/* 46 * utilities specified to amd, taken out of the older amd/util.c. 47 */ 48 49#ifdef HAVE_CONFIG_H --- 231 unchanged lines hidden (view full) --- 281 */ 282 if (mp->am_parent && mp->am_parent->am_mnt->mf_ops == &amfs_direct_ops) 283 mp->am_path = str3cat(mp->am_path, mp->am_parent->am_path, "/", "."); 284 285 /* 286 * Check whether this mount should be cached permanently 287 */ 288 if (mf->mf_ops->fs_flags & FS_NOTIMEOUT) { | 42 * 43 */ 44 45/* 46 * utilities specified to amd, taken out of the older amd/util.c. 47 */ 48 49#ifdef HAVE_CONFIG_H --- 231 unchanged lines hidden (view full) --- 281 */ 282 if (mp->am_parent && mp->am_parent->am_mnt->mf_ops == &amfs_direct_ops) 283 mp->am_path = str3cat(mp->am_path, mp->am_parent->am_path, "/", "."); 284 285 /* 286 * Check whether this mount should be cached permanently 287 */ 288 if (mf->mf_ops->fs_flags & FS_NOTIMEOUT) { |
289 mp->am_flags |= AMF_NOTIMEOUT; | 289 mntent_t mnt; 290 mnt.mnt_opts = mf->mf_mopts; 291 292 if (mf->mf_mopts && hasmntopt(&mnt, "unmount")) 293 mp->am_flags &= ~AMF_NOTIMEOUT; 294 else 295 mp->am_flags |= AMF_NOTIMEOUT; |
290 } else if (mf->mf_mount[1] == '\0' && mf->mf_mount[0] == '/') { 291 mp->am_flags |= AMF_NOTIMEOUT; 292 } else { 293 mntent_t mnt; 294 if (mf->mf_mopts) { 295 mnt.mnt_opts = mf->mf_mopts; 296 if (hasmntopt(&mnt, "nounmount")) 297 mp->am_flags |= AMF_NOTIMEOUT; | 296 } else if (mf->mf_mount[1] == '\0' && mf->mf_mount[0] == '/') { 297 mp->am_flags |= AMF_NOTIMEOUT; 298 } else { 299 mntent_t mnt; 300 if (mf->mf_mopts) { 301 mnt.mnt_opts = mf->mf_mopts; 302 if (hasmntopt(&mnt, "nounmount")) 303 mp->am_flags |= AMF_NOTIMEOUT; |
304 if (hasmntopt(&mnt, "unmount")) 305 mp->am_flags &= ~AMF_NOTIMEOUT; |
|
298 if ((mp->am_timeo = hasmntval(&mnt, "utimeout")) == 0) 299 mp->am_timeo = gopt.am_timeo; 300 } 301 } 302 303 /* 304 * If this node is a symlink then 305 * compute the length of the returned string. --- 115 unchanged lines hidden --- | 306 if ((mp->am_timeo = hasmntval(&mnt, "utimeout")) == 0) 307 mp->am_timeo = gopt.am_timeo; 308 } 309 } 310 311 /* 312 * If this node is a symlink then 313 * compute the length of the returned string. --- 115 unchanged lines hidden --- |