summaryrefslogtreecommitdiff
path: root/sbin/newfs/newfs.c
AgeCommit message (Collapse)Author
2011-05-23Allow specifying k/m/g/... suffixes in newfs(8) -S and -s options.David Coppa
Useful for mount_mfs, now you can just say: # mount_mfs -s 50m swap /tmp And it will do what you want, taking into account sector size. Old behaviour of -s (specifying count of sectors) is, of course, preserved. All the work was done by Vadim Zhukov (persgray(at)gmail com). OK myself, otto@, thib@
2011-04-26setrlimit only if mfs; ok millert@Otto Moerbeek
2010-12-13stray tabMarco Peereboom
2010-07-24mount -f doesn't help mfs, but it doesn't hurt, so stop warning about it.Ted Unangst
ok deraadt
2010-07-02garbage collect an unused variableTheo de Raadt
2010-05-18dont let sys/ioctl.h imply that you get the ioctls in dkio.h. thisDavid Gwynne
gets rid of #include <sys/dkio.h> in sys/ioctl.h and adds #include <sys/dkio.h> to the places that actually want and use the disk ioctls. this became an issue when krw@'s X build failed when he was testing a change to dkio.h. tested by krw@ help from and ok miod@
2010-05-03Switch newfs to opendev(3) - this simplies the code and will allow it toJoel Sing
benefit from planned changes to opendev(3). ok krw@ marco@
2010-04-23Recycle unused disklabel fields in order to create a disklabel uniqueJoel Sing
identifier, allowing the disk to be identified without relying on the device name. ok deraadt@ krw@ beck@ marco@ todd@
2010-03-20Make FFS2 the default format for file systems larger than INT_MAXKenneth R Westerback
512-byte blocks. Better than just blowing up. Tweak man page to document this and clarify various things. Inspired by problems noted during an install by Harald Dunkel. Suggestions and man page corrections from otto@ and jmc@ ok beck@
2008-08-08Admit b_blkno means block number; a block is DEV_BSIZE (a.k.a.Kenneth R Westerback
512) bytes; ffs is inextricably tied to using b_blkno and disklabel always uses sectorsize units. Thus use DEV_BSIZE units for all fields describing ffs filesystems and convert to/from sectors where required. This enables the creation and use of ffs filesystems on non-512 byte sectorsize devices. This diff allows i386 and sgi (the two test platforms) to find disklabels that are not on a sectorsize boundary. Same change to further archs coming. This is a no-op on 512-byte sectorsize devices. This work triggered by jsing@'s need to create ffs filesystems on sgi cdroms so we can create cdrom install media for sgi. sgi testing by jsing@ ok jsing@ pedro@ "looks sane" beck@ weingart@
2008-08-04refuse to run on block devices; prompted by marco; ok marco@ millert@Otto Moerbeek
deraadt@
2008-07-06Don't change the size of the partition being newfs'd when sectorsize,Kenneth R Westerback
either from the disklabel or via -S, is not 512 bytes. Disklabel partition sizes are sectors and not 512 byte blocks. One less 'block is 512 bytes' assumption. 2^32 or so to go. ok otto@ millert@
2008-06-27documentation tweak.Igor Sobrado
2008-06-24- move -S and -t into the main option descriptions: they were the onlyJason McIntyre
options left of the old tuning list, and it makes sense to have one list now - document -T. this was requested by todd (fries), and comes largely from the description in netbsd's page of the same name ok millert otto
2008-06-04warnx already prepends string with a colon, no need to manually add oneTobias Stoeckmann
here. ok millert, otto
2008-01-29More read/write result checking fixes to avoid unsigned comparisons vsKenneth R Westerback
-1. ok henning@ beck@ ray@
2008-01-15s/fragements/fragments/ in usage().Stuart Henderson
'please fix' jmc
2007-11-26revised diff that handles the no mfs parts correctlyTed Unangst
2007-11-25when running as newfs, there is no argv[1].. backout previousTheo de Raadt
2007-11-25Iruata Souza sent a diff that fixes weird occurences when mounting withTed Unangst
a relative path: use realpath to only mount with absolute names. ok deraadt thib
2007-11-05forgotten arg to printf, Tobias UlmerOtto Moerbeek
2007-06-26Enable creation of larger than 1TB FFS2 filesystems. Note that thisOtto Moerbeek
won't work yet. There remains sys/ufs work. ok deraadt@
2007-06-10remove last instances of daddr_t; ok thib@Otto Moerbeek
2007-06-01ufs1_daddr_t cleanup, okay otto@Pedro Martelletto
2007-06-01convert ufs2_daddr_t -> daddr64_t for greater clarity; ok pedro otto thibTheo de Raadt
2007-05-29Updated disklabel format to support larger disks and partitions. WeOtto Moerbeek
free room in struct partition by packing fragment size and fragments/block more tighlty and use the resulting space to make offset and size 48 bits. For the disk part we use spare fields in struct disklabel. Kernel converts in-mem copy of the on-disk label if needed, disklabel(8) writes new version. We are careful to only change fields not used by bootloaders. Conception of basic scheme by deraadt. ok deraadt@ krw@
2007-05-20Update usage wrt -c option when called as mount_mfs.Todd C. Miller
2007-05-19Now that the amd64 floppy and cd image -c setting have been fixed,Otto Moerbeek
recommit the -c changes. For now, we warn only if we cannot honour -c. ok millert@ deraadt@
2007-05-19backout -c changes; they were not tested on all the media. all newfsTheo de Raadt
changes obviously *MUST* be checked against whatever weird things the floppies do to fit
2007-05-18The unit of the -c options is fragments, so adjust man page andOtto Moerbeek
variable name; correct the loop packing more inodes into the cg: in some cases it could put more fragments into the cg than requested; give an error if the -c option cannot be honoured. ok millert@ pedro@
2007-05-15Make usage declaration match prototype; Make it __dead also.Thordur I. Bjornsson
ok otto@
2007-04-13Missing bit in last commit, remove -z for getopt string.Todd C. Miller
2007-04-13cut the verbosity from usage() and instead print a synopsis,Jason McIntyre
as matched by the man page; ok millert
2007-04-13Add support for creating ffs2 filesystems. Note that the conceptTodd C. Miller
of a constant-sized track is obsolete in today's world of variable blocks per track disks so the cylinder group packing algorithm has been updated. Based on the ufs2 changes in FreeBSD by Kirk McKusick. From pedro@ with changes by me as well as a few from NetBSD. OK pedro@ beck@ thib@ and tested by more...
2007-04-03Use strtonum(), not atoi(). OK deraadt, with help from otto@Todd C. Miller
2007-04-03Remove obsolete options for superblock fields that are no longer used.Todd C. Miller
OK deraadt @, OK in principle tedu@
2007-04-03Minor cleanup: remove rcsids, remove #ifdef'd out code, COMPAT isTodd C. Miller
the default, quiet gcc. OK deraadt@
2007-04-02Modern disks do bad sector replacement themselves. There is noTodd C. Miller
need to reserve space for them in the filesystem itself. OK deraadt@ pedro@
2006-03-09Remove option -n from newfs as well as all references to fs_postbl()Pedro Martelletto
Various testing for a while, okay krw@
2005-10-28Make it possible to use -P on readonly memory filesystems. FromOtto Moerbeek
Alexander Hall, with some guidance by me. ok deraadt@
2004-08-12Prevent core dump on large block sizes by checking block size againstOtto Moerbeek
MAXBSIZE. ok millert@
2004-07-02Take TMPDIR into account when creating a temp mountpoint for populating.Otto Moerbeek
ok avsm@ millert@; man page ok jmc@
2004-06-26For all the mfs lovers:Otto Moerbeek
- Make the root of an mfs file system inherit the permission and owner/group of the mountpoint. Work by david@. - Add the ability to populate an mfs file system with the contents of a directory or a file system immediately after creation, controlled by the new -P mount option. Discussed with and tested by many, ok djm@ david@
2003-11-03NULL for NULL pointers, not 0Ted Unangst
2003-11-03combine ugly printf(), exit() combo statements into err() or errx().Ted Unangst
mostly from tom cosgrove.
2003-10-07better guess for ncyls. allows chuck yerkes to make small file systems again.Ted Unangst
2003-07-16remove default limit of 16 cylinders per group. it's now set toTed Unangst
as many as fit with the other parameters given. change default frag size to 2048, bumping block size to 16k. from freebsd. ok deraadt@ and co.
2003-07-02missing protosTheo de Raadt
2003-06-25proto repairsTheo de Raadt
2003-06-11ansificationTheo de Raadt