OpenBSD CVS

CVS log for src/sbin/fdisk/cmd.h


[BACK] Up to [local] / src / sbin / fdisk

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.28 / (download) - annotate - [select for diffs], Tue May 21 05:00:47 2024 UTC (2 weeks, 4 days ago) by jsg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.27: +1 -2 lines
Diff to previous 1.27 (colored)

remove prototypes with no matching function and externs with no var
partly checked by millert@

Revision 1.27 / (download) - annotate - [select for diffs], Sun Jul 10 20:34:31 2022 UTC (22 months, 4 weeks ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.26: +16 -16 lines
Diff to previous 1.26 (colored)

Add some anti-feline input protection by refusing to process
input of excessive length.

Make 'args' parameter to Xfuncs const char * and do the multiple
argument parsing in Xswap() and Xflag() on a local copy.

Revision 1.26 / (download) - annotate - [select for diffs], Mon Oct 25 13:51:25 2021 UTC (2 years, 7 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.25: +1 -6 lines
Diff to previous 1.25 (colored)

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

Revision 1.25 / (download) - annotate - [select for diffs], Thu Sep 9 15:21:39 2021 UTC (2 years, 8 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.24: +2 -2 lines
Diff to previous 1.24 (colored)

Simplify logic in USER_edit() loop to eliminate unnecessary
goto's.

Rename CMD_SAVE to CMD_QUIT to reflect actual command (Xquit) and
help and man page verbiage.

No intentional functional change.

Revision 1.24 / (download) - annotate - [select for diffs], Thu Aug 12 12:31:16 2021 UTC (2 years, 9 months ago) by krw
Branch: MAIN
Changes since 1.23: +1 -9 lines
Diff to previous 1.23 (colored)

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.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jul 12 22:18:54 2021 UTC (2 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

Toss 'const' in anywhere the compiler doesn't complain about, thus identifying
places that *should* be const but currently aren't and preventing the rot from
spreading further while those issues are dealt with.

No functional change.

Revision 1.22 / (download) - annotate - [select for diffs], Mon Jul 12 18:31:53 2021 UTC (2 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.21: +5 -5 lines
Diff to previous 1.21 (colored)

Final batch of struct field name tweaks. 'cmd_' for cmd, ut_' for
unit_types, 'pt_' for part_type, 'pg_' for protected_guid.

No functional change.

Revision 1.21 / (download) - annotate - [select for diffs], Sun Jul 11 13:23:18 2021 UTC (2 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.20: +21 -21 lines
Diff to previous 1.20 (colored)

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

No functional change.

Revision 1.20 / (download) - annotate - [select for diffs], Mon Jun 14 17:34:06 2021 UTC (2 years, 11 months ago) by krw
Branch: MAIN
Changes since 1.19: +1 -3 lines
Diff to previous 1.19 (colored)

Only use of 'reinited' died in cmd.c r1.100. It is now set in a
couple of places but never checked. Retire it.

No functional change.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Dec 1 06:25:43 2015 UTC (8 years, 6 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6, OPENBSD_6_5_BASE, OPENBSD_6_5, OPENBSD_6_4_BASE, OPENBSD_6_4, OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2, OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0, OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.18: +3 -1 lines
Diff to previous 1.18 (colored)

Make '-i' set 'reinited' flag so that the initial Xwrite() will zap
any undesirable GPT hanging around. i.e. same as 'reinit' from the
fdisk(8) command line. Noticed now that install media relies on
'-i' rather than issuing 'reinit' in a script.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Oct 26 15:08:26 2015 UTC (8 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.17: +2 -1 lines
Diff to previous 1.17 (colored)

Add GPT editing. Based on GSOC 2014 work by Markus Muller.

Revision 1.17 / (download) - annotate - [select for diffs], Wed Mar 18 14:46:59 2015 UTC (9 years, 2 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.16: +17 -17 lines
Diff to previous 1.16 (colored)

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.

Revision 1.16 / (download) - annotate - [select for diffs], Tue Mar 17 21:42:15 2015 UTC (9 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.15: +17 -17 lines
Diff to previous 1.15 (colored)

Stop passing around little used and superfluous 'offset' parameter.
Just use the offset recorded/parsed in the struct mbr being used.

Can still traverse/edit extended MBRs so offset really wasn't needed.

Fewer parameters, less confusion, no functional change.

Revision 1.15 / (download) - annotate - [select for diffs], Mon Mar 16 23:51:50 2015 UTC (9 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.14: +17 -18 lines
Diff to previous 1.14 (colored)

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.

Revision 1.14 / (download) - annotate - [select for diffs], Sat Mar 14 15:21:53 2015 UTC (9 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.13: +11 -20 lines
Diff to previous 1.13 (colored)

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

With the permission of Toby.

ok deraadt@

Revision 1.13 / (download) - annotate - [select for diffs], Mon Mar 31 22:03:29 2014 UTC (10 years, 2 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.12: +1 -3 lines
Diff to previous 1.12 (colored)

Whitespace rectification.

Revision 1.12 / (download) - annotate - [select for diffs], Mon Mar 17 16:40:00 2014 UTC (10 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.11: +1 -11 lines
Diff to previous 1.11 (colored)

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.

Revision 1.11 / (download) - annotate - [select for diffs], Mon Mar 10 21:40:58 2014 UTC (10 years, 3 months ago) by krw
Branch: MAIN
Changes since 1.10: +19 -24 lines
Diff to previous 1.10 (colored)

No need to pass the name of the command to the function that is
implementing that command, a pointer to the command arguments is the
only thing needed. No need to have a pointer to the command table in
every command, since there is only one table. No need for shiney new
stack space for every command name and arguments parsed, since we
don't recurse we can just use static memory.

No intentional functional change.

Revision 1.10 / (download) - annotate - [select for diffs], Fri Mar 7 21:56:13 2014 UTC (10 years, 3 months ago) by krw
Branch: MAIN
Changes since 1.9: +24 -24 lines
Diff to previous 1.9 (colored)

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 1.9 / (download) - annotate - [select for diffs], Wed Jan 19 15:48:20 2005 UTC (19 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5, OPENBSD_5_4_BASE, OPENBSD_5_4, OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2, OPENBSD_5_1_BASE, OPENBSD_5_1, OPENBSD_5_0_BASE, OPENBSD_5_0, OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7, OPENBSD_4_6_BASE, OPENBSD_4_6, OPENBSD_4_5_BASE, OPENBSD_4_5, OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2, OPENBSD_4_1_BASE, OPENBSD_4_1, OPENBSD_4_0_BASE, OPENBSD_4_0, OPENBSD_3_9_BASE, OPENBSD_3_9, OPENBSD_3_8_BASE, OPENBSD_3_8, OPENBSD_3_7_BASE, OPENBSD_3_7
Changes since 1.8: +2 -1 lines
Diff to previous 1.8 (colored)

add a swap primitive; ok various, will be polished after by tom

Revision 1.8 / (download) - annotate - [select for diffs], Tue Jun 3 01:13:19 2003 UTC (21 years ago) by weingart
Branch: MAIN
CVS Tags: OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5, OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.7: +1 -6 lines
Diff to previous 1.7 (colored)

Nuke terms 3 & 4.

Revision 1.7 / (download) - annotate - [select for diffs], Sat Feb 16 21:27:34 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.6: +15 -15 lines
Diff to previous 1.6 (colored)

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.

Revision 1.6 / (download) - annotate - [select for diffs], Sun Aug 12 12:03:01 2001 UTC (22 years, 10 months ago) by heko
Branch: MAIN
CVS Tags: OPENBSD_3_0_BASE, OPENBSD_3_0
Changes since 1.5: +2 -2 lines
Diff to previous 1.5 (colored)

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

Revision 1.5 / (download) - annotate - [select for diffs], Mon Jan 1 21:05:33 2001 UTC (23 years, 5 months ago) by angelos
Branch: MAIN
CVS Tags: OPENBSD_2_9_BASE, OPENBSD_2_9
Changes since 1.4: +2 -1 lines
Diff to previous 1.4 (colored)

New command "setpid", just changes the ID of a partition (no other
parameters editing) -- vassilip@dsl.cis.upenn.edu

Revision 1.4 / (download) - annotate - [select for diffs], Thu Oct 16 10:35:06 1997 UTC (26 years, 7 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8, OPENBSD_2_7_BASE, OPENBSD_2_7, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5, OPENBSD_2_4_BASE, OPENBSD_2_4, OPENBSD_2_3_BASE, OPENBSD_2_3, OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored)

new command: manual

Revision 1.3 / (download) - annotate - [select for diffs], Thu Oct 16 01:47:09 1997 UTC (26 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.2: +8 -6 lines
Diff to previous 1.2 (colored)

a bunch of improvements by weingart & I

Revision 1.2 / (download) - annotate - [select for diffs], Mon Sep 29 23:33:33 1997 UTC (26 years, 8 months ago) by mickey
Branch: MAIN
Changes since 1.1: +1 -2 lines
Diff to previous 1.1 (colored)

ID in the first line w/ tabs

Revision 1.1 / (download) - annotate - [select for diffs], Mon Sep 29 22:58:14 1997 UTC (26 years, 8 months ago) by weingart
Branch: MAIN

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.

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.