The NetBSD Project

CVS log for src/sbin/fdisk/fdisk.c

[BACK] Up to [cvs.NetBSD.org] / src / sbin / fdisk

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.161 / (download) - annotate - [select for diffs], Sat Apr 2 19:15:09 2022 UTC (23 months, 3 weeks ago) by mlelstv
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Changes since 1.160: +7 -4 lines
Diff to previous 1.160 (colored) to selected 1.36 (colored)

Avoid crashes with invalid or tiny sector sizes.

Revision 1.160 / (download) - annotate - [select for diffs], Wed Nov 3 14:30:04 2021 UTC (2 years, 4 months ago) by nia
Branch: MAIN
Changes since 1.159: +6 -11 lines
Diff to previous 1.159 (colored) to selected 1.36 (colored)

fdisk(8): Convert realloc(x * y) to reallocarr. Eliminate temp variables.

Revision 1.159 / (download) - annotate - [select for diffs], Sun May 24 21:02:12 2020 UTC (3 years, 10 months ago) by wiz
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.158: +4 -3 lines
Diff to previous 1.158 (colored) to selected 1.36 (colored)

Add -g to usage.

Revision 1.158 / (download) - annotate - [select for diffs], Sun May 24 18:42:48 2020 UTC (3 years, 10 months ago) by jmcneill
Branch: MAIN
Changes since 1.157: +10 -3 lines
Diff to previous 1.157 (colored) to selected 1.36 (colored)

Add -g flag to preserve GPT headers when updating MBR.

Revision 1.154.4.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:03:19 2020 UTC (3 years, 11 months ago) by martin
Branch: phil-wifi
Changes since 1.154.4.1: +8 -8 lines
Diff to previous 1.154.4.1 (colored) to branchpoint 1.154 (colored) next main 1.155 (colored) to selected 1.36 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.157 / (download) - annotate - [select for diffs], Mon Oct 7 20:56:07 2019 UTC (4 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp
Changes since 1.156: +8 -8 lines
Diff to previous 1.156 (colored) to selected 1.36 (colored)

print the name of the disk causing the error.

Revision 1.154.4.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:05:33 2019 UTC (4 years, 9 months ago) by christos
Branch: phil-wifi
Changes since 1.154: +7 -6 lines
Diff to previous 1.154 (colored) to selected 1.36 (colored)

Sync with HEAD

Revision 1.154.2.2 / (download) - annotate - [select for diffs], Mon Nov 26 01:52:14 2018 UTC (5 years, 4 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.154.2.1: +6 -5 lines
Diff to previous 1.154.2.1 (colored) to branchpoint 1.154 (colored) next main 1.155 (colored) to selected 1.36 (colored)

Sync with HEAD, resolve a couple of conflicts

Revision 1.156 / (download) - annotate - [select for diffs], Wed Nov 14 12:05:29 2018 UTC (5 years, 4 months ago) by mlelstv
Branch: MAIN
CVS Tags: phil-wifi-20190609, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Changes since 1.155: +6 -5 lines
Diff to previous 1.155 (colored) to selected 1.36 (colored)

In validate_bootsel, the code assumed that arr[j][i] can be accessed
with something like arr[0][j*ARRAYWIDTH+i]. gcc no longer allows such
hacks and discards the code silently because of undefined behaviour.

Revision 1.154.2.1 / (download) - annotate - [select for diffs], Thu Sep 6 06:55:21 2018 UTC (5 years, 6 months ago) by pgoyette
Branch: pgoyette-compat
Changes since 1.154: +3 -3 lines
Diff to previous 1.154 (colored) to selected 1.36 (colored)

Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

Revision 1.153.8.1 / (download) - annotate - [select for diffs], Tue Aug 28 13:23:34 2018 UTC (5 years, 7 months ago) by martin
Branch: netbsd-8
CVS Tags: netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1
Changes since 1.153: +3 -3 lines
Diff to previous 1.153 (colored) next main 1.154 (colored) to selected 1.36 (colored)

Pull up following revision(s) (requested by sevan in ticket #993):

	sbin/fdisk/fdisk.c: revision 1.155

Add missing -z flag to usage()

Revision 1.155 / (download) - annotate - [select for diffs], Mon Aug 27 14:55:46 2018 UTC (5 years, 7 months ago) by sevan
Branch: MAIN
CVS Tags: pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906
Changes since 1.154: +3 -3 lines
Diff to previous 1.154 (colored) to selected 1.36 (colored)

Add missing -z flag to usage()

Revision 1.154 / (download) - annotate - [select for diffs], Mon Oct 2 22:02:05 2017 UTC (6 years, 5 months ago) by joerg
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-base, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: phil-wifi, pgoyette-compat
Changes since 1.153: +11 -13 lines
Diff to previous 1.153 (colored) to selected 1.36 (colored)

Really don't include ioctl code for tools build.

Revision 1.153 / (download) - annotate - [select for diffs], Sun Nov 22 15:53:10 2015 UTC (8 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: netbsd-8
Changes since 1.152: +3 -3 lines
Diff to previous 1.152 (colored) to selected 1.36 (colored)

explain how to clear an entry (without reading the source)

Revision 1.152 / (download) - annotate - [select for diffs], Tue Jun 16 23:58:30 2015 UTC (8 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.151: +3 -3 lines
Diff to previous 1.151 (colored) to selected 1.36 (colored)

a few more \n's in errors

Revision 1.151 / (download) - annotate - [select for diffs], Tue Jun 16 23:18:54 2015 UTC (8 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.150: +4 -4 lines
Diff to previous 1.150 (colored) to selected 1.36 (colored)

fix error messages containing \n

Revision 1.142.2.3 / (download) - annotate - [select for diffs], Wed Aug 20 00:02:24 2014 UTC (9 years, 7 months ago) by tls
Branch: tls-maxphys
Changes since 1.142.2.2: +90 -22 lines
Diff to previous 1.142.2.2 (colored) to branchpoint 1.142 (colored) next main 1.143 (colored) to selected 1.36 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.134.2.4 / (download) - annotate - [select for diffs], Thu May 22 11:37:28 2014 UTC (9 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.134.2.3: +111 -33 lines
Diff to previous 1.134.2.3 (colored) to branchpoint 1.134 (colored) next main 1.135 (colored) to selected 1.36 (colored)

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")

Revision 1.150 / (download) - annotate - [select for diffs], Fri Apr 4 16:15:30 2014 UTC (9 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Changes since 1.149: +2 -4 lines
Diff to previous 1.149 (colored) to selected 1.36 (colored)

remove debugging.

Revision 1.149 / (download) - annotate - [select for diffs], Thu Apr 3 17:07:11 2014 UTC (9 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.148: +72 -17 lines
Diff to previous 1.148 (colored) to selected 1.36 (colored)

instead of using ugly -1's make args optional

Revision 1.148 / (download) - annotate - [select for diffs], Tue Apr 1 19:08:48 2014 UTC (9 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
Changes since 1.147: +11 -5 lines
Diff to previous 1.147 (colored) to selected 1.36 (colored)

default to something reasonable (like the interactive mode does) instead
of 0 when -1 is specified for the start or size.

Revision 1.147 / (download) - annotate - [select for diffs], Sun Mar 30 22:18:13 2014 UTC (10 years ago) by christos
Branch: MAIN
Changes since 1.146: +16 -7 lines
Diff to previous 1.146 (colored) to selected 1.36 (colored)

Allow -1 values in the -s <sysid>/<start>/<size> indicate use the previous
values. For example:
fdisk -f -i /dev/rsd0d # initialize mbr and create an msdos partition.
fdisk -f -u -0 -a -s 169/-1/-1 /dev/rsd0d # converts the msdos partition
to a netbsd one, and makes it active.

Revision 1.146 / (download) - annotate - [select for diffs], Mon Mar 10 15:42:51 2014 UTC (10 years ago) by jakllsch
Branch: MAIN
CVS Tags: riastradh-drm2-base3
Changes since 1.145: +3 -3 lines
Diff to previous 1.145 (colored) to selected 1.36 (colored)

Always print the MBR drive serial number, even if it's 0.

Revision 1.142.2.2 / (download) - annotate - [select for diffs], Sun Jun 23 06:28:50 2013 UTC (10 years, 9 months ago) by tls
Branch: tls-maxphys
Changes since 1.142.2.1: +16 -10 lines
Diff to previous 1.142.2.1 (colored) to branchpoint 1.142 (colored) to selected 1.36 (colored)

resync from head

Revision 1.145 / (download) - annotate - [select for diffs], Sun Apr 14 22:48:22 2013 UTC (10 years, 11 months ago) by jakllsch
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Changes since 1.144: +16 -10 lines
Diff to previous 1.144 (colored) to selected 1.36 (colored)

Improve support for logical sector sizes greater than 512.

Revision 1.142.2.1 / (download) - annotate - [select for diffs], Mon Feb 25 00:28:05 2013 UTC (11 years, 1 month ago) by tls
Branch: tls-maxphys
Changes since 1.142: +7 -3 lines
Diff to previous 1.142 (colored) to selected 1.36 (colored)

resync with head

Revision 1.144 / (download) - annotate - [select for diffs], Wed Feb 13 00:40:28 2013 UTC (11 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: agc-symver-base, agc-symver
Changes since 1.143: +6 -2 lines
Diff to previous 1.143 (colored) to selected 1.36 (colored)

Don't produce spurious errors when creating labels on files.

Revision 1.143 / (download) - annotate - [select for diffs], Sat Feb 9 01:50:04 2013 UTC (11 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.142: +3 -3 lines
Diff to previous 1.142 (colored) to selected 1.36 (colored)

CID/979997: missing va_end()

Revision 1.134.2.3 / (download) - annotate - [select for diffs], Tue Oct 30 18:59:25 2012 UTC (11 years, 5 months ago) by yamt
Branch: yamt-pagecache
CVS Tags: yamt-pagecache-tag8
Changes since 1.134.2.2: +4 -2 lines
Diff to previous 1.134.2.2 (colored) to branchpoint 1.134 (colored) to selected 1.36 (colored)

sync with head

Revision 1.138.2.1 / (download) - annotate - [select for diffs], Tue Jun 12 19:11:50 2012 UTC (11 years, 9 months ago) by riz
Branch: netbsd-6
CVS Tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Changes since 1.138: +6 -11 lines
Diff to previous 1.138 (colored) next main 1.139 (colored) to selected 1.36 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #315):
	sbin/fdisk/fdisk.c: revision 1.141
	sbin/fdisk/fdisk.c: revision 1.142
	tools/fdisk/Makefile: revision 1.5
	tools/fdisk/Makefile: revision 1.7
	sbin/fdisk/Makefile: revision 1.42
Don't use "#if defined(__i386__) || defined(__x86_64__)" conditionals
in C source file to define option features.
Define proper options in each Makefile per ${MACHINE_ARCH} variable instead.
Previously if a host is x86 and it has /usr/mdec/mbr file in its system,
tools fdisk implicitly installs it as mbr bootcode even for !x86 targets.
Use ${DESTDIR}/usr/mdec for DEFAULT_BOOTDIR on tools fdisk(8)
rather than unknown build host's /usr/mdec directory.
XXX: no option to leave MBR bootcode empty on x86 targets

Revision 1.142 / (download) - annotate - [select for diffs], Tue Jun 5 13:41:23 2012 UTC (11 years, 9 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6
Branch point for: tls-maxphys
Changes since 1.141: +4 -2 lines
Diff to previous 1.141 (colored) to selected 1.36 (colored)

Use ${DESTDIR}/usr/mdec for DEFAULT_BOOTDIR on tools fdisk(8)
rather than unknown build host's /usr/mdec directory.

XXX: no option to leave MBR bootcode empty on x86 targets

Revision 1.134.2.2 / (download) - annotate - [select for diffs], Wed May 23 10:07:34 2012 UTC (11 years, 10 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.134.2.1: +4 -11 lines
Diff to previous 1.134.2.1 (colored) to branchpoint 1.134 (colored) to selected 1.36 (colored)

sync with head.

Revision 1.141 / (download) - annotate - [select for diffs], Sat May 5 16:03:55 2012 UTC (11 years, 10 months ago) by tsutsui
Branch: MAIN
CVS Tags: yamt-pagecache-base5
Changes since 1.140: +4 -11 lines
Diff to previous 1.140 (colored) to selected 1.36 (colored)

Don't use "#if defined(__i386__) || defined(__x86_64__)" conditionals
in C source file to define option features.
Define proper options in each Makefile per ${MACHINE_ARCH} variable instead.

Previously if a host is x86 and it has /usr/mdec/mbr file in its system,
tools fdisk implicitly installs it as mbr bootcode even for !x86 targets.

Revision 1.134.2.1 / (download) - annotate - [select for diffs], Tue Apr 17 00:05:39 2012 UTC (11 years, 11 months ago) by yamt
Branch: yamt-pagecache
Changes since 1.134: +82 -25 lines
Diff to previous 1.134 (colored) to selected 1.36 (colored)

sync with head

Revision 1.140 / (download) - annotate - [select for diffs], Fri Apr 6 20:09:26 2012 UTC (11 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base4
Changes since 1.139: +65 -14 lines
Diff to previous 1.139 (colored) to selected 1.36 (colored)

support sector sizes > 512.

Revision 1.139 / (download) - annotate - [select for diffs], Thu Mar 15 02:02:21 2012 UTC (12 years ago) by joerg
Branch: MAIN
Changes since 1.138: +3 -3 lines
Diff to previous 1.138 (colored) to selected 1.36 (colored)

Add __printflike attribution to use vprintf and friends with an argument
as format string.

Revision 1.138 / (download) - annotate - [select for diffs], Fri Dec 2 15:21:15 2011 UTC (12 years, 3 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-6-base
Branch point for: netbsd-6
Changes since 1.137: +5 -4 lines
Diff to previous 1.137 (colored) to selected 1.36 (colored)

Also ignore out of space conditions for -I so we can create overlapping
partitions on a full disk. Document and add it to the options.

Revision 1.137 / (download) - annotate - [select for diffs], Fri Dec 2 04:05:20 2011 UTC (12 years, 3 months ago) by enami
Branch: MAIN
Changes since 1.136: +3 -3 lines
Diff to previous 1.136 (colored) to selected 1.36 (colored)

Add missing -F flag and -I flag in usage.  Sort the order to match
manpage.

Revision 1.136 / (download) - annotate - [select for diffs], Fri Dec 2 03:04:11 2011 UTC (12 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.135: +4 -4 lines
Diff to previous 1.135 (colored) to selected 1.36 (colored)

put the error check in the conditional where it belongs.

Revision 1.135 / (download) - annotate - [select for diffs], Thu Dec 1 22:24:29 2011 UTC (12 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.134: +13 -8 lines
Diff to previous 1.134 (colored) to selected 1.36 (colored)

Add a flag to support writing overlapping partitions and explain why.

Revision 1.134 / (download) - annotate - [select for diffs], Sun Aug 28 15:46:26 2011 UTC (12 years, 7 months ago) by gson
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.133: +3 -3 lines
Diff to previous 1.133 (colored) to selected 1.36 (colored)

fix the sparc build

Revision 1.133 / (download) - annotate - [select for diffs], Sat Aug 27 20:49:03 2011 UTC (12 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.132: +3 -3 lines
Diff to previous 1.132 (colored) to selected 1.36 (colored)

one static is enough, otherwise you risk zapping yourself.

Revision 1.132 / (download) - annotate - [select for diffs], Sat Aug 27 17:16:01 2011 UTC (12 years, 7 months ago) by joerg
Branch: MAIN
Changes since 1.131: +117 -117 lines
Diff to previous 1.131 (colored) to selected 1.36 (colored)

staticfy. __dead.

Revision 1.131 / (download) - annotate - [select for diffs], Sun May 8 14:22:16 2011 UTC (12 years, 10 months ago) by pgoyette
Branch: MAIN
CVS Tags: cherry-xenmp-base, cherry-xenmp
Changes since 1.130: +4 -4 lines
Diff to previous 1.130 (colored) to selected 1.36 (colored)

Fix parsing of -A option so that the [/ptn_0_offset] part is optional, as
described in the man page.

Revision 1.116.6.1.4.1 / (download) - annotate - [select for diffs], Wed Apr 21 05:26:33 2010 UTC (13 years, 11 months ago) by matt
Branch: matt-nb5-mips64
CVS Tags: matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-k15
Changes since 1.116.6.1: +10 -10 lines
Diff to previous 1.116.6.1 (colored) next main 1.116.6.2 (colored) to selected 1.36 (colored)

sync to netbsd-5

Revision 1.116.6.3 / (download) - annotate - [select for diffs], Sat Jan 9 01:04:48 2010 UTC (14 years, 2 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, matt-nb5-pq3-base, matt-nb5-pq3
Changes since 1.116.6.2: +4 -4 lines
Diff to previous 1.116.6.2 (colored) to branchpoint 1.116 (colored) next main 1.117 (colored) to selected 1.36 (colored)

Pull up following revision(s) (requested by dsl in ticket #1207):
	sbin/fdisk/fdisk.c: revision 1.128
Editing partitions larger than 1TB works better if 'decimal' returns
64 bit integer values!

Revision 1.116.6.2 / (download) - annotate - [select for diffs], Thu Dec 24 04:54:47 2009 UTC (14 years, 3 months ago) by snj
Branch: netbsd-5
Changes since 1.116.6.1: +9 -9 lines
Diff to previous 1.116.6.1 (colored) to branchpoint 1.116 (colored) to selected 1.36 (colored)

Pull up following revision(s) (requested by dsl in ticket #1201):
	sbin/fdisk/fdisk.c: revision 1.123
Change arguments to decimal() to be int64_t.
They need to be able to hold disk sector numbers > 2^31 and also -1.
Should fix PR/34807

Revision 1.130 / (download) - annotate - [select for diffs], Wed Dec 23 18:50:40 2009 UTC (14 years, 3 months ago) by dsl
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.129: +44 -42 lines
Diff to previous 1.129 (colored) to selected 1.36 (colored)

Put #endif in correct place - fixes PR/42500
Update usage() for -A, and rename one of the variables for clarity.

Revision 1.129 / (download) - annotate - [select for diffs], Tue Dec 22 21:55:12 2009 UTC (14 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.128: +84 -39 lines
Diff to previous 1.128 (colored) to selected 1.36 (colored)

Add support for partition being aligned on non-cylinder boundaries.
Info can be specified with -A parameter.
Default is based on how the first partition is defined.
For empty disks larger than 128GB (arbitrary figure) use 1MB alignment.

Revision 1.128 / (download) - annotate - [select for diffs], Tue Dec 22 21:04:37 2009 UTC (14 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.127: +4 -4 lines
Diff to previous 1.127 (colored) to selected 1.36 (colored)

Editing partitions larger than 1TB works better if 'decimal' returns
64 bit integer values!

Revision 1.127 / (download) - annotate - [select for diffs], Sun Dec 20 17:32:09 2009 UTC (14 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.126: +78 -40 lines
Diff to previous 1.126 (colored) to selected 1.36 (colored)

Add a large comment about disk geometries.
Rename (with #defines) the variables use for aligning partitions to
separate them from the bios geometry.
All in advance of allowing other partition alignments (eg 2048 sectors).

Revision 1.126 / (download) - annotate - [select for diffs], Thu Dec 17 14:27:49 2009 UTC (14 years, 3 months ago) by pooka
Branch: MAIN
Changes since 1.125: +5 -2 lines
Diff to previous 1.125 (colored) to selected 1.36 (colored)

Use implicit -F for regular files, much like disklabel(8).

Revision 1.125 / (download) - annotate - [select for diffs], Wed Nov 4 22:25:56 2009 UTC (14 years, 4 months ago) by dsl
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.124: +18 -16 lines
Diff to previous 1.124 (colored) to selected 1.36 (colored)

Allow MB, GB and CYL (not just M, G and C) and lower case.
Don't output a splurious 'd' before "cyl".
Fixes PR/37414.
Patch in PR is wrong!

Revision 1.124 / (download) - annotate - [select for diffs], Sat Oct 31 20:41:00 2009 UTC (14 years, 5 months ago) by dsl
Branch: MAIN
Changes since 1.123: +3 -3 lines
Diff to previous 1.123 (colored) to selected 1.36 (colored)

Make absence of /usr/mdec/mbr only a warning.
Fixes PR/26510

Revision 1.123 / (download) - annotate - [select for diffs], Wed Aug 5 21:31:50 2009 UTC (14 years, 7 months ago) by dsl
Branch: MAIN
Changes since 1.122: +9 -9 lines
Diff to previous 1.122 (colored) to selected 1.36 (colored)

Change arguments to decimal() to be int64_t.
They need to be able to hold disk sector numbers > 2^31 and also -1.
Should fix PR/34807

Revision 1.122 / (download) - annotate - [select for diffs], Tue Jun 2 21:15:53 2009 UTC (14 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.121: +4 -3 lines
Diff to previous 1.121 (colored) to selected 1.36 (colored)

make this compile one non mbr machines (move #define to the general section)

Revision 1.121 / (download) - annotate - [select for diffs], Mon Jun 1 19:57:33 2009 UTC (14 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.120: +94 -5 lines
Diff to previous 1.120 (colored) to selected 1.36 (colored)

Delete GPT partitions if we overwrite with MBR to avoid confusion with disks
that have both MBR and a secondary left over GPT partition signature. From
Mike M. Volokhov

Revision 1.88.2.2 / (download) - annotate - [select for diffs], Sat May 30 06:37:13 2009 UTC (14 years, 10 months ago) by snj
Branch: netbsd-3
Changes since 1.88.2.1: +5 -4 lines
Diff to previous 1.88.2.1 (colored) to branchpoint 1.88 (colored) next main 1.89 (colored) to selected 1.36 (colored)

Pull up following revision(s) (requested by jnemeth in ticket #2018):
	sbin/fdisk/fdisk.c: revision 1.104
PR/36223: Milos Negovanovic: Don't ask if we want to install mbr_bootselect
with -f.

Revision 1.117.2.1 / (download) - annotate - [select for diffs], Wed May 13 19:19:00 2009 UTC (14 years, 10 months ago) by jym
Branch: jym-xensuspend
Changes since 1.117: +15 -9 lines
Diff to previous 1.117 (colored) next main 1.118 (colored) to selected 1.36 (colored)

Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.116.6.1 / (download) - annotate - [select for diffs], Mon Apr 20 23:16:45 2009 UTC (14 years, 11 months ago) by snj
Branch: netbsd-5
CVS Tags: netbsd-5-0-RELEASE, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20091211, matt-nb4-mips64-k7-u2a-k9b
Branch point for: matt-nb5-mips64
Changes since 1.116: +5 -5 lines
Diff to previous 1.116 (colored) to selected 1.36 (colored)

Pull up following revision(s) (requested by sborrill in ticket #712):
	sbin/fdisk/fdisk.c: revision 1.119
When using -s flag, read start and size as unsigned to allow for larger
disks. (Thanks to drochner@ for catching it).

Revision 1.120 / (download) - annotate - [select for diffs], Mon Apr 20 17:06:55 2009 UTC (14 years, 11 months ago) by drochner
Branch: MAIN
CVS Tags: jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.119: +3 -3 lines
Diff to previous 1.119 (colored) to selected 1.36 (colored)

also fix a comment wrt use of the csysid/cstart/csize vars

Revision 1.119 / (download) - annotate - [select for diffs], Mon Apr 20 15:03:56 2009 UTC (14 years, 11 months ago) by sborrill
Branch: MAIN
Changes since 1.118: +5 -5 lines
Diff to previous 1.118 (colored) to selected 1.36 (colored)

When using -s flag, read start and size as unsigned to allow for larger
disks. (Thanks to drochner@ for catching it).

Revision 1.118 / (download) - annotate - [select for diffs], Mon Apr 6 12:18:19 2009 UTC (14 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.117: +12 -6 lines
Diff to previous 1.117 (colored) to selected 1.36 (colored)

fix sign-compare issues

Revision 1.117 / (download) - annotate - [select for diffs], Sun Jan 18 21:15:14 2009 UTC (15 years, 2 months ago) by apb
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.116: +2 -12 lines
Diff to previous 1.116 (colored) to selected 1.36 (colored)

Remove local definitions of PRIxxxx macros in favour of the
centralised definitions from tools/compat/compat_defs.h, which
are included via nbtool_config.h.

Revision 1.102.2.2.2.2 / (download) - annotate - [select for diffs], Tue Jun 3 20:47:12 2008 UTC (15 years, 9 months ago) by skrll
Branch: wrstuden-fixsa
Changes since 1.102.2.2.2.1: +8 -6 lines
Diff to previous 1.102.2.2.2.1 (colored) next main 1.102.2.3 (colored) to selected 1.36 (colored)

Sync with netbsd-4.

Revision 1.115.4.1 / (download) - annotate - [select for diffs], Thu Apr 3 13:54:09 2008 UTC (15 years, 11 months ago) by mjf
Branch: mjf-devfs2
Changes since 1.115: +5 -5 lines
Diff to previous 1.115 (colored) next main 1.116 (colored) to selected 1.36 (colored)

Sync with HEAD.

Revision 1.115.2.1 / (download) - annotate - [select for diffs], Mon Mar 24 07:14:48 2008 UTC (16 years ago) by keiichi
Branch: keiichi-mipv6
Changes since 1.115: +5 -5 lines
Diff to previous 1.115 (colored) next main 1.116 (colored) to selected 1.36 (colored)

sync with head.

Revision 1.105.4.3 / (download) - annotate - [select for diffs], Sun Mar 23 00:44:22 2008 UTC (16 years ago) by matt
Branch: matt-armv6
Changes since 1.105.4.2: +74 -45 lines
Diff to previous 1.105.4.2 (colored) to branchpoint 1.105 (colored) next main 1.106 (colored) to selected 1.36 (colored)

sync with HEAD

Revision 1.116 / (download) - annotate - [select for diffs], Sun Mar 9 14:57:10 2008 UTC (16 years ago) by tnn
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, netbsd-5-base, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, mjf-devfs2-base, matt-mips64-base2, matt-armv6-nbase, keiichi-mipv6-base, hpcarm-cleanup-nbase
Branch point for: netbsd-5
Changes since 1.115: +5 -5 lines
Diff to previous 1.115 (colored) to selected 1.36 (colored)

mbr_dsn is unsigned, print it as such.

Revision 1.88.2.1 / (download) - annotate - [select for diffs], Fri Feb 22 18:55:12 2008 UTC (16 years, 1 month ago) by bouyer
Branch: netbsd-3
Changes since 1.88: +13 -6 lines
Diff to previous 1.88 (colored) to selected 1.36 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #1897):
	sbin/fdisk/fdisk.c: revisions 1.100, 1.101, 1.114
PR/33522: Peter Bex: Sanity checks to avoid zerodivide.
PR/33633: Yoshito Komatsu: /sbin/fdisk does not work
Downgrade error getting heads to a warning.
- add a sanity check to avoid possible division by zero
- adjust sector numbers _after_ "Sanity check the data against all zeroes"
Should close PR bin/37656.

Revision 1.110.2.3 / (download) - annotate - [select for diffs], Mon Feb 18 21:04:17 2008 UTC (16 years, 1 month ago) by mjf
Branch: mjf-devfs
Changes since 1.110.2.2: +71 -42 lines
Diff to previous 1.110.2.2 (colored) to branchpoint 1.110 (colored) next main 1.111 (colored) to selected 1.36 (colored)

Sync with HEAD.

Revision 1.102.2.5 / (download) - annotate - [select for diffs], Sun Feb 3 18:02:08 2008 UTC (16 years, 1 month ago) by riz
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base
Changes since 1.102.2.4: +3 -3 lines
Diff to previous 1.102.2.4 (colored) to branchpoint 1.102 (colored) next main 1.103 (colored) to selected 1.36 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #1053):
	sbin/fdisk/fdisk.c: revision 1.107
Don't print Drive serial number if -S (setting shell variables) is specified.

Revision 1.102.2.4 / (download) - annotate - [select for diffs], Sun Feb 3 18:00:03 2008 UTC (16 years, 1 month ago) by riz
Branch: netbsd-4
Changes since 1.102.2.3: +5 -3 lines
Diff to previous 1.102.2.3 (colored) to branchpoint 1.102 (colored) to selected 1.36 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #1052):
	sbin/fdisk/fdisk.c: revision 1.114
- add a sanity check to avoid possible division by zero
- adjust sector numbers _after_ "Sanity check the data against all zeroes"
Should close PR bin/37656.

Revision 1.115 / (download) - annotate - [select for diffs], Fri Jan 25 23:19:10 2008 UTC (16 years, 2 months ago) by dsl
Branch: MAIN
CVS Tags: mjf-devfs-base, hpcarm-cleanup-base
Branch point for: mjf-devfs2, keiichi-mipv6
Changes since 1.114: +66 -39 lines
Diff to previous 1.114 (colored) to selected 1.36 (colored)

Add support for mbr code with ascii keycodes

Revision 1.114 / (download) - annotate - [select for diffs], Sun Jan 20 06:39:31 2008 UTC (16 years, 2 months ago) by tsutsui
Branch: MAIN
Changes since 1.113: +7 -5 lines
Diff to previous 1.113 (colored) to selected 1.36 (colored)

- add a sanity check to avoid possible division by zero
- adjust sector numbers _after_ "Sanity check the data against all zeroes"

Should close PR bin/37656.

Revision 1.105.4.2 / (download) - annotate - [select for diffs], Wed Jan 9 01:38:03 2008 UTC (16 years, 2 months ago) by matt
Branch: matt-armv6
Changes since 1.105.4.1: +93 -72 lines
Diff to previous 1.105.4.1 (colored) to branchpoint 1.105 (colored) to selected 1.36 (colored)

sync with HEAD

Revision 1.110.2.2 / (download) - annotate - [select for diffs], Thu Dec 27 00:46:56 2007 UTC (16 years, 3 months ago) by mjf
Branch: mjf-devfs
Changes since 1.110.2.1: +2750 -0 lines
Diff to previous 1.110.2.1 (colored) to branchpoint 1.110 (colored) to selected 1.36 (colored)

Sync with HEAD.

Revision 1.113 / (download) - annotate - [select for diffs], Sun Dec 23 10:43:57 2007 UTC (16 years, 3 months ago) by apb
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.112: +7 -2 lines
Diff to previous 1.112 (colored) to selected 1.36 (colored)

Track zero is not strictly reserved for the BIOS, that's just a
convention, so don't make it an error in check_overlap().  Sector 0 is
reserved for the MBR, so make that an error in check_overlap().

Revision 1.112 / (download) - annotate - [select for diffs], Sun Dec 23 08:58:34 2007 UTC (16 years, 3 months ago) by apb
Branch: MAIN
Changes since 1.111: +25 -8 lines
Diff to previous 1.111 (colored) to selected 1.36 (colored)

Report the first active partition.

Revision 1.111 / (download) - annotate - [select for diffs], Sun Dec 23 08:14:28 2007 UTC (16 years, 3 months ago) by apb
Branch: MAIN
Changes since 1.110: +5 -2 lines
Diff to previous 1.110 (colored) to selected 1.36 (colored)

If the partition is unused, then attempting to decode the PBR would
actually decode the MBR from sector 0 of the disk.  Don't do it if
v_flag < 3.

Revision 1.110.2.1, Thu Nov 29 23:19:25 2007 UTC (16 years, 4 months ago) by mjf
Branch: mjf-devfs
Changes since 1.110: +0 -2725 lines
FILE REMOVED

file fdisk.c was added on branch mjf-devfs on 2007-12-27 00:46:56 +0000

Revision 1.110 / (download) - annotate - [select for diffs], Thu Nov 29 23:19:25 2007 UTC (16 years, 4 months ago) by dsl
Branch: MAIN
CVS Tags: cube-autoconf-base, cube-autoconf
Branch point for: mjf-devfs
Changes since 1.109: +5 -5 lines
Diff to previous 1.109 (colored) to selected 1.36 (colored)

Make this compile without -Wno-pointer-sign
(Needs updated bootblock.h)

Revision 1.109 / (download) - annotate - [select for diffs], Thu Nov 29 23:02:00 2007 UTC (16 years, 4 months ago) by dsl
Branch: MAIN
Changes since 1.108: +58 -62 lines
Diff to previous 1.108 (colored) to selected 1.36 (colored)

Change -F to not use opendisk().
Don't change default to the boot volume until after we've found we aren't
  doing -F.
For tool-fdisk enforce -F and use #defines to make code that can no
  longer possibly execute compile.

Revision 1.108 / (download) - annotate - [select for diffs], Sun Nov 18 19:19:00 2007 UTC (16 years, 4 months ago) by apb
Branch: MAIN
Changes since 1.107: +3 -3 lines
Diff to previous 1.107 (colored) to selected 1.36 (colored)

Remove unwanted ">" from a printed message.

Revision 1.105.4.1 / (download) - annotate - [select for diffs], Tue Nov 6 23:12:32 2007 UTC (16 years, 4 months ago) by matt
Branch: matt-armv6
CVS Tags: matt-armv6-prevmlocking
Changes since 1.105: +7 -3 lines
Diff to previous 1.105 (colored) to selected 1.36 (colored)

sync with HEAD

Revision 1.107 / (download) - annotate - [select for diffs], Sun Oct 28 10:02:08 2007 UTC (16 years, 5 months ago) by tsutsui
Branch: MAIN
Changes since 1.106: +3 -3 lines
Diff to previous 1.106 (colored) to selected 1.36 (colored)

Don't print Drive serial number if -S (setting shell variables) is specified.

Revision 1.106 / (download) - annotate - [select for diffs], Tue Sep 4 00:34:58 2007 UTC (16 years, 6 months ago) by tls
Branch: MAIN
Changes since 1.105: +6 -2 lines
Diff to previous 1.105 (colored) to selected 1.36 (colored)

This program is a host tool, so when we use newfangled C features like
PRIxyz we have to ensure it still builds on hosts with Old compilers.
Noticed while building a cross-toolchain on FreeBSD 4.

Revision 1.102.2.2.2.1 / (download) - annotate - [select for diffs], Mon Sep 3 07:02:51 2007 UTC (16 years, 6 months ago) by wrstuden
Branch: wrstuden-fixsa
Changes since 1.102.2.2: +9 -9 lines
Diff to previous 1.102.2.2 (colored) to selected 1.36 (colored)

Sync w/ NetBSD-4-RC_1

Revision 1.102.2.3 / (download) - annotate - [select for diffs], Fri Aug 24 17:33:56 2007 UTC (16 years, 7 months ago) by liamjfoy
Branch: netbsd-4
CVS Tags: wrstuden-fixsa-base-1, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0
Changes since 1.102.2.2: +7 -7 lines
Diff to previous 1.102.2.2 (colored) to branchpoint 1.102 (colored) to selected 1.36 (colored)

Pull up following revision(s) (requested by dsl in ticket #832):
	sbin/fdisk/fdisk.c: revision 1.105
Preserve the mbr 'driver serial number' when copying in the netbsd
mbr code.  Should leave windows vista bootable.
Print the dsn from the mbr, not each pbr.

Revision 1.105 / (download) - annotate - [select for diffs], Thu Jul 5 20:30:29 2007 UTC (16 years, 8 months ago) by dsl
Branch: MAIN
CVS Tags: matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: matt-armv6
Changes since 1.104: +9 -9 lines
Diff to previous 1.104 (colored) to selected 1.36 (colored)

Preserve the mbr 'driver serial number' when copying in the netbsd
mbr code.  Should leave windows vista bootable.
Print the dsn from the mbr, not each pbr.

Revision 1.102.2.2 / (download) - annotate - [select for diffs], Sat Apr 28 18:15:27 2007 UTC (16 years, 11 months ago) by bouyer
Branch: netbsd-4
Branch point for: wrstuden-fixsa
Changes since 1.102.2.1: +5 -4 lines
Diff to previous 1.102.2.1 (colored) to branchpoint 1.102 (colored) to selected 1.36 (colored)

Pull up following revision(s) (requested by christos in ticket #593):
	sbin/fdisk/fdisk.c: revision 1.104
PR/36223: Milos Negovanovic: Don't ask if we want to install mbr_bootselect
with -f.

Revision 1.104 / (download) - annotate - [select for diffs], Thu Apr 26 18:51:00 2007 UTC (16 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.103: +5 -4 lines
Diff to previous 1.103 (colored) to selected 1.36 (colored)

PR/36223: Milos Negovanovic: Don't ask if we want to install mbr_bootselect
with -f.

Revision 1.102.2.1 / (download) - annotate - [select for diffs], Thu Mar 22 20:37:20 2007 UTC (17 years ago) by jdc
Branch: netbsd-4
Changes since 1.102: +139 -2 lines
Diff to previous 1.102 (colored) to selected 1.36 (colored)

Pull up revision 1.103 (requested by apb in ticket #513).

Try to check whether each partition is bootable.  If not,
always print an error message.  If bootable and -v flag was
specified, print a success message.  If -v flag was specified
more than once, also try to decode more information from
the PBR.

Input from dsl and bad.

Revision 1.103 / (download) - annotate - [select for diffs], Sat Mar 10 14:18:28 2007 UTC (17 years ago) by apb
Branch: MAIN
Changes since 1.102: +139 -2 lines
Diff to previous 1.102 (colored) to selected 1.36 (colored)

Try to check whether each partition is bootable.  If not,
always print an error message.  If bootable and -v flag was
specified, print a success message.  If -v flag was specified
more than once, also try to decode more information from
the PBR.

Input from dsl and bad.

Revision 1.102 / (download) - annotate - [select for diffs], Sat Nov 25 16:10:32 2006 UTC (17 years, 4 months ago) by dsl
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.101: +15 -8 lines
Diff to previous 1.101 (colored) to selected 1.36 (colored)

Report the last sector number of a partition, instead of that of the first
of the next - with appropriate discarding of the head/sector values
if the partition is cylinder aligned.
Fixes PR 26921

Revision 1.101 / (download) - annotate - [select for diffs], Fri Jun 2 17:40:34 2006 UTC (17 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.100: +6 -4 lines
Diff to previous 1.100 (colored) to selected 1.36 (colored)

PR/33633: Yoshito Komatsu: /sbin/fdisk does not work
Downgrade error getting heads to a warning.

Revision 1.100 / (download) - annotate - [select for diffs], Sun May 21 16:00:17 2006 UTC (17 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.99: +6 -3 lines
Diff to previous 1.99 (colored) to selected 1.36 (colored)

PR/33522: Peter Bex: Sanity checks to avoid zerodivide.

Revision 1.99 / (download) - annotate - [select for diffs], Sat Mar 18 08:36:50 2006 UTC (18 years ago) by dsl
Branch: MAIN
Changes since 1.98: +4 -3 lines
Diff to previous 1.98 (colored) to selected 1.36 (colored)

Appease Coverty CID 7449. Avoid close(-1) in error path.

Revision 1.98 / (download) - annotate - [select for diffs], Fri Mar 17 15:53:46 2006 UTC (18 years ago) by rumble
Branch: MAIN
Changes since 1.97: +4 -2 lines
Diff to previous 1.97 (colored) to selected 1.36 (colored)

Check for allocation failures in malloc, calloc, realloc, asprintf, and
vasprintf and try to handle them.

Revision 1.97 / (download) - annotate - [select for diffs], Tue Feb 14 04:48:15 2006 UTC (18 years, 1 month ago) by dyoung
Branch: MAIN
Changes since 1.96: +9 -7 lines
Diff to previous 1.96 (colored) to selected 1.36 (colored)

So that we can build a full-featured fdisk cross-tool with -DBOOTSEL,
condition the definition of DEFAULT_BOOTxxx variables and SCAN_xxx
on defined(BOOTSEL), instead of defined(__i386__) || defined(__x86_64__).

While I'm here, only build get_diskname in the same conditions as
get_geometry is built, since only the latter calls the former.

Revision 1.96 / (download) - annotate - [select for diffs], Sun Jan 29 12:55:16 2006 UTC (18 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.95: +29 -28 lines
Diff to previous 1.95 (colored) to selected 1.36 (colored)

Byteswap the constant MBR_{BS_}MAGIC throughout, should genetate better code.
Except that non all architectures have that optimisation :-(

Revision 1.77.2.2 / (download) - annotate - [select for diffs], Thu Dec 1 19:58:05 2005 UTC (18 years, 4 months ago) by riz
Branch: netbsd-2-0
Changes since 1.77.2.1: +3 -3 lines
Diff to previous 1.77.2.1 (colored) to branchpoint 1.77 (colored) next main 1.78 (colored) to selected 1.36 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #10165):
	sbin/fdisk/fdisk.c: revision 1.82 via patch
Fix intuit_translated_geometry() calculation.
From Izumi Tsutsui in PR bin/26917

Revision 1.77.2.1.4.1 / (download) - annotate - [select for diffs], Thu Dec 1 19:58:00 2005 UTC (18 years, 4 months ago) by riz
Branch: netbsd-2-1
Changes since 1.77.2.1: +3 -3 lines
Diff to previous 1.77.2.1 (colored) next main 1.77.2.2 (colored) to selected 1.36 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #10165):
	sbin/fdisk/fdisk.c: revision 1.82 via patch
Fix intuit_translated_geometry() calculation.
From Izumi Tsutsui in PR bin/26917

Revision 1.77.2.1.2.1 / (download) - annotate - [select for diffs], Thu Dec 1 19:55:25 2005 UTC (18 years, 4 months ago) by riz
Branch: netbsd-2
Changes since 1.77.2.1: +3 -3 lines
Diff to previous 1.77.2.1 (colored) next main 1.77.2.2 (colored) to selected 1.36 (colored)

Pull up following revision(s) (requested by tsutsui in ticket #10165):
	sbin/fdisk/fdisk.c: revision 1.82 via patch
Fix intuit_translated_geometry() calculation.
From Izumi Tsutsui in PR bin/26917

Revision 1.95 / (download) - annotate - [select for diffs], Fri Oct 7 23:57:10 2005 UTC (18 years, 5 months ago) by uwe
Branch: MAIN
Changes since 1.94: +5 -3 lines
Diff to previous 1.94 (colored) to selected 1.36 (colored)

PRI* macros should not contain percent sign.
While here, conditionalise use of "lld" for PRId64 on HAVE_LONG_LONG.

Revision 1.94 / (download) - annotate - [select for diffs], Fri Oct 7 01:04:08 2005 UTC (18 years, 5 months ago) by dogcow
Branch: MAIN
Changes since 1.93: +6 -2 lines
Diff to previous 1.93 (colored) to selected 1.36 (colored)

Fix cross-compilation on FreeBSD 4.x (and other OSes) where PRId64 isn't
defined.

Revision 1.93 / (download) - annotate - [select for diffs], Sat Aug 27 22:43:40 2005 UTC (18 years, 7 months ago) by uwe
Branch: MAIN
Changes since 1.92: +2 -3 lines
Diff to previous 1.92 (colored) to selected 1.36 (colored)

When building as host tool don't include "../../include/util.h".

opendisk() declared in that file is not used in this case anyway, and
<util.h> pulls in unwatned includes (e.g. <utmpx.h> doesn't exist on
FreeBSD 4.*).

Revision 1.92 / (download) - annotate - [select for diffs], Mon Jun 27 01:00:05 2005 UTC (18 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.91: +6 -6 lines
Diff to previous 1.91 (colored) to selected 1.36 (colored)

Move WARNS=3 to the Makefile.inc, and add a little const to the remaining
programs that did not compile before.

Revision 1.91 / (download) - annotate - [select for diffs], Sun Jun 12 19:14:10 2005 UTC (18 years, 9 months ago) by dyoung
Branch: MAIN
Changes since 1.90: +87 -20 lines
Diff to previous 1.90 (colored) to selected 1.36 (colored)

Turn fdisk(8) into a host tool.  Still todo: commit the host-tool
build infrastructure to src/tools/fdisk/.

Revision 1.90 / (download) - annotate - [select for diffs], Sun Jun 12 19:06:43 2005 UTC (18 years, 9 months ago) by dyoung
Branch: MAIN
Changes since 1.89: +20 -20 lines
Diff to previous 1.89 (colored) to selected 1.36 (colored)

For portability, use standard types: s/uint/unsigned int/,
s/ulong/unsigned long/, s/u_int8_t/uint8_t/.

Revision 1.89 / (download) - annotate - [select for diffs], Thu Apr 7 20:23:13 2005 UTC (18 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.88: +12 -6 lines
Diff to previous 1.88 (colored) to selected 1.36 (colored)

Allow partition sizes to be input in GB

Revision 1.88 / (download) - annotate - [select for diffs], Thu Jan 20 16:01:02 2005 UTC (19 years, 2 months ago) by xtraeme
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0
Branch point for: netbsd-3
Changes since 1.87: +2 -4 lines
Diff to previous 1.87 (colored) to selected 1.36 (colored)

Remove main() prototype; WARNS=2

Revision 1.87 / (download) - annotate - [select for diffs], Thu Nov 18 12:00:18 2004 UTC (19 years, 4 months ago) by wiz
Branch: MAIN
Changes since 1.86: +3 -3 lines
Diff to previous 1.86 (colored) to selected 1.36 (colored)

Fix typo in error message, reported by Nicolas Joly in PR 28347.

Revision 1.86 / (download) - annotate - [select for diffs], Mon Nov 15 21:59:23 2004 UTC (19 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.85: +3 -3 lines
Diff to previous 1.85 (colored) to selected 1.36 (colored)

Use the 1st element's size as the argument to bsearch.

Revision 1.85 / (download) - annotate - [select for diffs], Fri Nov 12 16:57:46 2004 UTC (19 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.84: +13 -137 lines
Diff to previous 1.84 (colored) to selected 1.36 (colored)

Use ptype table from <sys/bootblock.h>

Revision 1.84 / (download) - annotate - [select for diffs], Wed Nov 10 02:39:48 2004 UTC (19 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.83: +3 -2 lines
Diff to previous 1.83 (colored) to selected 1.36 (colored)

Add 0xBF for Solaris. From Larry Lee <lclee at west.sun.com>

Revision 1.83 / (download) - annotate - [select for diffs], Thu Oct 28 19:48:41 2004 UTC (19 years, 5 months ago) by dsl
Branch: MAIN
Changes since 1.82: +5 -5 lines
Diff to previous 1.82 (colored) to selected 1.36 (colored)

Add (unsigned char) to isdigit() calls

Revision 1.82 / (download) - annotate - [select for diffs], Sun Sep 12 07:46:24 2004 UTC (19 years, 6 months ago) by dsl
Branch: MAIN
Changes since 1.81: +94 -26 lines
Diff to previous 1.81 (colored) to selected 1.36 (colored)

Fix intuit_translated_geometry() calculation.
From Izumi Tsutsui in PR bin/26917

Revision 1.77.2.1 / (download) - annotate - [select for diffs], Mon Aug 16 17:46:13 2004 UTC (19 years, 7 months ago) by jmc
Branch: netbsd-2-0
CVS Tags: netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE
Branch point for: netbsd-2-1, netbsd-2
Changes since 1.77: +9 -5 lines
Diff to previous 1.77 (colored) to selected 1.36 (colored)

Pullup rev 1.81 (requested by dbj in ticket #767)

Add support to pxeboot for reading the bios disk geometry
as well as fixing several related bugs that occur when the bios
geometry is not read by the boot loader.

Revision 1.81 / (download) - annotate - [select for diffs], Fri Jul 30 23:42:29 2004 UTC (19 years, 8 months ago) by dbj
Branch: MAIN
Changes since 1.80: +9 -5 lines
Diff to previous 1.80 (colored) to selected 1.36 (colored)

check sysctl error return on both calls.
this prevents sysctl from coredumping if the second call fails while the
first succeeds.  This isn't supposed to happen, but there is another bug
in the i386 kernel implementation of sysctl machdep.diskinfo that excites this

Revision 1.80 / (download) - annotate - [select for diffs], Wed May 19 07:36:14 2004 UTC (19 years, 10 months ago) by dyoung
Branch: MAIN
Changes since 1.79: +4 -4 lines
Diff to previous 1.79 (colored) to selected 1.36 (colored)

Insert missing space so fdisk prints "primary partition table
invalid, no magic in sector 0", not "primarypartition ...".

Revision 1.79 / (download) - annotate - [select for diffs], Mon May 10 20:32:07 2004 UTC (19 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.78: +5 -5 lines
Diff to previous 1.78 (colored) to selected 1.36 (colored)

Use the disk size from the device driver, not the bios when checking
whether partitions are valid.
Stops problems with broken BIOS, fixes PR bin/25491

Revision 1.78 / (download) - annotate - [select for diffs], Sat May 8 20:52:59 2004 UTC (19 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.77: +3 -3 lines
Diff to previous 1.77 (colored) to selected 1.36 (colored)

Don't output the 'Installed bootfile doesn't support required options'
message when we are updating the mbr code because the user did fdisk -i ...

Revision 1.77 / (download) - annotate - [select for diffs], Wed Mar 24 02:49:37 2004 UTC (20 years ago) by lukem
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.76: +5 -3 lines
Diff to previous 1.76 (colored) to selected 1.36 (colored)

Only examine mbr_bootsel* #ifdef BOOTSEL.
Noted on current-users@ by Markus Hennecke.

Revision 1.76 / (download) - annotate - [select for diffs], Mon Mar 22 07:11:00 2004 UTC (20 years ago) by lukem
Branch: MAIN
Changes since 1.75: +60 -45 lines
Diff to previous 1.75 (colored) to selected 1.36 (colored)

Move mbr_bootsel from offset 404 to offset 400 in struct mbr_sector to
leave 4 bytes for the Windows NT Drive Serial Number (DSN) at 440-443
(as mbr_sector.mbr_dsn).

Ensure that all the MBR & PBR code reserves space for mbr_sector.mbr_dsn.

Leave the bootsel magic number at 444-445 as mbr_sector.mbr_bootsel_magic
(instead of mbr_sector.mbr_bootsel.mbrbs_magic), but use 0xb5e1 (MBR_BS_MAGIC)
instead of 0xaa55 (MBR_MAGIC) to indicate that this change has occurred.

Rework MBR_BS_NEWMBR to mean "mbr_bootsel has moved to 400".

Modify fdisk(8) to automatically relocate the mbr_bootsel from 404 to 400
if mbr_bootsel_magic is the old value (0xaa55), and unset MBR_BS_NEWMBR
to flag that new mbr_bootsel code must be used if updating the MBR.


These changes fixes a problem where Windows 2000 or Windows XP would corrupt
the last 3 bytes + NUL of MBR partition 3's bootsel name if the bootsel name
was 5 characters long, replacing bytes 6-9 with the DSN.
Also, by explicitly reserving the space for the DSN we prevent problems in the
future if non bootsel MBR or PBR code had other information at bytes 440-443.

Revision 1.75 / (download) - annotate - [select for diffs], Fri Mar 19 18:19:17 2004 UTC (20 years ago) by dyoung
Branch: MAIN
Changes since 1.74: +63 -16 lines
Diff to previous 1.74 (colored) to selected 1.36 (colored)

Add flag -F, options -t disktab and -T disktype to fdisk. Flag -F
indicates that the target of the fdisk operation is a file, not a
disk. With -t and -T, the user tells fdisk the geometry for the
file If the default geometry that fdisk will "fake up" for a file
are not satisfactory, the user may tell the geometry to fdisk using
-t disktab -T disktype.

Revision 1.74 / (download) - annotate - [select for diffs], Mon Jan 5 23:23:32 2004 UTC (20 years, 2 months ago) by jmmv
Branch: MAIN
Changes since 1.73: +3 -3 lines
Diff to previous 1.73 (colored) to selected 1.36 (colored)

Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.

Revision 1.73 / (download) - annotate - [select for diffs], Fri Nov 21 21:47:42 2003 UTC (20 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.72: +3 -2 lines
Diff to previous 1.72 (colored) to selected 1.36 (colored)

Add "DISK" to -S output.

Revision 1.72 / (download) - annotate - [select for diffs], Sat Oct 11 04:50:49 2003 UTC (20 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.71: +4 -3 lines
Diff to previous 1.71 (colored) to selected 1.36 (colored)

unconditionally #define DEFAULT_BOOTDIR.  should fix non-x86 builds

Revision 1.71 / (download) - annotate - [select for diffs], Wed Oct 8 04:25:44 2003 UTC (20 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.70: +185 -172 lines
Diff to previous 1.70 (colored) to selected 1.36 (colored)

Overhaul MBR handling (part 1):

<sys/bootblock.h>:
    *	Added definitions for the Master Boot Record (MBR) used by
	a variety of systems (primarily i386), including the format
	of the BIOS Parameter Block (BPB).
	This information was cribbed from a variety of sources
	including <sys/disklabel_mbr.h> which this is a superset of.

	As part of this, some data structure elements and #defines
	were renamed to be more "namespace friendly" and consistent
	with other bootblocks and MBR documentation.
	Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
    *	Deprecated in favor of <sys/bootblock.h> (the latter is more
	"host tool" friendly).

amd64 & i386:
    *	Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
	be consistent with the naming convention of the msdosfs tools.

    *	Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
	and it's confusing to have two functionally equivalent bootblocks,
	especially given that "ufs" has multiple meanings (it could be
	a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

    *	Rework pbr.S (the first sector of bootxx_*):
	    +	Ensure that BPB (bytes 11..89) and the partition table
		(bytes 446..509) do not contain code.
	    +	Add support for booting from FAT partitions if BOOT_FROM_FAT
		is defined.  (Only set for bootxx_msdos).
	    +	Remove "dummy" partition 3; if people want to installboot(8)
		these to the start of the disk they can use fdisk(8) to
		create a real MBR partition table...
	    +	Compile with TERSE_ERROR so it fits because of the above.
		Whilst this is less user friendly, I feel it's important
		to have a valid partition table and BPB in the MBR/PBR.

    *	Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
	with other platforms.

    *	Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
    	we can boot off FAT partitions.

    *	Crank version of /usr/mdec/boot to 3.1, and fix some of the other
	entries in the version file.

installboot(8) (i386):
    *	Read the existing MBR of the filesystem and retain the BIOS
    	Parameter Block (BPB) in bytes 11..89 and the MBR partition
	table in bytes 446..509.  (Previously installboot(8) would
	trash those two sections of the MBR.)

mbrlabel(8):
    *	Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
	to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).

Revision 1.70 / (download) - annotate - [select for diffs], Fri Sep 19 08:41:28 2003 UTC (20 years, 6 months ago) by itojun
Branch: MAIN
Changes since 1.69: +11 -5 lines
Diff to previous 1.69 (colored) to selected 1.36 (colored)

realloc pedant

Revision 1.69 / (download) - annotate - [select for diffs], Fri Aug 29 16:31:30 2003 UTC (20 years, 7 months ago) by dsl
Branch: MAIN
Changes since 1.68: +22 -21 lines
Diff to previous 1.68 (colored) to selected 1.36 (colored)

Define and use PRIdaddr for printing disk block numbers.
Should fix bin/22638 for compilation on amd64.

Revision 1.68 / (download) - annotate - [select for diffs], Sun Aug 10 10:20:08 2003 UTC (20 years, 7 months ago) by dsl
Branch: MAIN
Changes since 1.67: +4 -8 lines
Diff to previous 1.67 (colored) to selected 1.36 (colored)

Put cylinder number 1023 into the mbr for sectors beyond the CHS limit
(rather than encoding the highest CHS addressable sector).

Revision 1.67 / (download) - annotate - [select for diffs], Mon Jul 14 09:32:12 2003 UTC (20 years, 8 months ago) by dsl
Branch: MAIN
Changes since 1.66: +10 -6 lines
Diff to previous 1.66 (colored) to selected 1.36 (colored)

Fix code that detects bios geometry from mbr table.

Revision 1.66 / (download) - annotate - [select for diffs], Mon Jul 7 11:45:00 2003 UTC (20 years, 8 months ago) by dsl
Branch: MAIN
Changes since 1.65: +4 -4 lines
Diff to previous 1.65 (colored) to selected 1.36 (colored)

Only look at each pair of CHS values once when trying to guess geometry.

Revision 1.52.2.3 / (download) - annotate - [select for diffs], Mon Jun 2 15:13:23 2003 UTC (20 years, 10 months ago) by tron
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002
Changes since 1.52.2.2: +3 -3 lines
Diff to previous 1.52.2.2 (colored) to branchpoint 1.52 (colored) next main 1.53 (colored) to selected 1.36 (colored)

Pull up revision 1.56 (requested by jdarrow in ticket #1206):
Make the -l flage more useful, by actually printing the systype number
alongside the sysid string (instead of just the array index of the
struct part_type they are found in).
Now fdisk -l shows the familiar 169 for NetBSD, 165 for FreeBSD or
386BSD or old NetBSD, and other possibly-familiar (131 for Linux native,
015 for Ext. Partition - LBA) values in with their correct numbers.

Revision 1.52.2.2 / (download) - annotate - [select for diffs], Mon Jun 2 15:11:30 2003 UTC (20 years, 10 months ago) by tron
Branch: netbsd-1-6
Changes since 1.52.2.1: +1 -0 lines
Diff to previous 1.52.2.1 (colored) to branchpoint 1.52 (colored) to selected 1.36 (colored)

Pull up revision 1.55 (requested by jdarrow in ticket #1205):
add partition type 0xaf for Apple HFS.

Revision 1.65 / (download) - annotate - [select for diffs], Sat May 17 23:14:42 2003 UTC (20 years, 10 months ago) by itojun
Branch: MAIN
Changes since 1.64: +6 -9 lines
Diff to previous 1.64 (colored) to selected 1.36 (colored)

asprintf is easier

Revision 1.64 / (download) - annotate - [select for diffs], Wed May 14 11:24:05 2003 UTC (20 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.63: +2 -4 lines
Diff to previous 1.63 (colored) to selected 1.36 (colored)

delete a diagnostic printf that was accidentally left in

Revision 1.63 / (download) - annotate - [select for diffs], Thu May 1 09:23:30 2003 UTC (20 years, 11 months ago) by bjh21
Branch: MAIN
Changes since 1.62: +4 -2 lines
Diff to previous 1.62 (colored) to selected 1.36 (colored)

Remove some unused variabled from get_params_to_use() in the !i386 && !amd64
case.

Revision 1.62 / (download) - annotate - [select for diffs], Wed Apr 30 19:47:10 2003 UTC (20 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.61: +1626 -575 lines
Diff to previous 1.61 (colored) to selected 1.36 (colored)

Rototilled fdisk that supports:
- editing of the extended partition list
- user friendly default start/size for new partitions
- partition start/size input in sectors, cylinders or MB
- bootsel menu names configured with paritition bounds
- partition update loop asks used which partition to change
  (instead of asking about each partition in turn).
- detection (and erroring) of overlapped partitions.
- automatic installation of correct mbr_xxx code (after prompting user)

Revision 1.61 / (download) - annotate - [select for diffs], Wed Apr 30 10:29:52 2003 UTC (20 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.60: +50 -77 lines
Diff to previous 1.60 (colored) to selected 1.36 (colored)

Move some definitions from fdisk.c to disklabel_mbr.h so they don't have
to be duplicated elsewhere (eg in mbr.S).
Modify fdisk.c so that it builds with the new disklabel.h

Revision 1.60 / (download) - annotate - [select for diffs], Tue Apr 1 19:39:13 2003 UTC (21 years ago) by fvdl
Branch: MAIN
Changes since 1.59: +10 -6 lines
Diff to previous 1.59 (colored) to selected 1.36 (colored)

Fix range check for the default boot option case.

Revision 1.52.2.1 / (download) - annotate - [select for diffs], Sat Jan 11 23:25:58 2003 UTC (21 years, 2 months ago) by jmc
Branch: netbsd-1-6
CVS Tags: netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Changes since 1.52: +4 -4 lines
Diff to previous 1.52 (colored) to selected 1.36 (colored)

Pull up revisions 1.58-1.59 (requested by jmmv in ticket #1065)
 Print missing newline in two bootselector-related messages.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Jan 10 23:37:34 2003 UTC (21 years, 2 months ago) by jmmv
Branch: MAIN
Changes since 1.58: +4 -4 lines
Diff to previous 1.58 (colored) to selected 1.36 (colored)

Print missing newline in two bootselector-related messages. Approved by wiz.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Nov 30 13:47:19 2002 UTC (21 years, 4 months ago) by fvdl
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.57: +11 -11 lines
Diff to previous 1.57 (colored) to selected 1.36 (colored)

Enable bootselector code for x86_64.
XXX the ifdef-ed parts should be split off into a seperate file.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Nov 24 21:49:15 2002 UTC (21 years, 4 months ago) by fvdl
Branch: MAIN
Changes since 1.56: +3 -3 lines
Diff to previous 1.56 (colored) to selected 1.36 (colored)

Avoid format warning for off_t printf.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Oct 8 07:38:47 2002 UTC (21 years, 5 months ago) by jdarrow
Branch: MAIN
Changes since 1.55: +3 -3 lines
Diff to previous 1.55 (colored) to selected 1.36 (colored)

Make the -l flage more useful, by actually printing the systype number
alongside the sysid string (instead of just the array index of the
struct part_type they are found in).

Now fdisk -l shows the familiar 169 for NetBSD, 165 for FreeBSD or
386BSD or old NetBSD, and other possibly-familiar (131 for Linux native,
015 for Ext. Partition - LBA) values in with their correct numbers.

Revision 1.55 / (download) - annotate - [select for diffs], Fri Sep 27 23:19:56 2002 UTC (21 years, 6 months ago) by dbj
Branch: MAIN
Changes since 1.54: +3 -2 lines
Diff to previous 1.54 (colored) to selected 1.36 (colored)

add partition type 0xaf for Apple HFS.

Revision 1.54 / (download) - annotate - [select for diffs], Thu Aug 8 13:19:18 2002 UTC (21 years, 7 months ago) by soren
Branch: MAIN
Changes since 1.53: +4 -4 lines
Diff to previous 1.53 (colored) to selected 1.36 (colored)

Clean up printf->err conversions.

Revision 1.53 / (download) - annotate - [select for diffs], Wed Jun 5 12:19:23 2002 UTC (21 years, 9 months ago) by yamt
Branch: MAIN
Changes since 1.52: +8 -4 lines
Diff to previous 1.52 (colored) to selected 1.36 (colored)

exit on EOF from stdin.

Revision 1.52 / (download) - annotate - [select for diffs], Wed Apr 3 03:17:36 2002 UTC (22 years ago) by thorpej
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1
Branch point for: netbsd-1-6
Changes since 1.51: +6 -4 lines
Diff to previous 1.51 (colored) to selected 1.36 (colored)

Build fdisk(8) on netwinder.

Revision 1.51 / (download) - annotate - [select for diffs], Tue Mar 26 23:56:45 2002 UTC (22 years ago) by christos
Branch: MAIN
Changes since 1.50: +3 -3 lines
Diff to previous 1.50 (colored) to selected 1.36 (colored)

nicer printing.

Revision 1.50 / (download) - annotate - [select for diffs], Tue Mar 26 23:56:05 2002 UTC (22 years ago) by christos
Branch: MAIN
Changes since 1.49: +38 -38 lines
Diff to previous 1.49 (colored) to selected 1.36 (colored)

PR/16073: Jachym _Freza_ Holecek: Add the ability to list known partition types.
While I am here, KNF a bit.

Revision 1.49 / (download) - annotate - [select for diffs], Mon Mar 4 04:22:22 2002 UTC (22 years, 1 month ago) by dbj
Branch: MAIN
Changes since 1.48: +4 -2 lines
Diff to previous 1.48 (colored) to selected 1.36 (colored)

add "Apple UFS" and "Apple Boot" partition ids used by Darwin

Revision 1.41.2.1 / (download) - annotate - [select for diffs], Thu Feb 14 19:59:55 2002 UTC (22 years, 1 month ago) by he
Branch: netbsd-1-5
CVS Tags: netbsd-1-5-PATCH003
Changes since 1.41: +8 -5 lines
Diff to previous 1.41 (colored) next main 1.42 (colored) to selected 1.36 (colored)

Pull up revision 1.42 (requested by itojun):
  When fetching the disk's hardware geometry, first attempt the
  DIOCGDEFLABEL ioctl, then fall back to the DIOCGDINFO ioctl.
  This ensures that we will get the actual hardware geometry info
  rather than any bogus info which might have been previously
  written to the disk's label area.

Revision 1.48 / (download) - annotate - [select for diffs], Wed Nov 7 14:50:32 2001 UTC (22 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.47: +13 -6 lines
Diff to previous 1.47 (colored) to selected 1.36 (colored)

if sysctl kern.root_device is availalbe, use that the default device
(rather than /dev/rwd0d).  display the disk device used when printing
the partition table.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Nov 1 07:04:18 2001 UTC (22 years, 5 months ago) by lukem
Branch: MAIN
Changes since 1.46: +6 -14 lines
Diff to previous 1.46 (colored) to selected 1.36 (colored)

opendisk(3) checks the device type for us

Revision 1.46 / (download) - annotate - [select for diffs], Mon Apr 16 10:47:15 2001 UTC (22 years, 11 months ago) by lukem
Branch: MAIN
Changes since 1.45: +14 -7 lines
Diff to previous 1.45 (colored) to selected 1.36 (colored)

add fix by Minoura Makoto to correctly support recursive extended partitions.
the offset of an extended sub-partition is the offset of the top-level
extended partition, not the partition before it (this is annoying, and
makes `clean' recursive mbr descent difficult).  fixes PRs 11829 and 12677.

Revision 1.45 / (download) - annotate - [select for diffs], Sun Dec 24 13:32:41 2000 UTC (23 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.44: +3 -4 lines
Diff to previous 1.44 (colored) to selected 1.36 (colored)

use MBR_IS_EXTENDED() instead of local test (which was missing a test case)

Revision 1.44 / (download) - annotate - [select for diffs], Tue Dec 19 16:01:28 2000 UTC (23 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.43: +80 -46 lines
Diff to previous 1.43 (colored) to selected 1.36 (colored)

* Recursively print out extended partition entries.  An extended partition is
  effectively an MBR with it's own partition table which contains another
  4 `slots', each of which can be another extended partition...
  This involved reworking some of the internal functions.
* Use off_t appropriately (so we can manipulate sectors past 4GB).
* Tweak to compile with WARNS=2

Revision 1.43 / (download) - annotate - [select for diffs], Tue Dec 19 15:44:27 2000 UTC (23 years, 3 months ago) by lukem
Branch: MAIN
Changes since 1.42: +77 -106 lines
Diff to previous 1.42 (colored) to selected 1.36 (colored)

convert to ANSI KNF

Revision 1.42 / (download) - annotate - [select for diffs], Thu Jul 6 17:22:43 2000 UTC (23 years, 8 months ago) by thorpej
Branch: MAIN
Changes since 1.41: +8 -5 lines
Diff to previous 1.41 (colored) to selected 1.36 (colored)

When fetching the disk's hardware geometry, first attempt the
DIOCGDEFLABEL ioctl, then fall back onto the DIOCGDINFO ioctl
if that fails.  This ensures that we will get the actual hardware
geometry info rather than any bogus info that might have been
previously written to the disk's label area.

Revision 1.39.2.1 / (download) - annotate - [select for diffs], Thu Jun 22 16:05:23 2000 UTC (23 years, 9 months ago) by minoura
Branch: minoura-xpg4dl
Changes since 1.39: +10 -7 lines
Diff to previous 1.39 (colored) next main 1.40 (colored) to selected 1.36 (colored)

Sync w/ netbsd-1-5-base.

Revision 1.41 / (download) - annotate - [select for diffs], Wed Jun 14 19:35:50 2000 UTC (23 years, 9 months ago) by wiz
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2
Branch point for: netbsd-1-5
Changes since 1.40: +5 -5 lines
Diff to previous 1.40 (colored) to selected 1.36 (colored)

Fix QNX partition IDs, confirmed by looking at FreeBSD's fdisk.
Note: 77 == 0x4d

Revision 1.33.2.4 / (download) - annotate - [select for diffs], Thu Jun 1 17:36:12 2000 UTC (23 years, 10 months ago) by he
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH003
Changes since 1.33.2.3: +7 -4 lines
Diff to previous 1.33.2.3 (colored) to branchpoint 1.33 (colored) next main 1.34 (colored) to selected 1.36 (colored)

Pull up revision 1.40 (requested by fvdl):
  Fix a booting problem when int13 extensions are used (> 8GB),
  and CHS values in MBRs were written from sysinst or fdisk that
  some BIOSes (Adaptec SCSI BIOS 2.20 in particular) didn't like.

Revision 1.40 / (download) - annotate - [select for diffs], Sat May 27 19:02:54 2000 UTC (23 years, 10 months ago) by fvdl
Branch: MAIN
Changes since 1.39: +7 -4 lines
Diff to previous 1.39 (colored) to selected 1.36 (colored)

Truncate the CHS values correctly in case a partition boundary exceeds
their range.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Jan 31 15:54:48 2000 UTC (24 years, 2 months ago) by soda
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.38: +7 -3 lines
Diff to previous 1.38 (colored) to selected 1.36 (colored)

Build fdisk also on arc

Revision 1.38 / (download) - annotate - [select for diffs], Mon Sep 6 23:58:59 1999 UTC (24 years, 6 months ago) by soren
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, comdex-fall-1999-base, comdex-fall-1999
Changes since 1.37: +20 -13 lines
Diff to previous 1.37 (colored) to selected 1.36 (colored)

Update usage().
Prevent buffer overflows when configuring boot selector.
Cycle through partitions when entering boot names.
Use '<UNUSED>' consistently.

Reviewed by: fvdl

Revision 1.33.2.3 / (download) - annotate - [select for diffs], Tue Jun 22 14:26:32 1999 UTC (24 years, 9 months ago) by perry
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-PATCH002, netbsd-1-4-PATCH001
Changes since 1.33.2.2: +6 -3 lines
Diff to previous 1.33.2.2 (colored) to branchpoint 1.33 (colored) to selected 1.36 (colored)

pullup 1.36->1.37 (thorpej): update boot selector only if it needs updating

Revision 1.37 / (download) - annotate - [select for diffs], Fri Jun 4 18:59:15 1999 UTC (24 years, 10 months ago) by thorpej
Branch: MAIN
Changes since 1.36: +6 -3 lines
Diff to previous 1.36 (colored)

Make sure the boot selector actually gets updated if you only change
the timeout and/or the default menu choice.

Revision 1.33.2.2 / (download) - annotate - [select for diffs], Sun May 2 21:27:49 1999 UTC (24 years, 11 months ago) by perry
Branch: netbsd-1-4
CVS Tags: netbsd-1-4-RELEASE
Changes since 1.33.2.1: +12 -2 lines
Diff to previous 1.33.2.1 (colored) to branchpoint 1.33 (colored) to selected 1.36 (colored)

pullup 1.34->1.36 (fvdl)

Revision 1.36 / (download) - annotate - [selected], Sun May 2 12:17:48 1999 UTC (24 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.35: +4 -4 lines
Diff to previous 1.35 (colored)

Make check if we need int13 extensions for the bootselector more correct.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Apr 28 23:27:01 1999 UTC (24 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.34: +12 -2 lines
Diff to previous 1.34 (colored) to selected 1.36 (colored)

Only use int13 extensions if the sectors can not be read through the
older CHS interface. This works around stupid BIOSs who report that
int13 extensions are present and functional, but fail when you actually
use them. Like Adaptec SCSI BIOSs.

For the bootselector, there was no space to get the CHS info from
the BIOS. Instead, use a flag that can be set by fdisk. fdisk will
set it if one of the partitions on the disk is out of CHS reach
for this disk/BIOS, so that the bootselector will use int13 extensions.
This isn't so bad, because it needs to be configured via fdisk anyway.

Change the mbr manualpage to reflect some shorter error messages.

Revision 1.33.2.1 / (download) - annotate - [select for diffs], Sun Apr 18 00:18:49 1999 UTC (24 years, 11 months ago) by fvdl
Branch: netbsd-1-4
Changes since 1.33: +351 -42 lines
Diff to previous 1.33 (colored) to selected 1.36 (colored)

Pull up bootselector mods, as approved by releng.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Apr 17 01:38:00 1999 UTC (24 years, 11 months ago) by fvdl
Branch: MAIN
Changes since 1.33: +351 -42 lines
Diff to previous 1.33 (colored) to selected 1.36 (colored)

Make the bootselector configurable by fdisk. Add a -B flag to this
effect (i386 only of course). Also change one branch in the
bootselector code to an explicit 16 bit one, and check both
the boot menu and partition tables to see if the partition
requested by the user should be booted. This check just in case,
should the bootselector menu and partition table get out of sync
somehow. (mmm, bytesqueezing)

Revision 1.33 / (download) - annotate - [select for diffs], Tue Feb 9 19:11:46 1999 UTC (25 years, 1 month ago) by perry
Branch: MAIN
CVS Tags: netbsd-1-4-base
Branch point for: netbsd-1-4
Changes since 1.32: +3 -2 lines
Diff to previous 1.32 (colored) to selected 1.36 (colored)

add BeOS entry, from URA Hiroshi, PR 6974

Revision 1.32 / (download) - annotate - [select for diffs], Wed Jan 27 21:41:31 1999 UTC (25 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.31: +93 -93 lines
Diff to previous 1.31 (colored) to selected 1.36 (colored)

Use <sys/disklabel_mbr.h>.

Revision 1.21.2.4 / (download) - annotate - [select for diffs], Mon Nov 16 06:56:39 1998 UTC (25 years, 4 months ago) by cgd
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003
Changes since 1.21.2.3: +62 -21 lines
Diff to previous 1.21.2.3 (colored) to branchpoint 1.21 (colored) next main 1.22 (colored) to selected 1.36 (colored)

pull up rev 1.25 from trunk (jonathan)

Revision 1.31 / (download) - annotate - [select for diffs], Sun Nov 8 00:29:08 1998 UTC (25 years, 4 months ago) by jonathan
Branch: MAIN
Changes since 1.30: +5 -5 lines
Diff to previous 1.30 (colored) to selected 1.36 (colored)

Set otherwise-unused global variable `disksectors' to disklabel.d_secperunit.
Change   fdisk -S to  emit disksectors as DLSIZE (for benefit of sysinst.)

Revision 1.30 / (download) - annotate - [select for diffs], Thu Oct 15 15:23:23 1998 UTC (25 years, 5 months ago) by ws
Branch: MAIN
Changes since 1.29: +56 -39 lines
Diff to previous 1.29 (colored) to selected 1.36 (colored)

Separate master bootcode from fdisk.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Oct 2 17:23:22 1998 UTC (25 years, 6 months ago) by ws
Branch: MAIN
Changes since 1.28: +29 -17 lines
Diff to previous 1.28 (colored) to selected 1.36 (colored)

Completely zero out a partition table entry,
if type, start and size are given as zero.

Revision 1.28 / (download) - annotate - [select for diffs], Mon Sep 28 15:44:18 1998 UTC (25 years, 6 months ago) by ws
Branch: MAIN
Changes since 1.27: +37 -28 lines
Diff to previous 1.27 (colored) to selected 1.36 (colored)

Automagically initialize boot code and partition table if not yet valid.
Don't touch the partition table on -i, if previously valid.

Revision 1.27 / (download) - annotate - [select for diffs], Mon Aug 10 18:46:29 1998 UTC (25 years, 7 months ago) by rvb
Branch: MAIN
Changes since 1.26: +4 -2 lines
Diff to previous 1.26 (colored) to selected 1.36 (colored)

Dont report more than 1023 cylinders for DOS/BIOS because
the code below will truncate to a 10 bit field.  This
can cause major problems later for DOS.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Feb 25 14:19:12 1998 UTC (26 years, 1 month ago) by drochner
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored) to selected 1.36 (colored)

Use the new NetBSD partition ID for first time setup of an MBR.

Revision 1.21.2.3 / (download) - annotate - [select for diffs], Tue Feb 24 05:46:22 1998 UTC (26 years, 1 month ago) by mellon
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-PATCH002, netbsd-1-3-PATCH001
Changes since 1.21.2.2: +3 -3 lines
Diff to previous 1.21.2.2 (colored) to branchpoint 1.21 (colored) to selected 1.36 (colored)

Pull up 1.24 (ghudson)

Revision 1.25 / (download) - annotate - [select for diffs], Thu Feb 19 14:47:43 1998 UTC (26 years, 1 month ago) by drochner
Branch: MAIN
Changes since 1.24: +62 -21 lines
Diff to previous 1.24 (colored) to selected 1.36 (colored)

Add new NetBSD partition ID.
Update information about partition types - add missing types, insert
"reserved" for IDs which are marked as "officially reserved" in other
lists.
Sources of information:
-"How it Works -- Partition Tables" by Hale Landis <hlandis@ibm.net>
-Ralph Brown's interrupt list

Revision 1.24 / (download) - annotate - [select for diffs], Sat Feb 7 16:19:16 1998 UTC (26 years, 1 month ago) by ghudson
Branch: MAIN
Changes since 1.23: +3 -3 lines
Diff to previous 1.23 (colored) to selected 1.36 (colored)

When estimating the number of cylinders in the BIOS geometry, use the
total number of sectors as reported by disklabel.d_secperunit rather
than multiplying out the disklabel geometry, which is less accurate.

Revision 1.21.2.2 / (download) - annotate - [select for diffs], Sat Feb 7 09:38:18 1998 UTC (26 years, 1 month ago) by mellon
Branch: netbsd-1-3
Changes since 1.21.2.1: +4 -3 lines
Diff to previous 1.21.2.1 (colored) to branchpoint 1.21 (colored) to selected 1.36 (colored)

Pull up 1.23 (mycroft)

Revision 1.23 / (download) - annotate - [select for diffs], Mon Feb 2 06:39:41 1998 UTC (26 years, 2 months ago) by mikel
Branch: MAIN
Changes since 1.22: +4 -3 lines
Diff to previous 1.22 (colored) to selected 1.36 (colored)

Don't print "DOS partition initialized" if -S set; from Nathan
  Williams in PR bin/4893.

Revision 1.21.2.1 / (download) - annotate - [select for diffs], Mon Dec 22 02:50:18 1997 UTC (26 years, 3 months ago) by perry
Branch: netbsd-1-3
CVS Tags: netbsd-1-3-RELEASE
Changes since 1.21: +4 -4 lines
Diff to previous 1.21 (colored) to selected 1.36 (colored)

pullup from trunk to fix coredump (enami)

Revision 1.22 / (download) - annotate - [select for diffs], Mon Dec 22 01:54:07 1997 UTC (26 years, 3 months ago) by enami
Branch: MAIN
Changes since 1.21: +4 -4 lines
Diff to previous 1.21 (colored) to selected 1.36 (colored)

Add missing cast.  This is a minimum fix to avoid overflow which causes
core dumps with some disk geometry.

Revision 1.21 / (download) - annotate - [select for diffs], Tue Sep 30 17:29:40 1997 UTC (26 years, 6 months ago) by phil
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-BETA
Branch point for: netbsd-1-3
Changes since 1.20: +2 -4 lines
Diff to previous 1.20 (colored) to selected 1.36 (colored)

Backout the prototype of opendisk().

Revision 1.20 / (download) - annotate - [select for diffs], Tue Sep 30 17:09:13 1997 UTC (26 years, 6 months ago) by phil
Branch: MAIN
Changes since 1.19: +4 -2 lines
Diff to previous 1.19 (colored) to selected 1.36 (colored)

Prototype opendisk().

Revision 1.19 / (download) - annotate - [select for diffs], Thu Sep 25 05:08:30 1997 UTC (26 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.18: +5 -17 lines
Diff to previous 1.18 (colored) to selected 1.36 (colored)

switch to using opendisk(3) from libutil

Revision 1.18 / (download) - annotate - [select for diffs], Sun Sep 14 13:52:27 1997 UTC (26 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.17: +26 -6 lines
Diff to previous 1.17 (colored) to selected 1.36 (colored)

* support ``short'' names of disks (e.g, ``sd0'') instead of requiring
  the full name (e.g, ``/dev/rsd0d'') a la disklabel(8) (where the code
  was effectively lifted from ;-)
* prefix hexadecimal numbers in output with '0x'

Revision 1.17 / (download) - annotate - [select for diffs], Thu Sep 11 22:53:00 1997 UTC (26 years, 6 months ago) by phil
Branch: MAIN
Changes since 1.16: +4 -4 lines
Diff to previous 1.16 (colored) to selected 1.36 (colored)

Don't print some things if -f flag given.

Revision 1.16 / (download) - annotate - [select for diffs], Fri Sep 5 21:27:00 1997 UTC (26 years, 6 months ago) by phil
Branch: MAIN
Changes since 1.15: +48 -23 lines
Diff to previous 1.15 (colored) to selected 1.36 (colored)

-- add -b flag for setting fdisk's idea of BIOS geometry from command line
-- cleanup so WARNS=1 works
-- man page updated to reality.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Aug 11 23:31:42 1997 UTC (26 years, 7 months ago) by phil
Branch: MAIN
Changes since 1.14: +120 -57 lines
Diff to previous 1.14 (colored) to selected 1.36 (colored)

Upgrade for non-interactive use.  Interactive use is nearly unchanged.
-i no longer implies -u, -i now does not use the entire first track
because some BIOSes refuse to boot from a partition in the first track.
-s renamed to -S, new -s for non-interactive setting of a partition's
id, offset and size.  Updated documentation to match.

Revision 1.14 / (download) - annotate - [select for diffs], Tue Jul 29 08:31:31 1997 UTC (26 years, 8 months ago) by phil
Branch: MAIN
Changes since 1.13: +56 -9 lines
Diff to previous 1.13 (colored) to selected 1.36 (colored)

Add code for a -s flag where the output is a series of VAL=xyz lines
so /bin/sh can "eval `fdisk -s`" and get variables defined with the
fdisk information.

Revision 1.13 / (download) - annotate - [select for diffs], Tue Jun 24 06:38:50 1997 UTC (26 years, 9 months ago) by perry
Branch: MAIN
Changes since 1.12: +56 -23 lines
Diff to previous 1.12 (colored) to selected 1.36 (colored)

Add a whole lot of MBR partition types, derived from a couple of sources
including Linux.
Is there a master list of this somewhere?

Revision 1.12 / (download) - annotate - [select for diffs], Sat Mar 29 20:46:17 1997 UTC (27 years ago) by thorpej
Branch: MAIN
Changes since 1.11: +63 -19 lines
Diff to previous 1.11 (colored) to selected 1.36 (colored)

Make this work on big-endian systems, such as the PowerPC.  From
Wolfgang Solfrank <ws@tools.de>

Revision 1.11 / (download) - annotate - [select for diffs], Wed Oct 4 23:11:19 1995 UTC (28 years, 6 months ago) by ghudson
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-PATCH001, netbsd-1-2-BETA, netbsd-1-2, netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.10: +119 -5 lines
Diff to previous 1.10 (colored) to selected 1.36 (colored)

Add code to look at the existing partition entries to deduce the
translated geometry of the disk.  This code will only change the
disk geometry if it can find a geometry which is consistent with
all partition entries, so it's very conservative about choosing
a new disk geometry.  Under some circumstances, it will choose a
number of cylinders which is a little lower than it needs to be,
but this code is enough so that you can create new partitions
with the correct physical addresses.

The right solution to this problem is to have the boot loader
communicate the BIOS geometry of each disk to the kernel, in a
manner similar to the symbol table, and then provide a kernel
interface to get at that information.  I'm unfortunately not
really qualified to make such a change, and I want something
that works better than the status quo.

Revision 1.10 / (download) - annotate - [select for diffs], Sat Mar 18 14:55:36 1995 UTC (29 years ago) by cgd
Branch: MAIN
Changes since 1.9: +3 -1 lines
Diff to previous 1.9 (colored) to selected 1.36 (colored)

convert to new RCS Id conventions; reduce my headache

Revision 1.9 / (download) - annotate - [select for diffs], Fri Jan 13 10:42:02 1995 UTC (29 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.8: +4 -3 lines
Diff to previous 1.8 (colored) to selected 1.36 (colored)

Recognize Linux file systems correctly.

Revision 1.8 / (download) - annotate - [select for diffs], Mon Dec 5 20:15:41 1994 UTC (29 years, 4 months ago) by cgd
Branch: MAIN
Changes since 1.7: +5 -2 lines
Diff to previous 1.7 (colored) to selected 1.36 (colored)

more cleanups from Jim Jegers, passed over by me.

Revision 1.7 / (download) - annotate - [select for diffs], Thu Oct 20 00:06:17 1994 UTC (29 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.6: +14 -10 lines
Diff to previous 1.6 (colored) to selected 1.36 (colored)

Allow `partitioning' of a regaular file.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Sep 23 23:48:10 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored) to selected 1.36 (colored)

Remove some more uses of obsolete functions.

Revision 1.5 / (download) - annotate - [select for diffs], Fri Sep 23 05:30:10 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.4: +87 -175 lines
Diff to previous 1.4 (colored) to selected 1.36 (colored)

Clean up a bit more.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Sep 23 04:30:15 1994 UTC (29 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.3: +375 -329 lines
Diff to previous 1.3 (colored) to selected 1.36 (colored)

Clean this up a bit.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Dec 6 09:32:37 1993 UTC (30 years, 3 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.2: +2 -2 lines
Diff to previous 1.2 (colored) to selected 1.36 (colored)

386bsd -> NetBSD

Revision 1.2 / (download) - annotate - [select for diffs], Mon Aug 2 17:51:04 1993 UTC (30 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.1: +4 -0 lines
Diff to previous 1.1 (colored) to selected 1.36 (colored)

Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.

Revision 1.1 / (download) - annotate - [select for diffs], Fri Apr 9 19:24:03 1993 UTC (30 years, 11 months ago) by cgd
Branch: MAIN
CVS Tags: netbsd-alpha-1, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9, netbsd-0-8
Diff to selected 1.36 (colored)

added a 386bsd fdisk program, by julian elischer. (patch 111)

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>