aboutsummaryrefslogtreecommitdiff
path: root/sbin/mdmfs
Commit message (Collapse)AuthorAgeFilesLines
* -n is used by newfs to tell "do not generate a .snap directory" instead ofRemko Lodder2007-05-141-4/+4
| | | | | | | | | | | specifying rotational-positions, reflect that in the command arguments. PR: bin/110178 Submitted by: Alex Kozlov <spam at rm-rf dot kiev dot ua> Approved by: imp (mentor) Notes: svn path=/head/; revision=169560
* Fix a typo: argv -> argvpYaroslav Tykhiy2007-04-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | Rationale: We are interested in the current (last) element of the argv array there, not in its first element. The if construct is there because we want to avoid adding empty (zero-length) arguments to argv, so we just don't advance argvp if the current argument is empty, and it gets overwritten at the next iteration. Note that strsep(3) doesn't treat consecutive delim characters as a single separator, it returns empty fields between such characters, and it's up to the caller to handle them this or that way. Also add a comment that the argv array ends up null-terminated in any case (it's due to the design of the for loop) as an answer to a possible question why the whole argv isn't zero-filled. Submitted by: yongari Tested by: yongari MFC after: 3 days Notes: svn path=/head/; revision=169129
* Don't leave a NULL value in mdsuffix when a particular mdYaroslav Tykhiy2007-03-071-2/+1
| | | | | | | | | | | | unit w/o suffix is specified. It had better be an empty string as it will be passed to a printf-like function that builds the command line to run. PR: kern/109863 MFC after: 1 week Notes: svn path=/head/; revision=167286
* Grammar nits.Ceri Davies2007-02-151-2/+2
| | | | Notes: svn path=/head/; revision=166772
* Add examples for configuring and mounting geom_uzip(4) based disks'Matteo Riondato2007-02-151-0/+20
| | | | | | | | image and sliced/partitioned memory disks. MFC after: 1 week Notes: svn path=/head/; revision=166765
* Correct -c and -d description.Matteo Riondato2007-02-152-16/+16
| | | | | | | | | | Other requests made in the PR were already solved in the past. PR: bin/66763 MFC after: 1 week Notes: svn path=/head/; revision=166752
* Enhances mdmfs(8) to mount md-based device such as uzip.Matteo Riondato2007-02-151-4/+9
| | | | | | | | | | Examples of use can be found in the PR text. PR: 103501 MFC after: 1 week Notes: svn path=/head/; revision=166749
* Remove the -C option as it does more harm than good. To be fullyRuslan Ermilov2006-11-032-80/+15
| | | | | | | | | | | | | | | | | | | | | | | compatible, it would have to (at least): - support the "compat-compat" -T option, - *not* support the -l, -O, and -v options, - default to soft updates being disabled. Worse, the compatibility mode makes it impossible to mount_mfs(8) a file system from fstab(5) with soft updates disabled (-S). [1] Now, the only difference when called as "mount_mfs" or "mfs" (as opposed to "mdmfs") is that the file mode of the mount point is set by default to 01777. All options available to mdmfs(8) are also available to mount_mfs(8); the -C option is still recognized but ignored for backward compatibility. PR: bin/98860 [1] MFC after: 2 weeks Notes: svn path=/head/; revision=163952
* Fix .Dd arguments.Ruslan Ermilov2006-10-211-1/+1
| | | | Notes: svn path=/head/; revision=163576
* The UFS filesystem get created only if -P was not specified.Matteo Riondato2006-10-011-2/+4
| | | | | | | | | Specify this on the description MFC after: 3 days Notes: svn path=/head/; revision=162921
* Markup fixes.Ruslan Ermilov2006-09-181-2/+2
| | | | Notes: svn path=/head/; revision=162395
* Add new -E option, which allows to specify location of the mdconfig(8)Maxim Sobolev2006-02-162-8/+20
| | | | | | | | | utility instead of using default _PATH_MDCONFIG (/sbin/mdconfig). MFC after: 1 week Notes: svn path=/head/; revision=155769
* Add a -P option to allow skipping newfs when using a vnode-backedDima Dorfman2006-01-022-6/+22
| | | | | | | | | | | | | | | | | | | | disk. Apparently some people want to use mdmfs as mount_* as a shortcut for mounting existing file-based file systems. Note that unlike in the patches from the submitters, this option is not available in compat mode. Compat mode was supposed to support only things that mount_mfs used to support. To use this option from fstab, mdmfs should be called mount_md, not mount_mfs. This distinction has not always upkept for new options, and those can't be fixed now without breaking people's systems, but new options should not usually be allowed in compat mode. (Not sure why -F is allowed there at all.) PR: 57641 Submitted by: Ruben de Groot Submitted independently by: Wojciech A. Koszek, for Urzad Miasta Czestochowa Notes: svn path=/head/; revision=153961
* If we're operating without running external programs (-N) andDima Dorfman2005-12-221-1/+1
| | | | | | | | | | autonumbering is requested, set the unit to 0 instead of -1. This option is just for output, and "/dev/md-1" looks disconcerting. Submitted by: Wojciech A. Koszek Notes: svn path=/head/; revision=153637
* Fix parsing of mdmfs(8) option "-w <user>:<group>" in case <user> orRalf S. Engelschall2005-10-141-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | <group> is a numeric user/group ID instead of a user/group name (as explicitly intended to be allowed by both the manual page and the implementation). Before this fix, mdmfs(8) aborted: | # mdmfs -s 32m -w 0:0 md /var/tmp/foo | Assertion failed: (mip->mi_have_uid), function extract_ugid, file /usr/src/sbin/mdmfs/mdmfs.c, line 555. | Abort trap (core dumped) The "mi_have_[ug]id" fields were only set in case a name lookup was successful. Instead they also have to be set in case the string to integer conversion was successful. Additionally, as a result of this fix, two assertions at the end of the function are now always true and hence can be just be removed. It is guarrantied that both the UID and the GID are set when the function returns regularily, else it would have been already bailed out with usage()/exit(3) or errx(3) before. Spotted by: Christoph Schug <chris@schug.net> MFC after: 3 days Notes: svn path=/head/; revision=151315
* Sync program's usage() with manpage's SYNOPSIS.Ruslan Ermilov2005-02-101-4/+4
| | | | Notes: svn path=/head/; revision=141611
* Remove unsigned casts.Suleiman Souhlal2005-01-311-4/+8
| | | | | | | | Discussed with: delphij, stefanf Approved by: grehan (mentor) Notes: svn path=/head/; revision=141082
* - Make WARNS?= 6 cleanSuleiman Souhlal2005-01-252-2/+4
| | | | | | | | | - Add WARNS?= 6 Approved by: stefanf, grehan (mentor) Notes: svn path=/head/; revision=140815
* Assorted markup, grammar, and spelling fixes.Ruslan Ermilov2004-05-171-5/+4
| | | | Notes: svn path=/head/; revision=129327
* Added -l to usage().Ruslan Ermilov2004-05-171-2/+2
| | | | Notes: svn path=/head/; revision=129322
* Add a "-l" parameter to mdmfs so that memory file systems can beRobert Watson2004-02-262-1/+7
| | | | | | | | | | | created with the multilabel flag from inception. This simply passes the "-l" flag on to newfs(8). Obtained from: TrustedBSD Project Sponsored by: DARPA, McAfee Research Notes: svn path=/head/; revision=126255
* Userland signed char fixes for PPC build. Problems were using a charPeter Grehan2004-01-221-1/+2
| | | | | | | | | | | | return for getopt() and comparing to -1, ditto with fgetc() and EOF, and using the kg_nice value from <sys/user.h> Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at> Reviewed by: obrien, bde (a while back) Tested lightly on: ppc, i386, make universe Notes: svn path=/head/; revision=124830
* Don't reinvent the wheel: Use setmode(3) to interpretYaroslav Tykhiy2003-08-052-3/+15
| | | | | | | | | a file mode specification from the command line. This approach is more flexible and less error-prone than using a mere strtoul(3). Notes: svn path=/head/; revision=118500
* Do not compare unsigned int values with ULONG_MAX. The comparison isAlexander Kabaev2003-07-111-4/+4
| | | | | | | always false on 64bit platforms and GCC 3.3.1 issues warning there. Notes: svn path=/head/; revision=117430
* Remove pathnames.h.Gordon Tetlow2003-06-291-2/+0
| | | | | | | Pointed out by: Mathieu Arnold <mat@mat.cc> Notes: svn path=/head/; revision=117037
* Move path definitions to include/paths.h. This makes it easier to overrideGordon Tetlow2003-06-292-14/+5
| | | | | | | | | these definitions in the /rescue case. Submitted by: Tim Kientzle <kientzle@acm.org> Notes: svn path=/head/; revision=117033
* mdoc(7) fix: Add the forgotten paragraph command.Ruslan Ermilov2003-05-171-0/+1
| | | | | | | Approved by: re (blanket) Notes: svn path=/head/; revision=115115
* Add an example of how to create an fstab entry.Doug Barton2003-05-051-0/+4
| | | | Notes: svn path=/head/; revision=114765
* Use __FBSDID() to quiet GCC 3.3 warnings.David E. O'Brien2003-05-031-4/+2
| | | | Notes: svn path=/head/; revision=114589
* Also MLINK the man page for mount_mfs.Doug Barton2003-04-272-2/+4
| | | | Notes: svn path=/head/; revision=114097
* Install a mount_mfs symlink so that you can specify something like thisDoug Barton2003-04-271-0/+1
| | | | | | | | | | | | | | in /etc/fstab to get a memory disk: md /tmp mfs rw,-s8m,noatime 2 2 Back when mdmfs was created, there was vague discussion about doing this, but it never materialized. Reminded by: Ralf S. Engelschall <rse@engelschall.com> Notes: svn path=/head/; revision=114095
* english(4) police.Jens Schweikhardt2002-12-271-1/+1
| | | | Notes: svn path=/head/; revision=108317
* Teach mdmfs how to pass UFS version numbers through to newfs. BecauseRobert Watson2002-12-012-1/+15
| | | | | | | | | | | | | | | of an argument name collision with -O, use -v, and default to whatever the newfs default is for the platform (generally, UFS1). This is required to support diskless workstations that use UFS2 for their mdmfs file systems. Reviewed by: dd, bmah Approved by: re (bmah) Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories Notes: svn path=/head/; revision=107475
* Don't disklabel(8) the md(4) device, it is not needed, and we don't wantPoul-Henning Kamp2002-09-223-22/+3
| | | | | | | | | to propagete BSD disklabels to architectures not already so polluted. Sponsored by: DARPA & NAI Labs. Notes: svn path=/head/; revision=103798
* s/filesystem/file system/g as discussed on -developersTom Rhodes2002-08-212-11/+11
| | | | Notes: svn path=/head/; revision=102231
* The .Nm utilityPhilippe Charnier2002-07-061-4/+6
| | | | Notes: svn path=/head/; revision=99501
* Usage style sweep: spell "usage" with a small 'u'.Dag-Erling Smørgrav2002-04-221-2/+2
| | | | | | | | Also change one case of blatant __progname abuse (several more remain) This commit does not touch anything in src/{contrib,crypto,gnu}/. Notes: svn path=/head/; revision=95258
* Default to WARNS=2.David E. O'Brien2001-12-041-1/+0
| | | | | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike Notes: svn path=/head/; revision=87325
* Enable bug-for-bug compatibility with mount_mfs when the programIan Dowse2001-09-302-5/+7
| | | | | | | | | | | | | name is "mount_mfs" or "mfs". Previously, the condition was that the program name must start with "mount_", but this both missed the case where mount(8) invokes mdmfs with argv[0] = "mfs", and it included cases such as "mount_md" where compatibility is not required. Reviewed by: dd Notes: svn path=/head/; revision=84167
* mdoc(7) police: Section cross-references are marked with .Sx.Ruslan Ermilov2001-08-161-3/+2
| | | | | | | -compat is not a valid keyword. Notes: svn path=/head/; revision=81752
* Implement a better compatibility mode with mount_mfs. It is theDima Dorfman2001-08-162-6/+120
| | | | | | | | | | | | | | | | | | | | default if the executable is named (called as) "mount_*", or can be enabled with the -C option. This allows users to leave their old fstab entires unchanged (modulo symlink'ing mdmfs to mount(md|mfs)) and have things behave the way they should (by emulating mount_mfs silliness), while still allowing mdmfs to be used as a generic make-an-md-and-mount-it type thing. Right now, the only effects of this option is to set the mount-point mode to 01777 as if "-p 1777" was given, and to complain about getting command-line options that mount_mfs didn't take (e.g., -X, -L, et al). The latter is mostly to try to catch operator errors. Also implement -U, which turns on soft-updates. It's redundant (since softdep is the default), but implement it anyway for compatibility. Notes: svn path=/head/; revision=81742
* style(9) tweakDavid E. O'Brien2001-08-141-24/+24
| | | | | | | Approved by: dd Notes: svn path=/head/; revision=81628
* Document -X.Dima Dorfman2001-07-301-0/+3
| | | | | | | Submitted by: kris Notes: svn path=/head/; revision=80608
* Nuke my e-mail address since it seems out of place here.Dima Dorfman2001-07-302-3/+2
| | | | Notes: svn path=/head/; revision=80607
* Add __printflike() to those static functions which need it.Kris Kennaway2001-07-011-3/+3
| | | | Notes: svn path=/head/; revision=79052
* Use strdup(3) instead of reimplementing it inline.Dima Dorfman2001-06-241-7/+1
| | | | Notes: svn path=/head/; revision=78711
* Fix compilation error on alpha.Matt Jacob2001-06-211-1/+1
| | | | Notes: svn path=/head/; revision=78569
* Add a missing word.Dima Dorfman2001-06-201-1/+1
| | | | | | | Submitted by: Alexander Leidinger <Alexander@Leidinger.net> Notes: svn path=/head/; revision=78518
* Add a SEE ALSO section.Dima Dorfman2001-06-201-0/+6
| | | | Notes: svn path=/head/; revision=78480
* Miscellaneous mdoc(7) fixes; also expand contractions.Dima Dorfman2001-06-201-22/+19
| | | | | | | Submitted by: ru Notes: svn path=/head/; revision=78479