aboutsummaryrefslogtreecommitdiff
path: root/sbin/newfs_msdos
Commit message (Collapse)AuthorAgeFilesLines
* The code only converts from bpbHugeSectors to bpbSectors if the sum ofWarner Losh2016-08-301-1/+1
| | | | | | | | | | | | | | | the hidden and huge sectors is less than or equal MAXU16. When formatting in Windows bpbSectors is still used for 63488 sectors and 2048 hidden (sum > MAXU16). The hidden sectors count is the number of sectors before the FAT16 Boot Record so it shouldn't affect the sector count. Attached patch (huge_sec_conversion.patch) to only check for bpb.bpbHugeSectors <= MAXU16 when converting to bpbSectors. Submitted by: Guy Yur PR: 183234 Notes: svn path=/head/; revision=305075
* Remove CHS alignment. It's not needed and causes problems for the BBBWarner Losh2016-08-301-7/+0
| | | | | | | | | | boot partition. NetBSD removed it in 1.10 in their repo some time ago. Submitted by: Guy Yur PR: 183234 Notes: svn path=/head/; revision=305074
* Use nitems() from sys/param.h.Marcelo Araujo2016-04-191-1/+1
| | | | | | | MFC after: 2 weeks. Notes: svn path=/head/; revision=298250
* 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 leak in mkfs_msdos(..) by initializing img to NULL and free'ing at the endEnji Cooper2015-12-061-40/+47
| | | | | | | | | | | | | | of the function Differential Revision: https://reviews.freebsd.org/D4405 MFC after: 1 week PR: 204943 Reviewed by: emaste, jilles Reported by: David Binderman <dcb314@hotmail.com> Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291908
* Use netbsd usage() implementation in newfs_msdosEd Maste2015-11-271-27/+14
| | | | | | | | | | In r289629 newfs_msdos option descriptions are available in mkfs_msdos.h. Obtained from: NetBSD Notes: svn path=/head/; revision=291385
* mkfs_msdos: sync with NetBSDEd Maste2015-11-271-3/+8
| | | | | | | | | Add a sanity test and clean up whitespace. Obtained from: NetBSD Notes: svn path=/head/; revision=291382
* newfs_msdos: rework error handling for eventual use in makefsEd Maste2015-11-232-98/+191
| | | | | | | | | | | Return -1 on errors from mkfs_msdos() instead of err()/errx(), to allow different consumers to handle errors as appropriate. Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=291219
* Update $NetBSD$ IDEd Maste2015-11-231-1/+1
| | | | | | | | | NetBSD mkfs_msdos.h rev 1.3 removed the no-endorsement clause from the license block, which had already been done in the source I imported in r289629. Notes: svn path=/head/; revision=291218
* newfs_msdos: use NetBSD's mkfs_msdos.h verbatim for makefs compatibilityEd Maste2015-10-201-42/+50
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=289629
* newfs_msdos: prefer snprintf to sprintfEd Maste2015-10-161-1/+1
| | | | | | | | Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=289424
* newfs_msdos: move mkfs_msdos to separate file for later use in makefsEd Maste2015-10-154-835/+918
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=289376
* newfs_msdos: rework option parsing to match NetBSDEd Maste2015-10-151-125/+162
| | | | | | | | | | | | | NetBSD split newfs_msdos in two so that they can reuse the file system creation part in makefs. This change is a step on the path of bringing that support to FreeBSD. Reviewed by: kib, pfg Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3905 Notes: svn path=/head/; revision=289369
* It's 2015, and some people are still trying to use fdisk and thenEdward Tomasz Napierala2015-09-021-3/+1
| | | | | | | | | | | | | | | | go asking what debug flags to set for GEOM to make it work. Advice them to use gpart(8) instead. Something similar should probably done with disklabel, but I need to rewrite the disklabel examples first. Reviewed by: wblock@ MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3315 Notes: svn path=/head/; revision=287396
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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-272-22/+20
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-191-1/+1
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge head from 7/28Simon J. Gerraty2014-08-191-1/+1
| |\ \ | | | | | | | | | | | | 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. Gerraty2014-05-081-31/+31
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * \ \ \ Merge headSimon J. Gerraty2014-04-281-5/+5
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * \ \ \ \ Merge head@256284Simon J. Gerraty2013-10-131-3/+3
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=256424
| * \ \ \ \ \ Merge headSimon J. Gerraty2013-09-111-2/+2
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=255477
| * | | | | | | 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 with HEAD.David E. O'Brien2013-02-081-4/+4
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * | | | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | | | | Update documented OEM string in newfs_msdos(8).Pedro F. Giffuni2015-04-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was updated in r203868 to better match the naming scheme in other OSs that use FAT. MFC after: 3 days Notes: svn path=/head/; revision=281320
* | | | | | | | | Remove old ioctl use and support, once and for all.Warner Losh2015-01-061-20/+18
| |_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=276737
* | | | | | | | Use "NO NAME" as the default unnamed label.Pedro F. Giffuni2014-08-131-1/+1
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Microsoft recommends avoiding the use of spaces in the string structures for FAT. Unfortunately they do just that by default in the case of unlabeled filesystems. Follow the default MS behavior to avoid confusion in common tools like file(1). This was actually the default behavior before r203868. Obtained from: NetBSD (CVS rev. 1.39) MFC after: 3 days Notes: svn path=/head/; revision=269953
* | | | | | | use .Mt to mark up email addresses consistently (part1)Baptiste Daroussin2014-06-201-1/+1
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de> Notes: svn path=/head/; revision=267667
* | | | | | Small cleanup: mostly whitespace vs. tabs.Pedro F. Giffuni2014-04-301-31/+31
| |_|_|_|/ |/| | | | | | | | | | | | | | Notes: svn path=/head/; revision=265164
* | | | | Correct min/max cluster counts for FAT12/16/32Ed Maste2014-04-241-5/+5
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FAT12 1..4084 FAT16 4085..65524 FAT32 65525.. This is required for interoperability with other FAT implementations, and in particular UEFI. Obtained from: NetBSD Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=264889
* | | | Sweep man pages replacing ad -> ada.Sergey Kandaurov2013-10-011-3/+3
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | Approved by: re (blackend) MFC after: 1 week X-MFC note: stable/9 only Notes: svn path=/head/; revision=255977
* | | newfs_msdos: fix inaccurate comments.Pedro F. Giffuni2013-09-071-2/+2
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | The fields from deMTime and deMDate in the DOS directory entry are actually the last-modified time/date. According to some online documentation these are the only timestamps available in FAT12/FAT16. MFC after: 3 days Notes: svn path=/head/; revision=255339
* | newfs_msdos: cosmetical cleanupsPedro F. Giffuni2013-01-191-4/+4
|/ | | | | | | | | | | | | | - Simplify diagnostic messages. - Adopt lowercase first letters to make the messages more canonical. PR: bin/175404 Submitted by: Christoph Mallon Reviewed by: bde MFC after: 3 days Notes: svn path=/head/; revision=245648
* Globally replace u_int*_t from (non-contributed) man pages.Ed Schouten2012-02-121-18/+18
| | | | | | | | | | | | | | The reasoning behind this, is that if we are consistent in our documentation about the uint*_t stuff, people will be less tempted to write new code that uses the non-standard types. I am not going to bump the man page dates, as these changes can be considered style nits. The meaning of the man pages is unaffected. MFC after: 1 month Notes: svn path=/head/; revision=231564
* Many style fixes.Pedro F. Giffuni2011-12-202-77/+97
| | | | | | | | | | | | | Remove C99 initializers: they don't help in this case. Set errno to 0 before strtoll() (from NetBSD). PR: 151850 Suggested by: bde Approved by: jhb (Mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=228740
* Use __packed to prevent alignment from taking place, which otherwise mayXin LI2011-11-111-5/+5
| | | | | | | | | | | | | change the on-disk format in an incompatible way. Without this change, msdosfs created on FreeBSD/arm would not be mountable. PR: bin/162486 Submitted by: Ian Lepore <freebsd damnhippie dyndns org> Reported by: Mattia Rossi <mrossi at swin.edu.au> MFC after: 3 days Notes: svn path=/head/; revision=227454
* Use NULL instead of 0 for third argument of sigaction(2).Andrey V. Elsukov2011-07-121-1/+1
| | | | | | | | Pointed by: kib MFC after: 2 weeks Notes: svn path=/head/; revision=223946
* Add SIGINFO handler.Andrey V. Elsukov2011-07-121-0/+24
| | | | | | | | | Reviewed by: kib Obtained from: NetBSD (partly) MFC after: 2 weeks Notes: svn path=/head/; revision=223945
* MFtbemd:Warner Losh2010-08-231-1/+2
| | | | | | | | Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform. Notes: svn path=/head/; revision=211725
* Clarify that the "number of bytes per sector"-range in theBenedict Reuschling2010-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 Notes: svn path=/head/; revision=210463
* Rename variables to match msdosfs headers.Konstantin Belousov2010-02-142-249/+250
| | | | | | | | | Submitted by: Pedro F. Giffuni <giffunip tutopia com> Reviewed by: bde MFC after: 2 weeks Notes: svn path=/head/; revision=203869
* Some cleanups from NetBSD:Konstantin Belousov2010-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 Notes: svn path=/head/; revision=203868
* Switch the default WARNS level for sbin/ to 6.Ruslan Ermilov2009-10-191-2/+0
| | | | | | | Submitted by: Ulrich Spörlein Notes: svn path=/head/; revision=198236
* Style fixes to the newfs_msdos manpage.Ed Schouten2009-04-111-8/+9
| | | | | | | Submitted by: Christoph Mallon <christoph mallon gmx de> Notes: svn path=/head/; revision=190936
* Update documentation (forgotten in r190929).Ed Schouten2009-04-111-4/+5
| | | | | | | Submitted by: Christoph Mallon <christoph mallon gmx de> Notes: svn path=/head/; revision=190933