Commit Graph

49 Commits

Author SHA1 Message Date
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
dbj 2e6348f3d8 add a SIGINFO handler progress indicator 2003-04-21 07:58:55 +00:00
wiz 2fb4b1db52 New sentence, new line. By Robert Elz with minimal fixes. 2002-10-01 13:40:23 +00:00
wiz 80d1ff493a Sort sections. 2001-11-16 11:21:37 +00:00
toshii 04f91a6594 Uncomment-out part of FreeBSD code so that we can calculate partition
index from a filename.
2001-09-17 16:26:56 +00:00
pooka db8658a3b8 * expand device name to raw device, not block device (eg. wd0a -> /dev/rwd0a)
* #ifdef non-relevant FreeBSD slice consistency check
2001-09-10 19:25:35 +00:00
christos de3ce7e7b1 - Remove old files.
- Port to NetBSD
XXX: *untested*
2001-09-10 18:27:41 +00:00
cgd 8a986b2e96 convert to use getprogname() 2001-02-19 22:48:57 +00:00
christos df49c4a876 fix nested extern 2001-02-04 21:53:39 +00:00
cgd 6b8e92147e after determining the size of a file being used as a msdosfs, seek back to
its start so subsequent writes go to the right places.
1999-07-26 00:28:57 +00:00
erh fa45851f9b Add missing .El line. 1999-03-10 05:14:51 +00:00
msaitoh f8c66df30b sort entries and delete extra periods in SEE also section. 1998-05-22 18:27:50 +00:00
fair 3d7afc6d03 fix bad .Xr references 1998-04-29 09:49:10 +00:00
perry 34a98169f0 macroize BSD, NetBSD, FreeBSD and misc cleanup 1998-02-06 05:54:12 +00:00
perry 3fe138c146 RCS Id Police. 1998-01-09 08:03:16 +00:00
drochner 7a262cc07e make it compile again after msdosfs changes 1997-10-17 17:47:41 +00:00
christos e230a48b57 CFLAGS->CPPFLAGS 1997-10-10 19:47:50 +00:00
lukem 8dee301bb9 * cleanup for WARNS=1 1997-09-15 06:31:54 +00:00
christos b9f439f21f Fix PR/3322, reference to non existant program. 1997-03-12 13:57:51 +00:00
christos d5fff03ed1 From FreeBSD's mkdosfs:
- KNF
	- cleaned up a few typos.
	- use the msdosfs header files.
	- separated Makefile and Makefile.boot, since we cannot build
	  bootcode.h (yet)
ToDo:
	- Make it work on hard disks; only works on floppies
	- Make it accept an msdos.sys io.sys and a command.com, to make
	  a real dos bootable disk.
1997-03-01 19:42:54 +00:00