summaryrefslogtreecommitdiffstats
path: root/sbin/newfs_msdos
Commit message (Collapse)AuthorAgeFilesLines
* Clarify that the "number of bytes per sector"-range in thebcr2010-07-251-2/+2
| | | | | | | | | | | -S option is meant to be "inclusive". The original issue of the PR was already fixed. PR: docs/142418 Submitted by: David Naylor (naylor dot b dot david at gmail dot com) No objection from: kib MFC after: 5 days
* Rename variables to match msdosfs headers.kib2010-02-142-249/+250
| | | | | | Submitted by: Pedro F. Giffuni <giffunip tutopia com> Reviewed by: bde MFC after: 2 weeks
* Some cleanups from NetBSD:kib2010-02-142-20/+23
| | | | | | | | | | | | | | - C99 initializers. - Change the default volume label from "NO NAME" to "NO_NAME". - Set OEM String to "BSD4.4 " following the unnamed spacing convention in that other OS that suggests "MSWIN4.1" Also, David Naylor's changes for Clang, mostly changing the signess of constants. Submitted by: Pedro F. Giffuni <giffunip tutopia com> Clang fixes by: David Naylor <naylor.b.david gmail com> Reviewed by: bde (with some disagreement about Clang issues) MFC after: 2 weeks
* Switch the default WARNS level for sbin/ to 6.ru2009-10-191-2/+0
| | | | Submitted by: Ulrich Spörlein
* Style fixes to the newfs_msdos manpage.ed2009-04-111-8/+9
| | | | Submitted by: Christoph Mallon <christoph mallon gmx de>
* Update documentation (forgotten in r190929).ed2009-04-111-4/+5
| | | | Submitted by: Christoph Mallon <christoph mallon gmx de>
* Do not prepend /dev/ when -C is used.ed2009-04-112-5/+7
| | | | Submitted by: Christoph Mallon <christoph mallon gmx de>
* When using -C, do not warn when the file is not a character device, but warn ↵ed2009-04-111-2/+7
| | | | | | when it is not a regular file. Submitted by: Christoph Mallon <christoph mallon gmx de>
* Fix a bug in r185587.ed2009-04-111-2/+3
| | | | | | | fstat(fd, &sb) was not executed unconditionally anymore so sb was read uninitialised when -C is used. Submitted by: Christoph Mallon <christoph mallon gmx de>
* Use ftruncate() instead of lseek()+write()+lseek() to set the createded2009-04-111-5/+1
| | | | | | file (-C) to the requested size. Submitted by: Christoph Mallon <christoph mallon gmx de>
* De-static local variables in main() (which is not recursive) and const-ifyed2009-04-111-10/+10
| | | | | | others. Submitted by: Christoph Mallon <christoph mallon gmx de>
* Show -@ and -C in usage, which were added in r185587.ed2009-04-111-0/+2
| | | | Submitted by: Christoph Mallon <christoph mallon gmx de>
* Clean up the usage() function to use a single fprintf().ed2009-04-111-26/+25
| | | | Submitted by: Christoph Mallon <christoph mallon gmx de>
* newfs_msdos: allow to work with media that doesn't have any CHS paramsavg2009-02-271-5/+17
| | | | | | | | | | Either use parameters provided by user or make them up. The code for faking CHS params is borrowed from disklabel code. The logic for using user-provided and auto-guessed parameters is not perfect, so to speak. PR: bin/121182 Approved by: jhb (mentor)
* Fix build - cast off_t to (intmax_t) for printing.mlaier2008-12-031-2/+3
|
* Some useful operational extensions to newfs_msdos, especiallyluigi2008-12-032-16/+150
| | | | | | | | | | | | | | | | | | | | | | | | | when preparing images for emulators or flash devices: + option '-C size' to create the underlying image file with given size. Saves doing a 'dd' before, and especially it creates a sparse file + option '-@ offset' to build the FAT image at the specified offset in the image file or device; + make the cluster size adaptive on the filesystem size. Previously the default was 4k which is really unconvenient with large media; now it goes from 512 bytes to 32k depending on filesystem size (i still need to check whether it makes sense to go further up, to 64k or above); + fix default geometry when not specified on the command line, use 63 sectors/255 heads by default. Also trim the size so it exactly a multiple of a track, to avoid complaints in some filesystem code. + document all the above, plus some manual page clarifications. MFC after: 4 weeks
* Create a fake geometry (16 heads, 64 sectors) when dealing withluigi2008-11-261-3/+14
| | | | | | | | | | | | | | | | | | | a plain file and a geometry is not explicitly supplied through command line or disktab entry. This way you can a FAT image on a file as simply as this: newfs_msdos ./some/file (right now you need a much longer command newfs_msdos -h 32 -u 64 -S 512 -s $total_blocks -o 0 ./some/file Will be merged after 7.1 and 6.4 are released. See also the related PR which suggests a similar change. PR: bin/121182 MFC after: 4 weeks
* Be more accurate in the maximum filesize, it's 4GB not 4.3GB.remko2007-12-091-1/+1
| | | | Reported by: njl
* .Ed is not needed here, remove it.remko2007-12-081-1/+0
| | | | Noticed by: brueffer
* Add information about the maximum file size for msdosfs.remko2007-12-081-1/+4
| | | | | | | | PR: docs/112935 Submitted by: Julian Stacey <jhs at berklix dot org> Actually this was inspired by the ticket submitted by Julian. MFC After: 3 days
* The newfs_msdos utility does not store the boot signature in thetrhodes2007-05-311-6/+6
| | | | | | | | correct place on large sector disks. The boot signature should be at offset 0x1fe in the BPB; newfs_msdos currently stores it 2 bytes from the end of the sector. Taken from: NetBSD
* Expand *n't contractions.ru2005-02-131-1/+1
|
* Bring back WARNS to 3 for arm until I figure out how to make gcc happy.cognet2005-01-241-0/+4
|
* Sort sections.ru2005-01-181-2/+2
|
* Oops... Remove the line leaked in the last commit which is notdelphij2005-01-171-1/+0
| | | | intended to be there...
* WARNS=6 cleanup:delphij2005-01-172-17/+18
| | | | | | | - Initialize everything in the struct array, not only the mentioned ones - Unconditionally initialize hs to 0 to avoid repeatly doing so - Cast to unsigned int when comparing to unsigned variables.
* Added the EXIT STATUS section where appropriate.ru2005-01-171-1/+1
|
* Mechanically kill hard sentence breaks.ru2004-07-021-9/+18
|
* style.Makefile(5):johan2004-02-231-1/+1
| | | | Use WARNS?= instead of WARNS=.
* Remove unnecessary newlines from errx() arguments.tjr2004-02-171-4/+4
|
* Additional PC98 option is not needed.nyan2003-01-301-3/+0
|
* Bring newfs_msdos into the GEOM world. Totally rewrite and simplifyscottl2002-11-031-83/+49
| | | | | | | | getdiskinfo(). For the fixed-disk case, bpb->hid probably isn't handled correctly, but I'm not sure if this is a serious problem since the primary use of this program is to format floppy disks. Reviewed by: phk
* EFI GPT partitions use 'p' as a slice seperator. eg: da0p1 or da0p217.peter2002-10-041-1/+1
| | | | (There is a theoretical limit of 16384 partitions)
* s/filesystem/file system/g as discussed on -developerstrhodes2002-08-212-23/+23
|
* The .Nm utilitycharnier2002-07-061-1/+1
|
* more file system > filesystemtrhodes2002-05-162-23/+23
|
* Default to WARNS=2.obrien2001-12-041-0/+1
| | | | | | Binary builds that cannot handle this must explicitly set WARNS=0. Reviewed by: mike
* mdoc(7) police: s/BSD/.Bx/ where appropriate.ru2001-08-141-1/+1
|
* - Backout botched attempt to introduce MANSECT feature.ru2001-03-261-0/+1
| | | | - MAN[1-9] -> MAN.
* Set the default manual section for sbin/ to 8.ru2001-03-201-1/+0
|
* Added pc98 support.nyan2001-02-161-0/+4
| | | | Submitted by: Akio Morita <amorita@meadow.scphys.kyoto-u.ac.jp>
* Prepare for mdoc(7)NG.ru2000-12-181-9/+14
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-1/+1
|
* Don't depend on <sys/stat.h> bogusly including <sys/time.h> (and therebywollman2000-10-101-1/+3
| | | | <time.h>).
* Remove redundant code left over on removal of /dev/rXXX handlingrnordier2000-08-151-2/+0
| | | | in r1.12.
* Partially revert r1.12, in which a warnx() if the device is not arnordier2000-08-151-1/+1
| | | | | character device is changed to an errx(). This unnecessarily compromises device independence.
* Consistency fix.rnordier2000-08-061-1/+1
|
* Fix the reporting of a raw device node.asmodai2000-07-261-2/+2
| | | | | | | Change a warnx to an errx since we should only attempt to use this utility on a character device. Approved by: green
* Update device names in examples.kris2000-05-071-3/+3
|
* Better error message for a case that I hit.imp2000-04-141-1/+2
|
OpenPOWER on IntegriCloud