1/*- 2 * Copyright (c) 1980, 1989, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 23 unchanged lines hidden (view full) --- 32"@(#) Copyright (c) 1980, 1989, 1993, 1994\n\ 33 The Regents of the University of California. All rights reserved.\n"; 34#if 0 35static char sccsid[] = "@(#)mount.c 8.25 (Berkeley) 5/8/95"; 36#endif 37#endif /* not lint */ 38 39#include <sys/cdefs.h> |
40__FBSDID("$FreeBSD: head/sbin/mount/mount.c 230226 2012-01-16 19:34:21Z jh $"); |
41 42#include <sys/param.h> 43#include <sys/mount.h> 44#include <sys/stat.h> 45#include <sys/wait.h> 46 47#include <ctype.h> 48#include <err.h> --- 485 unchanged lines hidden (view full) --- 534 const char *options, const char *mntopts) 535{ 536 struct statfs sf; 537 int i, ret; 538 char *optbuf, execname[PATH_MAX], mntpath[PATH_MAX]; 539 static struct cpa mnt_argv; 540 541 /* resolve the mountpoint with realpath(3) */ |
542 if (checkpath(name, mntpath) != 0) { 543 warn("%s", mntpath); 544 return (1); 545 } |
546 name = mntpath; 547 548 if (mntopts == NULL) 549 mntopts = ""; 550 optbuf = catopt(strdup(mntopts), options); 551 552 if (strcmp(name, "/") == 0) 553 flags |= MNT_UPDATE; --- 393 unchanged lines hidden --- |