aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/mount
Commit message (Collapse)AuthorAgeFilesLines
* Move the mount name to bit mapping into sys/mount.h so it can be shared with theWarner Losh2020-08-191-31/+4
| | | | | | | | | | | | kernel. Discussed with: kib@ Reviewed by: kirk@ (prior version) Sponsored by: Netflix Diffential Revision: https://reviews.freebsd.org/D25969 Notes: svn path=/head/; revision=364401
* All the other printf() calls cast to (void) here, do the two newer ones forWarner Losh2020-08-071-2/+2
| | | | | | | consistency. Notes: svn path=/head/; revision=364004
* Add two options to allow mount to avoid covering up existing mount points.Sean Eric Fagan2019-09-233-3/+15
| | | | | | | | | | | | | | | | | | | The two options are * nocover/cover: Prevent/allow mounting over an existing root mountpoint. E.g., "mount -t ufs -o nocover /dev/sd1a /usr/local" will fail if /usr/local is already a mountpoint. * emptydir/noemptydir: Prevent/allow mounting on a non-empty directory. E.g., "mount -t ufs -o emptydir /dev/sd1a /usr" will fail. Neither of these options is intended to be a default, for historical and compatibility reasons. Reviewed by: allanjude, kib Differential Revision: https://reviews.freebsd.org/D21458 Notes: svn path=/head/; revision=352614
* Allow "update" option to be used in the fstab(5). Document possible use case.Maxim Sobolev2019-07-221-0/+1
| | | | | | | | | Approved by: mckusick MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D18586 Notes: svn path=/head/; revision=350224
* Add a new "untrusted" option to the mount command. Its purposeKirk McKusick2019-07-013-1/+11
| | | | | | | | | | | | | | | | | | | is to notify the kernel that the file system is untrusted and it should use more extensive checks on the file-system's metadata before using it. This option is intended to be used when mounting file systems from untrusted media such as USB memory sticks or other externally-provided media. It will initially be used by the UFS/FFS file system, but should likely be expanded to be used by other file systems that may appear on external media like msdosfs, exfat, and ext2fs. Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D20786 Notes: svn path=/head/; revision=349589
* Exercise some care before sending SIGHUP to mountd.Konstantin Belousov2019-04-081-0/+11
| | | | | | | | | | Reviewed by: antoine, emaste, oshogbo Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D19847 Notes: svn path=/head/; revision=346038
* When getting mount information for all filesystems, mount uses theKirk McKusick2018-08-071-1/+2
| | | | | | | | | | | | | getfsstat(2) system call using the MNT_NOWAIT flag to indicate that it wants to use the statfs information cached in the mount structure. When the -v (verbose) flag is specified, we need to use the MNT_WAIT flag to getfsstat(2) so that kernel will call VFS_STATFS to get the current statfs statistics from each filesystem. Sponsored by: Netflix Notes: svn path=/head/; revision=337437
* Fix synopsis of the -t option.Mateusz Piotrowski2018-08-061-18/+13
| | | | | | | | | | | | | | | While here: - Remove deprecated ".Tn" macros. - Improve formatting and fix typos in the description of the -t option. Reviewed by: bcr Approved by: mat (mentor) Differential Revision: https://reviews.freebsd.org/D16541 Notes: svn path=/head/; revision=337377
* vfs_donmount: in certain cases try r/o mount if r/w mount failsAndriy Gapon2018-03-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | If the operation is not an update, if neither r/w nor r/o mode is explicitly requested, if the error code hints at the possibility of the media being read-only, and if the fallback is allowed, then we can try to automatically downgrade to the readonly mode. This is especially useful for auto-mounting of removable media that sometimes can happen to be write-protected. The fallback to r/o is not enabled by default. It can be requested on a per-mount basis with a new mount option, 'autoro'. Or it can be globally allowed by setting vfs.default_autoro. Reviewed by: cem, kib MFC after: 3 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D13361 Notes: svn path=/head/; revision=331616
* Remove decade's old whine about msdos vs msdosfs.Warner Losh2018-03-091-4/+1
| | | | | | | | | Retain the compatibility silently though. Reviewed by: cem@, kevans@, emaste@ (and many others in the past) Notes: svn path=/head/; revision=330705
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-206-2/+14
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Fix "mount -uw /" when the filesystem type doesn't match.Edward Tomasz Napierala2017-07-081-1/+3
| | | | | | | | | | | | | | | | | This basically makes "mount -uw /" work when the filesystem mounted on / is NFS, but the one configured in fstab(5) is UFS, which can happen when you forget to modify fstab. Note that the whole special case ("else if (argv[0][0] == '/'") is probably not needed anyway. I'll take a look at removing it altogether; for now this is a minimally intrusive fix. MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D11323 Notes: svn path=/head/; revision=320803
* Add MD_VERIFY option to enable O_VERIFY in open for vnode type.Stephen J. Kiernan2017-05-311-0/+1
| | | | | | | | | | | | | | | | Add -o [no]verify option to mdconfig (and document in man page.) Implement GEOM attribute MNT::verified to ask md if the backing vnode is verified. Check for MNT::verified in cd9660 mount to flag the mount as MNT_VERIFIED if the underlying device has been verified. Reviewed by: rwatson Approved by: sjg (mentor) Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D2902 Notes: svn path=/head/; revision=319358
* Move mount.conf(8) to mount.conf(5); it's a kernel configuration fileEdward Tomasz Napierala2017-05-282-253/+1
| | | | | | | | | and not an administrative utility. MFC after: 2 weeks Notes: svn path=/head/; revision=319079
* sbin/mount: strcpy -> strlcpyAlan Somers2017-04-071-3/+4
| | | | | | | | | | Reported by: Coverity CID: 1011173, 1011174 MFC after: 3 weeks Sponsored by: Spectra Logic Corp Notes: svn path=/head/; revision=316611
* Add a post-humous manpage for cd9660(5), the ISO-9660 file systemEnji Cooper2017-03-231-1/+2
| | | | | | | | | | | | | Describe (briefly) how to compile the filesystem into the kernel and load as a module. Reference cd9660(5) in mount(8) and mount_cd9660(8). MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=315775
* mount.conf(8): fix a .Xr callEnji Cooper2017-03-231-1/+1
| | | | | | | | | | Add the missing section number for devfs(5) MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=315774
* Renumber copyright clause 4Warner Losh2017-02-288-8/+8
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* Add a free_iovec() function to reset iovec's.Brooks Davis2016-12-142-0/+15
| | | | | | | | | | | | | The primary purpose is to call nmount() in a loop with new iovec's so free_iovec takes arguments by reference and resets their values. Reviewed by: cem MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8513 Notes: svn path=/head/; revision=310092
* mount(1): Simplify by using asprintf(3)Pedro F. Giffuni2016-09-191-5/+2
| | | | | | | | | | Instead of strlen() + malloc() + snprintf, just use asprintf(). No functional change. Obtained from: OpenBSD (CVS Rev. 1.67) Notes: svn path=/head/; revision=305993
* Explicitly add more files to the 'runtime' package.Glen Barber2016-02-091-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295450
* Fix type mismatches for malloc(3) and Co.Ulrich Spörlein2015-12-291-1/+1
| | | | | | | | | Found by: clang static analyzer Reviewed by: ed Differential Revision: https://reviews.freebsd.org/D4722 Notes: svn path=/head/; revision=292863
* Fix "mount -a" for NFS and ZFS filesystems with shared mountpointsAlan Somers2015-12-211-1/+9
| | | | | | | | | | | | | | | | | | | | sbin/mount.c Check whether an fstab entry has the same fstype as a mounted filesystem before declaring it to be mounted. This will allow NFS filesystems that share a mountpoint with a local filesystem to be automatically mounted at boot. This is not such an unusual situation. For example, if somebody uses the standard installer with a ZFS root, he'll get a /usr/home filesystem, even though he may choose to mount /usr/home over NFS. Reviewed by: trasz MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D4556 Notes: svn path=/head/; revision=292573
* Replace /dev/acd0 with /dev/cd1Enji Cooper2015-10-171-3/+3
| | | | | | | | | | | | | atapicd(4) has been removed since r249083, and if a system has more than one optical drive, it will likely be /dev/cd1 Update mount.conf(8) to reflect the change in behavior MFC after: never Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=289449
* Replace references to /dev/acd0 with /dev/cd0Enji Cooper2015-10-131-2/+2
| | | | | | | | | | | atapicd(4) was replaced by cd(4) with the atacam work done by mav@ and then removed in r249083 X-MFC to: stable/10 MFC after: 2 weeks Notes: svn path=/head/; revision=289229
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-273-6/+6
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-193-3/+12
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge head from 7/28Simon J. Gerraty2014-08-191-2/+2
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | | Merge from headSimon J. Gerraty2013-09-054-10/+279
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255263
| * | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | Sync from headSimon J. Gerraty2012-11-043-14/+12
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | Remove some oldnfs remnants.Edward Tomasz Napierala2015-04-182-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Differential Revision: https://reviews.freebsd.org/D2287 Reviewed by: rmacklem@ Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=281691
* | | | | | mdoc: improvements to SEE ALSO.Joel Dahl2014-12-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=276293
* | | | | | Add fstyp(8). This utility, named after its SVR4 counterpart, detectsEdward Tomasz Napierala2014-12-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | filesystems. It differs from file(1) in that it gives machine-parseable output, it outputs filesystem labels, doesn't get confused by other formats metadata, and runs in Capsicum sandbox. Differential Revision: https://reviews.freebsd.org/D1255 Relnotes: yes Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=275680
* | | | | | Convert sbin/ to LIBADDBaptiste Daroussin2014-11-251-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reduce overlinking Notes: svn path=/head/; revision=275030
* | | | | | Cross-reference automount(8) from mount(8).Edward Tomasz Napierala2014-11-221-1/+2
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=274857
* | | | | Add description for the "automounted" mount flag.Edward Tomasz Napierala2014-08-201-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: emaste@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=270209
* | | | | Bring in the new automounter, similar to what's provided in most otherEdward Tomasz Napierala2014-08-172-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UNIX systems, eg. MacOS X and Solaris. It uses Sun-compatible map format, has proper kernel support, and LDAP integration. There are still a few outstanding problems; they will be fixed shortly. Reviewed by: allanjude@, emaste@, kib@, wblock@ (earlier versions) Phabric: D523 MFC after: 2 weeks Relnotes: yes Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=270096
* | | | | Mention tmpfs(5)Steven Kreuzer2014-08-061-0/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 192389 Submitted by: yaneurabeya@gmail.com Approved by: hrs (mentor) Notes: svn path=/head/; revision=269627
* | | | use .Mt to mark up email addresses consistently (part1)Baptiste Daroussin2014-06-201-2/+2
| |_|/ |/| | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de> Notes: svn path=/head/; revision=267667
* | | Minor mdoc fixes.Joel Dahl2013-07-181-10/+10
| | | | | | | | | | | | Notes: svn path=/head/; revision=253445
* | | In this GRN, Marcel Moolenaar overhauled the logic for mountingCraig Rodrigues2013-07-172-1/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the root file system on bootup: |------------------------------------------------------------------------ |r214006 | marcel | 2010-10-17 22:01:53 -0700 (Sun, 17 Oct 2010) | 20 lines | | Re-implement the root mount logic using a recursive approach, whereby each |root file system (starting with devfs and a synthesized configuration) can |contain directives for mounting another file system as root. |------------------------------------------------------------------------ This commit adds a mount.conf(8) man page which documents the root mount logic. mount.conf(8) also provides some examples for the /.mount.conf file, which can be used to change the root mount behavior. Reviewed by: marcel bjk Notes: svn path=/head/; revision=253433