History log of /openbsd-current/sbin/fdisk/user.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.25 25-Mar-2023 krw

Move LINEBUFSZ to be with its friends in misc.h.

Nuke unused HELPBUFSZ.

No functional change.


Revision tags: OPENBSD_7_2_BASE OPENBSD_7_3_BASE
# 1.24 25-Jul-2022 krw

Only MBR and GPT structures can be edited by fdisk.

If neither are found, restrict user actions to printing basic
information on the disk, reading the man page, initializing an
MBR or GPT, or terminating fdisk without changing anything.

Feedback on earlier attempt by miod@ and brynet@.


# 1.23 10-Jul-2022 krw

Use nice #define's for input buf size and output help buf size.

No functional change.


Revision tags: OPENBSD_7_1_BASE
# 1.22 25-Oct-2021 krw

Nuke a bunch of pointless #ifndef _<.h file>/#endif guards.


Revision tags: OPENBSD_7_0_BASE
# 1.21 24-Aug-2021 krw

A couple more Capt. Obvious comments can go.


# 1.20 12-Aug-2021 krw

Further reduce cross-file confusion by adding USER_help() and
calling it from Xhelp(). Move declaration of struct cmd to nestle
next to its only instantiation (cmd_table) and use nitems() when
scanning cmd_table.

No functional change.


# 1.19 13-Jul-2021 krw

Disk sector addresses are normally stored/provided in uint64_t
variables/parameters, not off_t.

Adjust various parameters and variables accordingly. A few missed const's
and verbiage tweaks in passing.

No functional change.


# 1.18 11-Jul-2021 krw

Add tabs to make struct definitions and function prototypes easier
to read.

No functional change.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.17 11-Dec-2015 krw

Add '-v' flag that forces the display of both GPT's and the MBR.
Useful for seeing exactly what is currently on the disk. Suggested
by a request from kettenis@.

Man page & usage ok jmc@


Revision tags: OPENBSD_5_8_BASE
# 1.16 18-Mar-2015 krw

Stop passing around little used 'struct mbr tt' parameter. Just
make the initial mbr that tt pointed at a global that can be directly
accessed in the couple of places it is needed.

Fewer parameters, less confusion, no functional change.


# 1.15 16-Mar-2015 krw

Stop passing around a pointer to the stack variable 'disk' in main().
There is only one disk being worked on, so just make it a global.

Fewer parameters, less confusion, no functional change.


# 1.14 16-Mar-2015 krw

Document that -i/-u are mutually exclusive and clean up the related
code a bit.

ok deraadt@ igor@ (with suggested tweak that is coming)


# 1.13 14-Mar-2015 krw

Whitespace & KNF tweaks. Change functions whose return values are
not checked to void. Use continue inside a do loop instead of a
goto to the top. Move a #define/#undef more local to use. Eliminate
some lint.

General cleanup of things noticed preparing the big churn.

No intentional functional change.


# 1.12 14-Mar-2015 krw

Switch all the license blocks to the standard OpenBSD/ISC license.

With the permission of Toby.

ok deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.11 09-Feb-2015 krw

Rename 'm_flag' to 'e_flag' since it's '-e' that sets it. Rename
'User_modify' to 'USER_edit' for the same reason.


Revision tags: OPENBSD_5_6_BASE
# 1.10 31-Mar-2014 krw

Whitespace rectification.


# 1.9 17-Mar-2014 krw

Nuke pointless blank lines, defines, comments and casts. Eliminate
#include in *.h files in favour of listing them as required in the *.c
files. Fix error message to correctly state that 64 is the minimum
value for -l. Use errx() where errno is not relevant. Use 'continue'
rather than a label to go back to start of a loop.

No intentional functional change.


# 1.8 07-Mar-2014 krw

Relieve the code of an overburden of unnecessary typedef
abstraction. Call a 'struct' a 'struct' and not a pony.

No functional change.

idea ok deraadt@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.7 03-Jun-2003 weingart

Nuke terms 3 & 4.


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.6 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


# 1.5 15-Dec-2001 kjell

Get this damn diff out of my tree. ok from weingart@, deraadt@ and others.
Add a -u flag to fdisk which updates MBR code, but leaves the partition
table intact. There are still issues with 'update' having different behavior,
but I'll resolve those shortly


Revision tags: OPENBSD_3_0_BASE
# 1.4 12-Aug-2001 heko

#(endif|else) foo is incorrect, make it #endif /* foo */
deraadt@ ok


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.3 21-Oct-1997 provos

make fdisk grok extended partitions again. we have to keep track of the
absolute offset of the current mbr and its relative position. because:
the starting sector of the first mbr entry in an extended partition is relative
to the starting offset of the whole mbr itself. the starting offset of a new
extended partition is relative to the offset of the very first extended
partition.


# 1.2 29-Sep-1997 mickey

ID in the first line w/ tabs


# 1.1 29-Sep-1997 weingart

New fdisk code with interactive (command line type)
editing code. Rewrite from the ground up, save about
20 lines of code. Seems to create valid partition
tables on i386 and alphas.


# 1.24 25-Jul-2022 krw

Only MBR and GPT structures can be edited by fdisk.

If neither are found, restrict user actions to printing basic
information on the disk, reading the man page, initializing an
MBR or GPT, or terminating fdisk without changing anything.

Feedback on earlier attempt by miod@ and brynet@.


# 1.23 10-Jul-2022 krw

Use nice #define's for input buf size and output help buf size.

No functional change.


Revision tags: OPENBSD_7_1_BASE
# 1.22 25-Oct-2021 krw

Nuke a bunch of pointless #ifndef _<.h file>/#endif guards.


Revision tags: OPENBSD_7_0_BASE
# 1.21 24-Aug-2021 krw

A couple more Capt. Obvious comments can go.


# 1.20 12-Aug-2021 krw

Further reduce cross-file confusion by adding USER_help() and
calling it from Xhelp(). Move declaration of struct cmd to nestle
next to its only instantiation (cmd_table) and use nitems() when
scanning cmd_table.

No functional change.


# 1.19 13-Jul-2021 krw

Disk sector addresses are normally stored/provided in uint64_t
variables/parameters, not off_t.

Adjust various parameters and variables accordingly. A few missed const's
and verbiage tweaks in passing.

No functional change.


# 1.18 11-Jul-2021 krw

Add tabs to make struct definitions and function prototypes easier
to read.

No functional change.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.17 11-Dec-2015 krw

Add '-v' flag that forces the display of both GPT's and the MBR.
Useful for seeing exactly what is currently on the disk. Suggested
by a request from kettenis@.

Man page & usage ok jmc@


Revision tags: OPENBSD_5_8_BASE
# 1.16 18-Mar-2015 krw

Stop passing around little used 'struct mbr tt' parameter. Just
make the initial mbr that tt pointed at a global that can be directly
accessed in the couple of places it is needed.

Fewer parameters, less confusion, no functional change.


# 1.15 16-Mar-2015 krw

Stop passing around a pointer to the stack variable 'disk' in main().
There is only one disk being worked on, so just make it a global.

Fewer parameters, less confusion, no functional change.


# 1.14 16-Mar-2015 krw

Document that -i/-u are mutually exclusive and clean up the related
code a bit.

ok deraadt@ igor@ (with suggested tweak that is coming)


# 1.13 14-Mar-2015 krw

Whitespace & KNF tweaks. Change functions whose return values are
not checked to void. Use continue inside a do loop instead of a
goto to the top. Move a #define/#undef more local to use. Eliminate
some lint.

General cleanup of things noticed preparing the big churn.

No intentional functional change.


# 1.12 14-Mar-2015 krw

Switch all the license blocks to the standard OpenBSD/ISC license.

With the permission of Toby.

ok deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.11 09-Feb-2015 krw

Rename 'm_flag' to 'e_flag' since it's '-e' that sets it. Rename
'User_modify' to 'USER_edit' for the same reason.


Revision tags: OPENBSD_5_6_BASE
# 1.10 31-Mar-2014 krw

Whitespace rectification.


# 1.9 17-Mar-2014 krw

Nuke pointless blank lines, defines, comments and casts. Eliminate
#include in *.h files in favour of listing them as required in the *.c
files. Fix error message to correctly state that 64 is the minimum
value for -l. Use errx() where errno is not relevant. Use 'continue'
rather than a label to go back to start of a loop.

No intentional functional change.


# 1.8 07-Mar-2014 krw

Relieve the code of an overburden of unnecessary typedef
abstraction. Call a 'struct' a 'struct' and not a pony.

No functional change.

idea ok deraadt@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.7 03-Jun-2003 weingart

Nuke terms 3 & 4.


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.6 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


# 1.5 15-Dec-2001 kjell

Get this damn diff out of my tree. ok from weingart@, deraadt@ and others.
Add a -u flag to fdisk which updates MBR code, but leaves the partition
table intact. There are still issues with 'update' having different behavior,
but I'll resolve those shortly


Revision tags: OPENBSD_3_0_BASE
# 1.4 12-Aug-2001 heko

#(endif|else) foo is incorrect, make it #endif /* foo */
deraadt@ ok


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.3 21-Oct-1997 provos

make fdisk grok extended partitions again. we have to keep track of the
absolute offset of the current mbr and its relative position. because:
the starting sector of the first mbr entry in an extended partition is relative
to the starting offset of the whole mbr itself. the starting offset of a new
extended partition is relative to the offset of the very first extended
partition.


# 1.2 29-Sep-1997 mickey

ID in the first line w/ tabs


# 1.1 29-Sep-1997 weingart

New fdisk code with interactive (command line type)
editing code. Rewrite from the ground up, save about
20 lines of code. Seems to create valid partition
tables on i386 and alphas.


# 1.23 10-Jul-2022 krw

Use nice #define's for input buf size and output help buf size.

No functional change.


Revision tags: OPENBSD_7_1_BASE
# 1.22 25-Oct-2021 krw

Nuke a bunch of pointless #ifndef _<.h file>/#endif guards.


Revision tags: OPENBSD_7_0_BASE
# 1.21 24-Aug-2021 krw

A couple more Capt. Obvious comments can go.


# 1.20 12-Aug-2021 krw

Further reduce cross-file confusion by adding USER_help() and
calling it from Xhelp(). Move declaration of struct cmd to nestle
next to its only instantiation (cmd_table) and use nitems() when
scanning cmd_table.

No functional change.


# 1.19 13-Jul-2021 krw

Disk sector addresses are normally stored/provided in uint64_t
variables/parameters, not off_t.

Adjust various parameters and variables accordingly. A few missed const's
and verbiage tweaks in passing.

No functional change.


# 1.18 11-Jul-2021 krw

Add tabs to make struct definitions and function prototypes easier
to read.

No functional change.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.17 11-Dec-2015 krw

Add '-v' flag that forces the display of both GPT's and the MBR.
Useful for seeing exactly what is currently on the disk. Suggested
by a request from kettenis@.

Man page & usage ok jmc@


Revision tags: OPENBSD_5_8_BASE
# 1.16 18-Mar-2015 krw

Stop passing around little used 'struct mbr tt' parameter. Just
make the initial mbr that tt pointed at a global that can be directly
accessed in the couple of places it is needed.

Fewer parameters, less confusion, no functional change.


# 1.15 16-Mar-2015 krw

Stop passing around a pointer to the stack variable 'disk' in main().
There is only one disk being worked on, so just make it a global.

Fewer parameters, less confusion, no functional change.


# 1.14 16-Mar-2015 krw

Document that -i/-u are mutually exclusive and clean up the related
code a bit.

ok deraadt@ igor@ (with suggested tweak that is coming)


# 1.13 14-Mar-2015 krw

Whitespace & KNF tweaks. Change functions whose return values are
not checked to void. Use continue inside a do loop instead of a
goto to the top. Move a #define/#undef more local to use. Eliminate
some lint.

General cleanup of things noticed preparing the big churn.

No intentional functional change.


# 1.12 14-Mar-2015 krw

Switch all the license blocks to the standard OpenBSD/ISC license.

With the permission of Toby.

ok deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.11 09-Feb-2015 krw

Rename 'm_flag' to 'e_flag' since it's '-e' that sets it. Rename
'User_modify' to 'USER_edit' for the same reason.


Revision tags: OPENBSD_5_6_BASE
# 1.10 31-Mar-2014 krw

Whitespace rectification.


# 1.9 17-Mar-2014 krw

Nuke pointless blank lines, defines, comments and casts. Eliminate
#include in *.h files in favour of listing them as required in the *.c
files. Fix error message to correctly state that 64 is the minimum
value for -l. Use errx() where errno is not relevant. Use 'continue'
rather than a label to go back to start of a loop.

No intentional functional change.


# 1.8 07-Mar-2014 krw

Relieve the code of an overburden of unnecessary typedef
abstraction. Call a 'struct' a 'struct' and not a pony.

No functional change.

idea ok deraadt@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.7 03-Jun-2003 weingart

Nuke terms 3 & 4.


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.6 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


# 1.5 15-Dec-2001 kjell

Get this damn diff out of my tree. ok from weingart@, deraadt@ and others.
Add a -u flag to fdisk which updates MBR code, but leaves the partition
table intact. There are still issues with 'update' having different behavior,
but I'll resolve those shortly


Revision tags: OPENBSD_3_0_BASE
# 1.4 12-Aug-2001 heko

#(endif|else) foo is incorrect, make it #endif /* foo */
deraadt@ ok


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.3 21-Oct-1997 provos

make fdisk grok extended partitions again. we have to keep track of the
absolute offset of the current mbr and its relative position. because:
the starting sector of the first mbr entry in an extended partition is relative
to the starting offset of the whole mbr itself. the starting offset of a new
extended partition is relative to the offset of the very first extended
partition.


# 1.2 29-Sep-1997 mickey

ID in the first line w/ tabs


# 1.1 29-Sep-1997 weingart

New fdisk code with interactive (command line type)
editing code. Rewrite from the ground up, save about
20 lines of code. Seems to create valid partition
tables on i386 and alphas.


# 1.22 25-Oct-2021 krw

Nuke a bunch of pointless #ifndef _<.h file>/#endif guards.


Revision tags: OPENBSD_7_0_BASE
# 1.21 24-Aug-2021 krw

A couple more Capt. Obvious comments can go.


# 1.20 12-Aug-2021 krw

Further reduce cross-file confusion by adding USER_help() and
calling it from Xhelp(). Move declaration of struct cmd to nestle
next to its only instantiation (cmd_table) and use nitems() when
scanning cmd_table.

No functional change.


# 1.19 13-Jul-2021 krw

Disk sector addresses are normally stored/provided in uint64_t
variables/parameters, not off_t.

Adjust various parameters and variables accordingly. A few missed const's
and verbiage tweaks in passing.

No functional change.


# 1.18 11-Jul-2021 krw

Add tabs to make struct definitions and function prototypes easier
to read.

No functional change.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.17 11-Dec-2015 krw

Add '-v' flag that forces the display of both GPT's and the MBR.
Useful for seeing exactly what is currently on the disk. Suggested
by a request from kettenis@.

Man page & usage ok jmc@


Revision tags: OPENBSD_5_8_BASE
# 1.16 18-Mar-2015 krw

Stop passing around little used 'struct mbr tt' parameter. Just
make the initial mbr that tt pointed at a global that can be directly
accessed in the couple of places it is needed.

Fewer parameters, less confusion, no functional change.


# 1.15 16-Mar-2015 krw

Stop passing around a pointer to the stack variable 'disk' in main().
There is only one disk being worked on, so just make it a global.

Fewer parameters, less confusion, no functional change.


# 1.14 16-Mar-2015 krw

Document that -i/-u are mutually exclusive and clean up the related
code a bit.

ok deraadt@ igor@ (with suggested tweak that is coming)


# 1.13 14-Mar-2015 krw

Whitespace & KNF tweaks. Change functions whose return values are
not checked to void. Use continue inside a do loop instead of a
goto to the top. Move a #define/#undef more local to use. Eliminate
some lint.

General cleanup of things noticed preparing the big churn.

No intentional functional change.


# 1.12 14-Mar-2015 krw

Switch all the license blocks to the standard OpenBSD/ISC license.

With the permission of Toby.

ok deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.11 09-Feb-2015 krw

Rename 'm_flag' to 'e_flag' since it's '-e' that sets it. Rename
'User_modify' to 'USER_edit' for the same reason.


Revision tags: OPENBSD_5_6_BASE
# 1.10 31-Mar-2014 krw

Whitespace rectification.


# 1.9 17-Mar-2014 krw

Nuke pointless blank lines, defines, comments and casts. Eliminate
#include in *.h files in favour of listing them as required in the *.c
files. Fix error message to correctly state that 64 is the minimum
value for -l. Use errx() where errno is not relevant. Use 'continue'
rather than a label to go back to start of a loop.

No intentional functional change.


# 1.8 07-Mar-2014 krw

Relieve the code of an overburden of unnecessary typedef
abstraction. Call a 'struct' a 'struct' and not a pony.

No functional change.

idea ok deraadt@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.7 03-Jun-2003 weingart

Nuke terms 3 & 4.


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.6 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


# 1.5 15-Dec-2001 kjell

Get this damn diff out of my tree. ok from weingart@, deraadt@ and others.
Add a -u flag to fdisk which updates MBR code, but leaves the partition
table intact. There are still issues with 'update' having different behavior,
but I'll resolve those shortly


Revision tags: OPENBSD_3_0_BASE
# 1.4 12-Aug-2001 heko

#(endif|else) foo is incorrect, make it #endif /* foo */
deraadt@ ok


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.3 21-Oct-1997 provos

make fdisk grok extended partitions again. we have to keep track of the
absolute offset of the current mbr and its relative position. because:
the starting sector of the first mbr entry in an extended partition is relative
to the starting offset of the whole mbr itself. the starting offset of a new
extended partition is relative to the offset of the very first extended
partition.


# 1.2 29-Sep-1997 mickey

ID in the first line w/ tabs


# 1.1 29-Sep-1997 weingart

New fdisk code with interactive (command line type)
editing code. Rewrite from the ground up, save about
20 lines of code. Seems to create valid partition
tables on i386 and alphas.


# 1.21 24-Aug-2021 krw

A couple more Capt. Obvious comments can go.


# 1.20 12-Aug-2021 krw

Further reduce cross-file confusion by adding USER_help() and
calling it from Xhelp(). Move declaration of struct cmd to nestle
next to its only instantiation (cmd_table) and use nitems() when
scanning cmd_table.

No functional change.


# 1.19 13-Jul-2021 krw

Disk sector addresses are normally stored/provided in uint64_t
variables/parameters, not off_t.

Adjust various parameters and variables accordingly. A few missed const's
and verbiage tweaks in passing.

No functional change.


# 1.18 11-Jul-2021 krw

Add tabs to make struct definitions and function prototypes easier
to read.

No functional change.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.17 11-Dec-2015 krw

Add '-v' flag that forces the display of both GPT's and the MBR.
Useful for seeing exactly what is currently on the disk. Suggested
by a request from kettenis@.

Man page & usage ok jmc@


Revision tags: OPENBSD_5_8_BASE
# 1.16 18-Mar-2015 krw

Stop passing around little used 'struct mbr tt' parameter. Just
make the initial mbr that tt pointed at a global that can be directly
accessed in the couple of places it is needed.

Fewer parameters, less confusion, no functional change.


# 1.15 16-Mar-2015 krw

Stop passing around a pointer to the stack variable 'disk' in main().
There is only one disk being worked on, so just make it a global.

Fewer parameters, less confusion, no functional change.


# 1.14 16-Mar-2015 krw

Document that -i/-u are mutually exclusive and clean up the related
code a bit.

ok deraadt@ igor@ (with suggested tweak that is coming)


# 1.13 14-Mar-2015 krw

Whitespace & KNF tweaks. Change functions whose return values are
not checked to void. Use continue inside a do loop instead of a
goto to the top. Move a #define/#undef more local to use. Eliminate
some lint.

General cleanup of things noticed preparing the big churn.

No intentional functional change.


# 1.12 14-Mar-2015 krw

Switch all the license blocks to the standard OpenBSD/ISC license.

With the permission of Toby.

ok deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.11 09-Feb-2015 krw

Rename 'm_flag' to 'e_flag' since it's '-e' that sets it. Rename
'User_modify' to 'USER_edit' for the same reason.


Revision tags: OPENBSD_5_6_BASE
# 1.10 31-Mar-2014 krw

Whitespace rectification.


# 1.9 17-Mar-2014 krw

Nuke pointless blank lines, defines, comments and casts. Eliminate
#include in *.h files in favour of listing them as required in the *.c
files. Fix error message to correctly state that 64 is the minimum
value for -l. Use errx() where errno is not relevant. Use 'continue'
rather than a label to go back to start of a loop.

No intentional functional change.


# 1.8 07-Mar-2014 krw

Relieve the code of an overburden of unnecessary typedef
abstraction. Call a 'struct' a 'struct' and not a pony.

No functional change.

idea ok deraadt@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.7 03-Jun-2003 weingart

Nuke terms 3 & 4.


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.6 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


# 1.5 15-Dec-2001 kjell

Get this damn diff out of my tree. ok from weingart@, deraadt@ and others.
Add a -u flag to fdisk which updates MBR code, but leaves the partition
table intact. There are still issues with 'update' having different behavior,
but I'll resolve those shortly


Revision tags: OPENBSD_3_0_BASE
# 1.4 12-Aug-2001 heko

#(endif|else) foo is incorrect, make it #endif /* foo */
deraadt@ ok


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.3 21-Oct-1997 provos

make fdisk grok extended partitions again. we have to keep track of the
absolute offset of the current mbr and its relative position. because:
the starting sector of the first mbr entry in an extended partition is relative
to the starting offset of the whole mbr itself. the starting offset of a new
extended partition is relative to the offset of the very first extended
partition.


# 1.2 29-Sep-1997 mickey

ID in the first line w/ tabs


# 1.1 29-Sep-1997 weingart

New fdisk code with interactive (command line type)
editing code. Rewrite from the ground up, save about
20 lines of code. Seems to create valid partition
tables on i386 and alphas.


# 1.20 12-Aug-2021 krw

Further reduce cross-file confusion by adding USER_help() and
calling it from Xhelp(). Move declaration of struct cmd to nestle
next to its only instantiation (cmd_table) and use nitems() when
scanning cmd_table.

No functional change.


# 1.19 13-Jul-2021 krw

Disk sector addresses are normally stored/provided in uint64_t
variables/parameters, not off_t.

Adjust various parameters and variables accordingly. A few missed const's
and verbiage tweaks in passing.

No functional change.


# 1.18 11-Jul-2021 krw

Add tabs to make struct definitions and function prototypes easier
to read.

No functional change.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.17 11-Dec-2015 krw

Add '-v' flag that forces the display of both GPT's and the MBR.
Useful for seeing exactly what is currently on the disk. Suggested
by a request from kettenis@.

Man page & usage ok jmc@


Revision tags: OPENBSD_5_8_BASE
# 1.16 18-Mar-2015 krw

Stop passing around little used 'struct mbr tt' parameter. Just
make the initial mbr that tt pointed at a global that can be directly
accessed in the couple of places it is needed.

Fewer parameters, less confusion, no functional change.


# 1.15 16-Mar-2015 krw

Stop passing around a pointer to the stack variable 'disk' in main().
There is only one disk being worked on, so just make it a global.

Fewer parameters, less confusion, no functional change.


# 1.14 16-Mar-2015 krw

Document that -i/-u are mutually exclusive and clean up the related
code a bit.

ok deraadt@ igor@ (with suggested tweak that is coming)


# 1.13 14-Mar-2015 krw

Whitespace & KNF tweaks. Change functions whose return values are
not checked to void. Use continue inside a do loop instead of a
goto to the top. Move a #define/#undef more local to use. Eliminate
some lint.

General cleanup of things noticed preparing the big churn.

No intentional functional change.


# 1.12 14-Mar-2015 krw

Switch all the license blocks to the standard OpenBSD/ISC license.

With the permission of Toby.

ok deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.11 09-Feb-2015 krw

Rename 'm_flag' to 'e_flag' since it's '-e' that sets it. Rename
'User_modify' to 'USER_edit' for the same reason.


Revision tags: OPENBSD_5_6_BASE
# 1.10 31-Mar-2014 krw

Whitespace rectification.


# 1.9 17-Mar-2014 krw

Nuke pointless blank lines, defines, comments and casts. Eliminate
#include in *.h files in favour of listing them as required in the *.c
files. Fix error message to correctly state that 64 is the minimum
value for -l. Use errx() where errno is not relevant. Use 'continue'
rather than a label to go back to start of a loop.

No intentional functional change.


# 1.8 07-Mar-2014 krw

Relieve the code of an overburden of unnecessary typedef
abstraction. Call a 'struct' a 'struct' and not a pony.

No functional change.

idea ok deraadt@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.7 03-Jun-2003 weingart

Nuke terms 3 & 4.


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.6 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


# 1.5 15-Dec-2001 kjell

Get this damn diff out of my tree. ok from weingart@, deraadt@ and others.
Add a -u flag to fdisk which updates MBR code, but leaves the partition
table intact. There are still issues with 'update' having different behavior,
but I'll resolve those shortly


Revision tags: OPENBSD_3_0_BASE
# 1.4 12-Aug-2001 heko

#(endif|else) foo is incorrect, make it #endif /* foo */
deraadt@ ok


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.3 21-Oct-1997 provos

make fdisk grok extended partitions again. we have to keep track of the
absolute offset of the current mbr and its relative position. because:
the starting sector of the first mbr entry in an extended partition is relative
to the starting offset of the whole mbr itself. the starting offset of a new
extended partition is relative to the offset of the very first extended
partition.


# 1.2 29-Sep-1997 mickey

ID in the first line w/ tabs


# 1.1 29-Sep-1997 weingart

New fdisk code with interactive (command line type)
editing code. Rewrite from the ground up, save about
20 lines of code. Seems to create valid partition
tables on i386 and alphas.


# 1.19 13-Jul-2021 krw

Disk sector addresses are normally stored/provided in uint64_t
variables/parameters, not off_t.

Adjust various parameters and variables accordingly. A few missed const's
and verbiage tweaks in passing.

No functional change.


# 1.18 11-Jul-2021 krw

Add tabs to make struct definitions and function prototypes easier
to read.

No functional change.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.17 11-Dec-2015 krw

Add '-v' flag that forces the display of both GPT's and the MBR.
Useful for seeing exactly what is currently on the disk. Suggested
by a request from kettenis@.

Man page & usage ok jmc@


Revision tags: OPENBSD_5_8_BASE
# 1.16 18-Mar-2015 krw

Stop passing around little used 'struct mbr tt' parameter. Just
make the initial mbr that tt pointed at a global that can be directly
accessed in the couple of places it is needed.

Fewer parameters, less confusion, no functional change.


# 1.15 16-Mar-2015 krw

Stop passing around a pointer to the stack variable 'disk' in main().
There is only one disk being worked on, so just make it a global.

Fewer parameters, less confusion, no functional change.


# 1.14 16-Mar-2015 krw

Document that -i/-u are mutually exclusive and clean up the related
code a bit.

ok deraadt@ igor@ (with suggested tweak that is coming)


# 1.13 14-Mar-2015 krw

Whitespace & KNF tweaks. Change functions whose return values are
not checked to void. Use continue inside a do loop instead of a
goto to the top. Move a #define/#undef more local to use. Eliminate
some lint.

General cleanup of things noticed preparing the big churn.

No intentional functional change.


# 1.12 14-Mar-2015 krw

Switch all the license blocks to the standard OpenBSD/ISC license.

With the permission of Toby.

ok deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.11 09-Feb-2015 krw

Rename 'm_flag' to 'e_flag' since it's '-e' that sets it. Rename
'User_modify' to 'USER_edit' for the same reason.


Revision tags: OPENBSD_5_6_BASE
# 1.10 31-Mar-2014 krw

Whitespace rectification.


# 1.9 17-Mar-2014 krw

Nuke pointless blank lines, defines, comments and casts. Eliminate
#include in *.h files in favour of listing them as required in the *.c
files. Fix error message to correctly state that 64 is the minimum
value for -l. Use errx() where errno is not relevant. Use 'continue'
rather than a label to go back to start of a loop.

No intentional functional change.


# 1.8 07-Mar-2014 krw

Relieve the code of an overburden of unnecessary typedef
abstraction. Call a 'struct' a 'struct' and not a pony.

No functional change.

idea ok deraadt@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.7 03-Jun-2003 weingart

Nuke terms 3 & 4.


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.6 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


# 1.5 15-Dec-2001 kjell

Get this damn diff out of my tree. ok from weingart@, deraadt@ and others.
Add a -u flag to fdisk which updates MBR code, but leaves the partition
table intact. There are still issues with 'update' having different behavior,
but I'll resolve those shortly


Revision tags: OPENBSD_3_0_BASE
# 1.4 12-Aug-2001 heko

#(endif|else) foo is incorrect, make it #endif /* foo */
deraadt@ ok


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.3 21-Oct-1997 provos

make fdisk grok extended partitions again. we have to keep track of the
absolute offset of the current mbr and its relative position. because:
the starting sector of the first mbr entry in an extended partition is relative
to the starting offset of the whole mbr itself. the starting offset of a new
extended partition is relative to the offset of the very first extended
partition.


# 1.2 29-Sep-1997 mickey

ID in the first line w/ tabs


# 1.1 29-Sep-1997 weingart

New fdisk code with interactive (command line type)
editing code. Rewrite from the ground up, save about
20 lines of code. Seems to create valid partition
tables on i386 and alphas.


# 1.18 11-Jul-2021 krw

Add tabs to make struct definitions and function prototypes easier
to read.

No functional change.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE
# 1.17 11-Dec-2015 krw

Add '-v' flag that forces the display of both GPT's and the MBR.
Useful for seeing exactly what is currently on the disk. Suggested
by a request from kettenis@.

Man page & usage ok jmc@


Revision tags: OPENBSD_5_8_BASE
# 1.16 18-Mar-2015 krw

Stop passing around little used 'struct mbr tt' parameter. Just
make the initial mbr that tt pointed at a global that can be directly
accessed in the couple of places it is needed.

Fewer parameters, less confusion, no functional change.


# 1.15 16-Mar-2015 krw

Stop passing around a pointer to the stack variable 'disk' in main().
There is only one disk being worked on, so just make it a global.

Fewer parameters, less confusion, no functional change.


# 1.14 16-Mar-2015 krw

Document that -i/-u are mutually exclusive and clean up the related
code a bit.

ok deraadt@ igor@ (with suggested tweak that is coming)


# 1.13 14-Mar-2015 krw

Whitespace & KNF tweaks. Change functions whose return values are
not checked to void. Use continue inside a do loop instead of a
goto to the top. Move a #define/#undef more local to use. Eliminate
some lint.

General cleanup of things noticed preparing the big churn.

No intentional functional change.


# 1.12 14-Mar-2015 krw

Switch all the license blocks to the standard OpenBSD/ISC license.

With the permission of Toby.

ok deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.11 09-Feb-2015 krw

Rename 'm_flag' to 'e_flag' since it's '-e' that sets it. Rename
'User_modify' to 'USER_edit' for the same reason.


Revision tags: OPENBSD_5_6_BASE
# 1.10 31-Mar-2014 krw

Whitespace rectification.


# 1.9 17-Mar-2014 krw

Nuke pointless blank lines, defines, comments and casts. Eliminate
#include in *.h files in favour of listing them as required in the *.c
files. Fix error message to correctly state that 64 is the minimum
value for -l. Use errx() where errno is not relevant. Use 'continue'
rather than a label to go back to start of a loop.

No intentional functional change.


# 1.8 07-Mar-2014 krw

Relieve the code of an overburden of unnecessary typedef
abstraction. Call a 'struct' a 'struct' and not a pony.

No functional change.

idea ok deraadt@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.7 03-Jun-2003 weingart

Nuke terms 3 & 4.


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.6 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


# 1.5 15-Dec-2001 kjell

Get this damn diff out of my tree. ok from weingart@, deraadt@ and others.
Add a -u flag to fdisk which updates MBR code, but leaves the partition
table intact. There are still issues with 'update' having different behavior,
but I'll resolve those shortly


Revision tags: OPENBSD_3_0_BASE
# 1.4 12-Aug-2001 heko

#(endif|else) foo is incorrect, make it #endif /* foo */
deraadt@ ok


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.3 21-Oct-1997 provos

make fdisk grok extended partitions again. we have to keep track of the
absolute offset of the current mbr and its relative position. because:
the starting sector of the first mbr entry in an extended partition is relative
to the starting offset of the whole mbr itself. the starting offset of a new
extended partition is relative to the offset of the very first extended
partition.


# 1.2 29-Sep-1997 mickey

ID in the first line w/ tabs


# 1.1 29-Sep-1997 weingart

New fdisk code with interactive (command line type)
editing code. Rewrite from the ground up, save about
20 lines of code. Seems to create valid partition
tables on i386 and alphas.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.17 11-Dec-2015 krw

Add '-v' flag that forces the display of both GPT's and the MBR.
Useful for seeing exactly what is currently on the disk. Suggested
by a request from kettenis@.

Man page & usage ok jmc@


Revision tags: OPENBSD_5_8_BASE
# 1.16 18-Mar-2015 krw

Stop passing around little used 'struct mbr tt' parameter. Just
make the initial mbr that tt pointed at a global that can be directly
accessed in the couple of places it is needed.

Fewer parameters, less confusion, no functional change.


# 1.15 16-Mar-2015 krw

Stop passing around a pointer to the stack variable 'disk' in main().
There is only one disk being worked on, so just make it a global.

Fewer parameters, less confusion, no functional change.


# 1.14 16-Mar-2015 krw

Document that -i/-u are mutually exclusive and clean up the related
code a bit.

ok deraadt@ igor@ (with suggested tweak that is coming)


# 1.13 14-Mar-2015 krw

Whitespace & KNF tweaks. Change functions whose return values are
not checked to void. Use continue inside a do loop instead of a
goto to the top. Move a #define/#undef more local to use. Eliminate
some lint.

General cleanup of things noticed preparing the big churn.

No intentional functional change.


# 1.12 14-Mar-2015 krw

Switch all the license blocks to the standard OpenBSD/ISC license.

With the permission of Toby.

ok deraadt@


Revision tags: OPENBSD_5_7_BASE
# 1.11 09-Feb-2015 krw

Rename 'm_flag' to 'e_flag' since it's '-e' that sets it. Rename
'User_modify' to 'USER_edit' for the same reason.


Revision tags: OPENBSD_5_6_BASE
# 1.10 31-Mar-2014 krw

Whitespace rectification.


# 1.9 17-Mar-2014 krw

Nuke pointless blank lines, defines, comments and casts. Eliminate
#include in *.h files in favour of listing them as required in the *.c
files. Fix error message to correctly state that 64 is the minimum
value for -l. Use errx() where errno is not relevant. Use 'continue'
rather than a label to go back to start of a loop.

No intentional functional change.


# 1.8 07-Mar-2014 krw

Relieve the code of an overburden of unnecessary typedef
abstraction. Call a 'struct' a 'struct' and not a pony.

No functional change.

idea ok deraadt@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.7 03-Jun-2003 weingart

Nuke terms 3 & 4.


Revision tags: OPENBSD_3_1_BASE OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.6 16-Feb-2002 millert

Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.


# 1.5 15-Dec-2001 kjell

Get this damn diff out of my tree. ok from weingart@, deraadt@ and others.
Add a -u flag to fdisk which updates MBR code, but leaves the partition
table intact. There are still issues with 'update' having different behavior,
but I'll resolve those shortly


Revision tags: OPENBSD_3_0_BASE
# 1.4 12-Aug-2001 heko

#(endif|else) foo is incorrect, make it #endif /* foo */
deraadt@ ok


Revision tags: OPENBSD_2_2_BASE OPENBSD_2_3_BASE OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.3 21-Oct-1997 provos

make fdisk grok extended partitions again. we have to keep track of the
absolute offset of the current mbr and its relative position. because:
the starting sector of the first mbr entry in an extended partition is relative
to the starting offset of the whole mbr itself. the starting offset of a new
extended partition is relative to the offset of the very first extended
partition.


# 1.2 29-Sep-1997 mickey

ID in the first line w/ tabs


# 1.1 29-Sep-1997 weingart

New fdisk code with interactive (command line type)
editing code. Rewrite from the ground up, save about
20 lines of code. Seems to create valid partition
tables on i386 and alphas.