aboutsummaryrefslogtreecommitdiff
path: root/sbin/mdconfig
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Resolve fflag with realpath().Xin LI2013-07-311-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=253833
* | | | When listing with -f, skip all memory disks that are not vnode-backed.Xin LI2013-07-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Noticed by: kevlo MFC after: 3 days Notes: svn path=/head/; revision=252523
* | | | mdoc: remove EOL whitespace.Joel Dahl2013-06-291-1/+1
| | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=252379
* | | | - Use length of _PATH_DEV instead of a hardcoded value[*].Hiroki Sato2013-06-211-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use MD_NAME for "md". Pointed out by: trasz [*] MFC after: 1 week Notes: svn path=/head/; revision=252051
* | | | eturn -1 when the specified backing store file is not found in the mdHiroki Sato2013-06-201-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | device list. MFC after: 1 week Notes: svn path=/head/; revision=252036
* | | | - Add "-f file" support to listing mode (-l). When a -f option isHiroki Sato2013-06-202-25/+45
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified, only md(4) devices which have the specified file as backing store are displayed. - Use MD_NAME instead of "md". - Use _PATH_DEV instead of "/dev/". MFC after: 1 week Notes: svn path=/head/; revision=252033
* | | Disallow attaching preloaded memory disks via ioctl.Jaakko Heinonen2012-11-211-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The feature is dangerous because the kernel code didn't check validity of the memory address provided from user space. - It seems that mdconfig(8) never really supported attaching preloaded memory disks. - Preloaded memory disks are automatically attached during md(4) initialization. Thus there shouldn't be much use for the feature. PR: kern/169683 Discussed on: freebsd-hackers Notes: svn path=/head/; revision=243372
* | | Add an example showing the use of gnop(8) to skip over header data.Warren Block2012-11-041-1/+13
| |/ |/| | | | | | | | | | | | | | | PR: kern/145999 Reviewed by: mjg MFC after: 1 week Notes: svn path=/head/; revision=242546
* | Make it possible to resize md(4) devices.Edward Tomasz Napierala2012-07-072-16/+46
| | | | | | | | | | | | | | | | Reviewed by: kib Sponsored by: FreeBSD Foundation Notes: svn path=/head/; revision=238215
* | Remove ancient vnconfig symlinkEitan Adler2012-07-071-1/+0
| | | | | | | | | | | | | | | | | | Submitted by: ak Approved by: cperciva MFC after: 1 week Notes: svn path=/head/; revision=238202
* | The -S option, to specify the sector size, has been usable on all types ofGavin Atkinson2012-06-271-2/+2
|/ | | | | | | | | | memory disks since r135340. Update the man page to reflect this. Noticed by: avg MFC after: 3 days Notes: svn path=/head/; revision=237645
* Remove end of line whitespace.Joel Dahl2012-05-121-1/+1
| | | | Notes: svn path=/head/; revision=235355
* mdoc: use Po and Pc macros instead of parens. Also avoid starting a lineJoel Dahl2012-05-121-4/+6
| | | | | | | with Ns. Notes: svn path=/head/; revision=235344
* Fix a couple of style issues. Tweak grammar and markup while here.Benjamin Kaduk2012-04-091-22/+27
| | | | | | | Approved by: hrs (mentor) Notes: svn path=/head/; revision=234047
* Add missing "static".Edward Tomasz Napierala2012-03-141-1/+1
| | | | Notes: svn path=/head/; revision=232964
* Rewrite option parsing in mdconfig(8). This makes it more user-friendlyEdward Tomasz Napierala2012-01-271-118/+131
| | | | | | | | | | by removing the ordering requirements and adding more descriptive error messages; it also makes it more readable and maintainable. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=230612
* Replace the beerware license on mdconfig(8) with standard 2-clause BSD.Edward Tomasz Napierala2012-01-211-8/+25
| | | | | | | Approved by: phk@ Notes: svn path=/head/; revision=230423
* Somewhere around the 473rd time I mistyped "mdconfig file" instead ofDag-Erling Smørgrav2011-04-292-20/+49
| | | | | | | | | | "mdconfig -f file", I decided that it would be easier to make mdconfig DWIM than to teach my fingers to type the correct command line. MFC after: 3 weeks Notes: svn path=/head/; revision=221232
* whitespace nit - sorry for the churnDag-Erling Smørgrav2011-04-271-2/+2
| | | | Notes: svn path=/head/; revision=221144
* whitespace nitDag-Erling Smørgrav2011-04-271-1/+1
| | | | Notes: svn path=/head/; revision=221143
* Add a check to make sure the provider name is "mdN" before printing theRebecca Cran2011-02-141-1/+5
| | | | | | | | | | unit number. Suggested by: jh MFC after: 3 days Notes: svn path=/head/; revision=218677
* Only print the unit number when invoked with the -n flag.Rebecca Cran2011-02-131-1/+1
| | | | | | | | | PR: bin/144300 Submitted by: arundel MFC after: 3 days Notes: svn path=/head/; revision=218652
* Use "cylinder" instead of "cyl" for consistency.Joel Dahl2010-11-132-2/+2
| | | | | | | Reviewed by: phk Notes: svn path=/head/; revision=215247
* Make mdconfig(8) WARNS=6 clean:Jaakko Heinonen2010-01-222-8/+6
| | | | | | | | | | | | - Constify geom_config_get() name argument. - Add void keyword for usage(). - Initialize mdunit to NULL. - Don't call md_prthumanval() at all if length is NULL. Approved by: trasz (mentor) Notes: svn path=/head/; revision=202784
* Print sizes up to INT64_MAX in md_prthumanval().Jaakko Heinonen2010-01-181-5/+6
| | | | | | | | | PR: bin/125365 Approved by: trasz (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=202573
* Switch the default WARNS level for sbin/ to 6.Ruslan Ermilov2009-10-191-0/+1
| | | | | | | Submitted by: Ulrich Spörlein Notes: svn path=/head/; revision=198236
* Add the possibility to specify "-o force" with "mdconfig -du".Edward Tomasz Napierala2009-01-102-1/+12
| | | | | | | | | Reviewed by: scottl Approved by: rwatson (mentor) Sponsored by: FreeBSD Foundation Notes: svn path=/head/; revision=187027
* Add -v (verbose) option to -l command, to show size and backing storeDmitry Morozovsky2008-06-212-7/+17
| | | | | | | | | | of all md devices at one time. Approved by: phk MFC after: 2 weeks Notes: svn path=/head/; revision=179910
* Every newline should start on it's own line. I didn't do that in theRemko Lodder2007-11-281-3/+4
| | | | | | | | | previous commit, so make it happen now. Prodded by: brueffer Notes: svn path=/head/; revision=174020
* Sync with md(4)'s information regarding the swap backend.Remko Lodder2007-11-281-2/+9
| | | | | | | | | PR: docs/115721 Submitted by: Stefan Lambrev <stefan.lambrev@moneybookers.com> MFC After: 3 days Notes: svn path=/head/; revision=174019
* Fix exit code when using -l on a non-existent md(4) device.Florent Thoumie2007-11-161-3/+9
| | | | | | | | | PR: conf/116177 Submitted by: Remi Guyomarch <rguyom@pobox.com> MFC after: 3 days Notes: svn path=/head/; revision=173676
* * Expand the example descriptions, fix mdoc-bugs inGiorgos Keramidas2007-11-111-9/+20
| | | | | | | | | "(-a and -t vnode are implied)" and reuse it near the cd9660 example. * Spell 'backing store' as two words. Notes: svn path=/head/; revision=173539
* Instead of hardcoding md10 as the device node in the cd9660 example,Giorgos Keramidas2007-11-091-3/+2
| | | | | | | | | use a trick submitted by Ruslan. MFC after: 1 day Notes: svn path=/head/; revision=173507
* Add an example which shows how mdconfig(8) can be usedGiorgos Keramidas2007-05-181-1/+7
| | | | | | | | | | | to mount an ISO 9660 CD image file. PR: 112691 Submitted by: Warren Block, wblock at wonkity.com MFC after: 3 days Notes: svn path=/head/; revision=169672
* Kris suggested that swap is a better choice as a default than malloc.Nick Hibma2007-02-202-4/+4
| | | | | | | MFC: 1 week Notes: svn path=/head/; revision=166854
* [Found the original diff I made, see previous commit for other part]Nick Hibma2007-02-202-4/+23
| | | | | | | | | | | Assume '-a' and '-t malloc' flags for '-s <size>' (malloc ramdisk) if not specified. Reviewed by: phk (some time ago) MFC: 1 week Notes: svn path=/head/; revision=166853
* Make attach the default for -f. That wayNick Hibma2007-02-202-3/+11
| | | | | | | | | | | | mdconfig -f image works like a charm. Reviewed by: phk (some time ago) MFC: 1 week Notes: svn path=/head/; revision=166852
* Make WITHOUT_DYNAMICROOT=foo work again: remember to referencePoul-Henning Kamp2006-04-011-2/+2
| | | | | | | libbsdxml and libsbuf. Notes: svn path=/head/; revision=157375
* Unbreak the build.Jason Evans2006-03-271-6/+1
| | | | Notes: svn path=/head/; revision=157173
* For now, bring back some of the old bits as a fix for specifying md(4)Wojciech A. Koszek2006-03-271-0/+7
| | | | | | | | | | | | device number at creation time with -u option. Together with XMLizing mdconfig(8), I broke this functionality. This change is temporary. Complete fix will be commited soon. Approved by: cognet (mentor) Notes: svn path=/head/; revision=157166
* Teach md(4) and mdconfig(8) how to understand XML. Right now there won't beWojciech A. Koszek2006-03-262-65/+158
| | | | | | | | | | | | | | | a problem with listing large number of md(4) devices. Either 'list' or 'query' mode uses XML. Additionally, new functionality was introduced. It's possible to pass multiple devices to -u: # ./mdconfig -l -u md0,md1 Approved by: cognet (mentor) Notes: svn path=/head/; revision=157160
* Keep proper order of includes. Additionally, sort them. Make functions usedWojciech A. Koszek2006-03-261-23/+20
| | | | | | | | | in that file static. Approved by: cognet (mentor) Notes: svn path=/head/; revision=157159
* Use kld(3) for loading geom_md.ko.Pawel Jakub Dawidek2006-02-181-20/+3
| | | | Notes: svn path=/head/; revision=155807
* Sort the list results by the unit number. The list returned by theDima Dorfman2005-12-221-3/+13
| | | | | | | | | | | kernel is in the order the devices were made, which is not useful to the user. Also, remove the "%d more" test since the kernel does not return the complete count in md_pad[0] (maybe it should?). Submitted by: Wojciech A. Koszek Notes: svn path=/head/; revision=153636
* Rename GEOM class kernel module g_md.ko to geom_md.ko for consistencyPawel Jakub Dawidek2005-11-111-27/+12
| | | | | | | | | | | | | with the rest. mdconfig.c: Simplify mdmaybeload() function. mdioctl.h: Removed (now unused) #define. loader.conf: Sort GEOM classes properly. OK'ed by: phk Notes: svn path=/head/; revision=152309
* When using files as backing stores for devices, and the user has requested theChristian S.J. Peron2005-08-301-0/+11
| | | | | | | | | | | | | | | | device be created read+write, check to see if the backing store is read only through the use of the access(2) system call. If this check fails returning EACCES, EPERM or EROFS then gracefully downgrade the access to read only. Also print a warning message to stderr, informing the user that the access mode they requested is not available. This behavior used to be handled by md(4) but was changed in revision 1.154 Discussed with: pjd, phk, Dario Freni <saturnero at freesbie dot org> Reviewed by: phk Notes: svn path=/head/; revision=149638
* We can specify device size in bytes. Document this in usage.Pawel Jakub Dawidek2005-03-011-2/+3
| | | | Notes: svn path=/head/; revision=142926
* Document the terabyte "-s" parameter in the usage string.Michael Reifenberger2005-02-211-1/+2
| | | | | | | Split the usage line to not exceed 80 chars. Notes: svn path=/head/; revision=142167
* Sync program's usage() with manpage's SYNOPSIS.Ruslan Ermilov2005-02-101-1/+1
| | | | Notes: svn path=/head/; revision=141611
* Allow to specify device size in bytes.Pawel Jakub Dawidek2005-01-222-2/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=140627