OpenBSD CVS

CVS log for src/sbin/disklabel/extern.h


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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.36 / (download) - annotate - [select for diffs], Wed Jun 21 12:50:09 2023 UTC (11 months, 2 weeks ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, OPENBSD_7_4_BASE, OPENBSD_7_4, HEAD
Changes since 1.35: +6 -2 lines
Diff to previous 1.35 (colored)

Add a parameter 'action' to mpfree() so it can optionally discard
or keep the memory pointed at by the char ** parameter.

Allows mpfree() to be used against the global mountpoints[] and
eliminates a couple of manual loops to free the current contents
of mountpoints[].

No intentional functional change.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Jan 4 21:08:08 2023 UTC (17 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.34: +7 -7 lines
Diff to previous 1.34 (colored)

Use 'const struct disklabel *' parameters where the disklabel is
not altered. And 'const struct partition *' for pointers into
newly const disklabels.

No intentional functional change.

Revision 1.34 / (download) - annotate - [select for diffs], Fri Feb 18 17:45:43 2022 UTC (2 years, 3 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1
Changes since 1.33: +1 -4 lines
Diff to previous 1.33 (colored)

Move prototypes for checklabel(), readlabel() and parselabel()
into disklabel.c since editor.c and dkcksum.c have no need to
know.

Revision 1.33 / (download) - annotate - [select for diffs], Fri Feb 18 16:16:11 2022 UTC (2 years, 3 months ago) by krw
Branch: MAIN
Changes since 1.32: +1 -2 lines
Diff to previous 1.32 (colored)

No need for makebootarea() prototype as makebootarea() perished with NUMBOOT in
2015 (r1.211).

Revision 1.32 / (download) - annotate - [select for diffs], Sun Mar 31 02:27:28 2019 UTC (5 years, 2 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_7_0_BASE, OPENBSD_7_0, 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
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

Enhance prompt shown during -E label editing. Always
display the disk device whose label is being
edited. Change '>' to '#' when in expert mode.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Jul 3 06:37:45 2018 UTC (5 years, 11 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.30: +1 -2 lines
Diff to previous 1.30 (colored)

No need for print_unit to be a global.

ok otto@

Revision 1.30 / (download) - annotate - [select for diffs], Fri Sep 29 18:32:09 2017 UTC (6 years, 8 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.29: +3 -3 lines
Diff to previous 1.29 (colored)

don't be silent on auto-allocation failure in write mode. ok millert@ krw@

Revision 1.29 / (download) - annotate - [select for diffs], Sat Mar 4 07:26:42 2017 UTC (7 years, 3 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1
Changes since 1.28: +2 -1 lines
Diff to previous 1.28 (colored)

Allow R (resize auto-partition) after A as well as when started with -A.
This ability was lost in editor.c 1.264; noted by ajacoutot@; ok krw@

Revision 1.28 / (download) - annotate - [select for diffs], Sun Jun 19 13:42:56 2016 UTC (7 years, 11 months ago) by tb
Branch: MAIN
CVS Tags: OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.27: +2 -1 lines
Diff to previous 1.27 (colored)

Split readlabel() into two functions, readlabel() and parselabel(), and
pledge in-between the two funtion calls.  The new readlabel() only does
a DIOC*DINFO ioctl, making sure the fd points to a disk, while
parselabel() does the scary string manipulations.  In the makelabel()
code path do an early DIOCGDINFO before pledge.  This fixes yet another
pledge problem (disklabel -w /dev/tty floppy576).

Some of this was discussed with beck.

ok semarie, earlier version ok deraadt

Revision 1.27 / (download) - annotate - [select for diffs], Sat Oct 17 13:27:08 2015 UTC (8 years, 7 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.26: +3 -3 lines
Diff to previous 1.26 (colored)

NUMBOOT is dead! Nuke the variables and abstractions that were used
to build boot blocks.

ok miod@

Revision 1.26 / (download) - annotate - [select for diffs], Wed Apr 29 09:58:16 2015 UTC (9 years, 1 month ago) by henning
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.25: +2 -1 lines
Diff to previous 1.25 (colored)

support passing a template file for the auto-allocation to disklabel.
template gives mountpoints, min-max size ranges and percentage of disk
foremost intended for autoinstalls, installer bits to follow soon.
with input from many, ok theo

Revision 1.25 / (download) - annotate - [select for diffs], Thu Jul 10 13:31:23 2014 UTC (9 years, 11 months ago) by florian
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7, OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.24: +3 -1 lines
Diff to previous 1.24 (colored)

Forward declarations for mpcopy & mpfree.
OK miod@, deraadt@

Revision 1.24 / (download) - annotate - [select for diffs], Fri Jul 13 16:06:42 2012 UTC (11 years, 10 months ago) by krw
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
Changes since 1.23: +2 -2 lines
Diff to previous 1.23 (colored)

Replace a '512' with DEV_BSIZE. Calculate physmem size in blocks and
not sectors, since the values being tested/manipulated in the auto_alloc
tables are blocks at that point. Use MEG(256) instead of hand
expanding it when testing physmem.

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jan 16 17:32:07 2012 UTC (12 years, 4 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.22: +2 -2 lines
Diff to previous 1.22 (colored)

Nuke unused parameter (f) to makebootarea(). Unused since r1.123
(2008), when '-r' support was removed. Spotted by jsg@ with the
assistance of clang.

Revision 1.22 / (download) - annotate - [select for diffs], Sat Apr 16 11:44:41 2011 UTC (13 years, 1 month ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.21: +4 -3 lines
Diff to previous 1.21 (colored)

Add '-F'. Same as '-f' but uses DUIDs when writing the mount point
information to the specified file. After every label write, read the
label to get current UID info.

Some internal code cleanup with no intended functional change.

ok deraadt@

Revision 1.21 / (download) - annotate - [select for diffs], Wed Nov 24 14:15:31 2010 UTC (13 years, 6 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9
Changes since 1.20: +1 -1 lines
Diff to previous 1.20 (colored)

When dealing with disklabel UIDs (DUIDs) be specific and consistent with
naming.

ok krw@

Revision 1.20 / (download) - annotate - [select for diffs], Thu Sep 23 13:54:21 2010 UTC (13 years, 8 months ago) by jsing
Branch: MAIN
Changes since 1.19: +0 -1 lines
Diff to previous 1.19 (colored)

Print disklabel UIDs using printf/fprintf instead of using the hand rolled
uid_print() function.

ok krw@

Revision 1.19 / (download) - annotate - [select for diffs], Thu Aug 12 23:32:07 2010 UTC (13 years, 9 months ago) by tedu
Branch: MAIN
Changes since 1.18: +3 -1 lines
Diff to previous 1.18 (colored)

fix a few warnings.  ok jsing

Revision 1.18 / (download) - annotate - [select for diffs], Fri Aug 7 00:26:34 2009 UTC (14 years, 10 months ago) by martynas
Branch: MAIN
CVS Tags: OPENBSD_4_8_BASE, OPENBSD_4_8, OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.17: +3 -1 lines
Diff to previous 1.17 (colored)

move editor_allocspace & mpsave out to extern.h so that disklabel.c
gets the declarations it uses.  ok krw@

Revision 1.17 / (download) - annotate - [select for diffs], Thu Jun 4 21:13:03 2009 UTC (15 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.16: +1 -9 lines
Diff to previous 1.16 (colored)

Recycle four ancient fields in the disklabel structure, replacing them with
bounds information, ie. the zone of the disk that OpenBSD can use.  Have each
pre-disklabel parser (MBR, DPME, or per-arch MD disklabel parsers) figure out
this area and pass it up to userland.  Then, delete all the same disk parsing
code from disklabel(8) since the kernel passes it up.  Lots and lots of - signs
in the disklabel(8) code.
Tested on as many platforms as possible, the fallout will be repaired as time
goes on.  To test, use disklabel -d <drive> and validate that the bounds do not
overlap any boot blocks.  This same information is used by disklabel -A...
OK for the concept from krw, miod, and drahn

Revision 1.16 / (download) - annotate - [select for diffs], Tue Jun 2 16:23:45 2009 UTC (15 years ago) by krw
Branch: MAIN
Changes since 1.15: +5 -1 lines
Diff to previous 1.15 (colored)

Add '-h' flag, and '*' as a unit specifier for 'p' Editor command.
Both cause partition sizes to be displayed using a human readable
format with the units automatically chosen by looking at the smallest
partition in the disk label. Remove forceable humanization in 'A'
code and use '-h' in install scripts.

Prodded & ok deraadt@, verbiage tweaks from jmc@

Revision 1.15 / (download) - annotate - [select for diffs], Sat Apr 18 00:15:46 2009 UTC (15 years, 1 month ago) by sthen
Branch: MAIN
Changes since 1.14: +2 -2 lines
Diff to previous 1.14 (colored)

Alexander Hall points out that disklabel -AE <disk> followed by quitting
without making manual changes does not ask whether you'd like to save the
new automatic disklabel. Change to follow the behaviour of -d and ask
every time.  ok krw@.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Apr 12 01:01:24 2009 UTC (15 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.13: +2 -1 lines
Diff to previous 1.13 (colored)

When auto-allocating, check the size of the disk and display
offset/size information in MB if the disk is <10G, and in GB
otherwise. '-p' will override this default.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Apr 11 16:54:28 2009 UTC (15 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.12: +2 -2 lines
Diff to previous 1.12 (colored)

readlabel() either errored out or returned a pointer to the global
'lab'. So there is no need for the return value. Just use &lab
wherever it was used. No functional change.

Slightly different version read ok to blambert@

Revision 1.12 / (download) - annotate - [select for diffs], Fri Apr 10 20:54:08 2009 UTC (15 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.11: +7 -5 lines
Diff to previous 1.11 (colored)

Re-work '-A' so that it sets a flag that -E and -w use, and which will
just display the auto-allocation plan otherwise. Don't overwrite any
spoofed partitions, insert auto allocated partitions where we can.

This is much more install script and weird architecture friendly. I'm
talking about you, macppc.

Many suggestions and code from otto@, feedback from many, cattle
prod applied by deraadt@.

ok deraadt@
"if it works for >8GB ... put it in" miod@
"to be clear, ok" todd@

Revision 1.11 / (download) - annotate - [select for diffs], Sun Mar 29 05:37:13 2009 UTC (15 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.10: +0 -4 lines
Diff to previous 1.10 (colored)

otto points out that the -v printing changes are incompatible with the
expectation that -R will read the output of disklabel.  I suspect we
will find another way to do this; ok otto

Revision 1.10 / (download) - annotate - [select for diffs], Sat Mar 28 16:27:24 2009 UTC (15 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.9: +5 -1 lines
Diff to previous 1.9 (colored)

Move some output under the control of the '-v' flag. In particular only
display the partition info by default as is done in the E(ditor). The
physical info is now only displayed if '-v' is specified.

ok deraadt@

Revision 1.9 / (download) - annotate - [select for diffs], Sun Mar 22 19:01:32 2009 UTC (15 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored)

Add 'A' command to Editor mode, and -A flag to automatically execute it
on disks without an existing label. The 'A' command allocates all space
on the disk into a reasonable partition scheme for a root disk.

Feedback from several, time to work on it in-tree.

Prodded (repeatedly) by and ok deraadt@

Revision 1.8 / (download) - annotate - [select for diffs], Sun Jan 11 19:44:57 2009 UTC (15 years, 5 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.7: +5 -1 lines
Diff to previous 1.7 (colored)

On *ppc disks shared with MacOS, walk the Apple partition map to find out
the bounds of the OpenBSD area. Should prevent users from shooting themselves
in the feet.

ok krw@

Revision 1.7 / (download) - annotate - [select for diffs], Wed Jun 25 18:31:07 2008 UTC (15 years, 11 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4
Changes since 1.6: +2 -2 lines
Diff to previous 1.6 (colored)

In interactive mode, always suggest offsets and sizes inside the
OpenBSD area and change the 'p' command to only print the boundaries
and size of the OpenBSD area and the free space within that area.
Introduce a 'l' command to print the header only. With krw@; ok krw@
deraadt@; jmc@ for the man page bits

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jun 8 18:42:17 2007 UTC (17 years ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_3_BASE, OPENBSD_4_3, OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.5: +3 -3 lines
Diff to previous 1.5 (colored)

Make disklabel(8) aware of the new fields, allowing for larger than
2T disks, partitions and offsets. ok deraadt@

Revision 1.5 / (download) - annotate - [select for diffs], Fri Mar 2 02:29:13 2007 UTC (17 years, 3 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.4: +2 -1 lines
Diff to previous 1.4 (colored)

If a default label has been created with the -d command line option or
the  'D' editor command and has not been written to disk when the user
issues the 'q' editor command, ask if the label should be written to
disk before exiting.

Revision 1.4 / (download) - annotate - [select for diffs], Fri Jan 7 21:58:14 2005 UTC (19 years, 5 months ago) by otto
Branch: MAIN
CVS Tags: 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.3: +3 -2 lines
Diff to previous 1.3 (colored)

Print disk size and free space in requested unit. Some refactoring to
avoid code duplication as well. ok marco@ deraadt@

Revision 1.3 / (download) - annotate - [select for diffs], Fri Oct 1 04:08:45 2004 UTC (19 years, 8 months ago) by jsg
Branch: MAIN
Changes since 1.2: +2 -0 lines
Diff to previous 1.2 (colored)

add some missing $, ok djm@ 'That looks fine to me' millert@

Revision 1.2 / (download) - annotate - [select for diffs], Tue Sep 28 17:57:46 2004 UTC (19 years, 8 months ago) by otto
Branch: MAIN
Changes since 1.1: +14 -0 lines
Diff to previous 1.1 (colored)

Tidy disklabel output for todays big disks. Based on a diff from f
at obiit dot org in PR 3847. ok tedu@ deraadt@ millert@

Revision 1.1 / (download) - annotate - [select for diffs], Wed Jul 2 21:22:10 2003 UTC (20 years, 11 months ago) by deraadt
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

missing protos

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.