Commit Graph

69 Commits

Author SHA1 Message Date
sevan 1137c8dc70 Note the origin of the newfs_msdos command from FreeBSD 3.0.
Replace contraction.
s/filesystem/file system/
Bump date.
2016-09-12 05:09:39 +00:00
mlelstv 4842a68f63 Use the same defaults for cluster sizes as Windows. 2016-04-03 11:00:13 +00:00
christos 1428ec3f79 remove advertising clause. 2015-10-16 17:38:17 +00:00
abs b46e0d1534 newfs_msdos allowed suffixes such as 'k', 'm' for some parameters,
but amusingly this did not include Block size, or Sectors per cluster.
Allow for all numeric parameters (If I want to specify the number
of drive heads as '1K', then why not?)
2015-04-23 13:27:14 +00:00
christos e6c9ef61dd Fix volume name (Ed Maste) 2014-04-24 23:49:40 +00:00
riastradh 6cb10275d0 Merge riastradh-drm2 to HEAD. 2014-03-18 18:20:35 +00:00
martin 88bc910896 PR bin/46743: mark the "next free cluster" value in the file system
info block as unitialized.
2014-01-05 12:52:39 +00:00
christos 3e4993b396 fix unused variable warnings. 2013-10-19 01:09:58 +00:00
wiz a5684d07dd Use Mt for email addresses. 2013-07-20 21:39:55 +00:00
christos 2d1d9d47bc don't truncate the file if an offset is given. 2013-02-03 03:21:42 +00:00
christos 9eab57ada8 nbtool_config.h undefines _NETBSD_SOURCE, and that makes <sys/types.h> not
define cpuid_t, which makes <sys/mount.h> unincludable. Although this is a
bug in the build system, it is simpler to fix it here.
2013-01-27 21:56:26 +00:00
christos 3060c42593 toolify 2013-01-24 19:24:56 +00:00
christos 9c80670845 don't do the partition dance for makefs; we have no real disk 2013-01-24 00:10:09 +00:00
christos c613c761ab We don't need getdiskinfo() for makefs() since we always deal with an image. 2013-01-23 22:48:18 +00:00
christos 30441591f7 fix regressions after split. 2013-01-23 15:29:15 +00:00
christos aed35c482d Split the make fs portion into a function; do argument tests inside the
function.
2013-01-21 20:28:38 +00:00
jakllsch 913c04e5ec There are two problems with insisting the FAT file system size be a multiple
of track-size units:  2) the FAT metadata areas may not be a multiple of a
"track", 1) the partition may not be track-aligned to begin with, 0) what's
a "track"? is it something a robot rover leaves on Mars?
2012-12-15 04:34:36 +00:00
jakllsch b7565c8f0e According to current file(1) magic definitions an unlabeled FAT is
denoted with "NO NAME" rather than "NO_NAME".
2012-11-04 14:27:15 +00:00
jakllsch 1423b85c62 Use correct values for minimum and maximum cluster counts for the various FAT
types.  These values come from a publically-avaliable document of an
infallible source that must not be named due to a violation of the document's
license restrictions.  This is justified by interoperability concerns.
2012-07-31 13:52:44 +00:00
jakllsch 1f2df78806 constify opts[] 2012-07-04 18:35:58 +00:00
joerg baa8e84b6f Use __dead 2011-08-29 14:34:58 +00:00
pooka d69295fda4 Set errno to 0 before strtoll() so that it can reliably be tested
afterwards.  Fixes newfs_msdos at least on sparc.  Incidentally,
the msdosfs tests also start working on sparc, which about halves
the number of test failures on that platform.
2011-03-05 13:47:43 +00:00
haad f5b48500f1 Add support for DIOCGDISKINFO to disk like device drivers. Change
partutil.c::getdiskinfo to use it to get disk geometry info.
Use DIOCGWEDGEINFO ioctl to get information about partition size, if disk
driver doesn't support it use old DIOCGDINFO. This patch adds support for
wedge like devices(lvm logical volumes, ZFS zvol partitions) to newfs and
other tools.

No objections on tech-userlevel@.
2009-06-05 21:52:31 +00:00
lukem a2b5923e3e fix sign-compare issues 2009-04-11 06:59:18 +00:00
he cfbede5668 Add a cast to intmax_t and use %jd to print an off_t.
Fixes at least the alpha and amd64 builds.
2009-03-28 21:34:33 +00:00
pooka 4ff44dd1fe remove troublesome printf specifier 2009-03-28 15:17:16 +00:00
wiz 61ae4edccb New sentence, new line. 2009-03-26 09:56:17 +00:00
pooka 32852ecef0 Apply revisions 1.23 and 1.24 from FreeBSD to autocalculate the
necessary geometry when creating a file system directly to a file.

In addition, when creating, do not complain about the file not
being char special and do not try to execute device ioctl's on it.
2009-03-26 08:39:24 +00:00
christos 5dae591c0c Use the wedge size, not the disk size, from Yorick Hardy 2009-02-17 00:16:35 +00:00
mrg 5be383f77e Do not erroneously leave a truncated 16-bit sector
count on "large" (>=32MB) file systems when fetching the geometry from
the medium.  This confuses some software (which is to say Windows)
when a device newfs(8)ed under NetBSD is transported to another
system.  (Note: The rest of the code uses 'bsec', and DTRT for smaller
file systems.)

contributed anonymously.
2009-01-18 10:50:56 +00:00
jmcneill a2f8108745 The kernel now accepts BPB with heads > 255, so don't limit the number
of drive heads.
2008-12-26 04:23:17 +00:00
christos b6f6f7a746 teach this about wedges. 2008-08-11 10:56:54 +00:00
drochner 628f1591c1 include <signal.h> where signal(3) is used 2007-02-08 21:36:58 +00:00
cbiere 551466a6e7 Avoid crash if the filename contains no digits. 2007-01-21 20:45:41 +00:00
scw 258fa36dc2 Don't use negative offsets from "bpb.bps" when writing out values such
as DOSMAGIC in the MBR. In non-512 byte media, the MBR is still 512
bytes in length.

Based on the patches provided in PR kern/17398 by Trevin Beattie.
2006-11-25 12:29:33 +00:00
christos 851ac27d44 c99 initializers 2006-10-16 03:25:21 +00:00
christos c5acbf4d6b Coverity CID 3788: comment out impossible code. 2006-09-27 18:52:11 +00:00
christos 7d40b7b07f Coverity CID 830: Fix dead code issue 2006-05-25 15:32:17 +00:00
christos e73d73289c Coverity CID 3287: Comment out dead code. 2006-05-23 01:03:16 +00:00
tsutsui 0eb69997b3 Add a tweak to default value settings for a number of drive heads
and a number of sectors per track.

According to sys/fs/msdosfs/msdosfs_vfsops.c:msdosfs_mountfs(),
the kernel doesn't accept BPB with spt (sector per track) > 63
or hds (drive heads) > 255, so if values taken from disklabel
don't match these restrictions, use popular BIOS default values
(255/63) instead.
2005-04-16 14:40:36 +00:00
dsl 9ab983c04a Add (unsigned char) cast to ctype function 2004-10-29 19:04:39 +00:00
thorpej 6e82649d8e Change the default volume label from "NO NAME" to "NO_NAME". Note the
default in the manual page.
2004-09-22 23:52:38 +00:00
thorpej 3af81aff5a Default the OEM ID to "NetBSD" rather than "BSD 4.4". (Geez, did 4.4BSD
even have a newfs_msdos command?)
2004-09-22 23:46:38 +00:00
thorpej d06c5d9fc6 Correct some examples, and note when it was first included in NetBSD,
not FreeBSD.
2004-09-22 23:40:49 +00:00
christos 6bd1d6d4db Replace the statfs() family of system calls with statvfs().
Retain binary compatibility.
2004-04-21 01:05:31 +00:00
jmmv b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
lukem c93539067a Determine the MBR partition type relevant for the resulting partition,
and display that.
2003-11-23 23:16:40 +00:00
lukem 04a16dcc66 add some more detail to an error message 2003-10-08 03:56:21 +00:00
itojun 658b0219c1 snprintf 2003-07-13 07:38:12 +00:00
wiz 287057db85 Bump date for last. 2003-04-24 12:19:06 +00:00