OpenBSD CVS

CVS log for src/sys/sys/disklabel.h


[BACK] Up to [local] / src / sys / sys

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.86 / (download) - annotate - [select for diffs], Mon Nov 7 10:33:22 2022 UTC (19 months 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, HEAD
Changes since 1.85: +2 -2 lines
Diff to previous 1.85 (colored)

Rename unreferenced field d_drivedata to smoke out any well
hidden uses.

Revision 1.85 / (download) - annotate - [select for diffs], Wed Oct 12 23:11:33 2022 UTC (19 months, 4 weeks ago) by krw
Branch: MAIN
Changes since 1.84: +1 -2 lines
Diff to previous 1.84 (colored)

Nuke D_BADSECT and disktab's 'sf'.

DEC standard 144 bad sector information is no longer a thing. As
evidenced by bad144(8) moving to the attic 16 years ago.

ok miod@, who points out that badsect(8) is now the nail sticking
out.

Revision 1.84 / (download) - annotate - [select for diffs], Tue Oct 11 23:39:08 2022 UTC (19 months, 4 weeks ago) by krw
Branch: MAIN
Changes since 1.83: +2 -2 lines
Diff to previous 1.83 (colored)

Give checkdisklabel() a new parameter supplying the dev_t of the
device whose disklabel is being checked. Within checkdisklabel()
use this information to discover a device name iff (sic) the
label is an obsolete version. Use the name to generate a
meaningful warning message asking the user to rewrite the
disklabel and thus promote it to the current version.

Suggested by, feedback from and ok deraadt@

Revision 1.83 / (download) - annotate - [select for diffs], Fri Oct 7 19:34:40 2022 UTC (20 months ago) by krw
Branch: MAIN
Changes since 1.82: +1 -2 lines
Diff to previous 1.82 (colored)

Nuke GPTDOSACTIVE which specified the wrong bit. It was superseded by
GPTPARTATTR_BOOTABLE which specifies the correct one.

Reminded by drahn@

Revision 1.82 / (download) - annotate - [select for diffs], Thu Sep 15 10:10:14 2022 UTC (20 months, 3 weeks ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.81: +9 -4 lines
Diff to previous 1.81 (colored)

Add GPTPARTATTR_MS_* defines for Microsoft basic data attributes
and make 'fdisk -v' display their names (NoAutoMount, Hidden,
Shadow, ReadOnly).

Shift 1ULL instead of 1 to make it clear these are uint64_t
flags. Makes clang happier.

Revision 1.81 / (download) - annotate - [select for diffs], Sun Sep 11 11:47:55 2022 UTC (20 months, 4 weeks ago) by krw
Branch: MAIN
Changes since 1.80: +4 -1 lines
Diff to previous 1.80 (colored)

Add #define's for GPT partition attribute bits REQUIRED, IGNORE
and BOOTABLE, set BOOTABLE attribute bit instead of using the
incorrect GPTDOSACTIVE value, have 'fdisk -v' print out GPT
partition attributes if any of the 64 bits are set, don't spoof
any partition with REQUIRED bit set.

Prompted by kettenis@ stumbling across a machine with 40+ (!!)
REQUIRED GPT partitions.

Tested & ok kettenis@

Revision 1.80 / (download) - annotate - [select for diffs], Tue Sep 6 14:14:44 2022 UTC (21 months ago) by krw
Branch: MAIN
Changes since 1.79: +1 -21 lines
Diff to previous 1.79 (colored)

Delete some unreferenced SMD, ST506 and archaic SCSI #define's
that use d_drivedata.

Since nothing else in the tree refers to d_drivedata other than
/etc/disktab parsing and no /etc/disktab entry utilizes the
:d[0-4]: attributes, stop disklabel(8) both printing "drivedata:
0" and paying attention to any "drivedata: ..." lines in ascii
labels being read.

ok jsg@ miod@

Revision 1.79 / (download) - annotate - [select for diffs], Thu Sep 1 15:48:51 2022 UTC (21 months, 1 week ago) by krw
Branch: MAIN
Changes since 1.78: +3 -3 lines
Diff to previous 1.78 (colored)

d_bbsize and d_sbsize are entirely absent from the tree.

Rename them d_spare2 and d_spare3.

ok otto@ as part of larger diff

Revision 1.78 / (download) - annotate - [select for diffs], Sat May 8 16:41:25 2021 UTC (3 years, 1 month ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0
Changes since 1.77: +4 -1 lines
Diff to previous 1.77 (colored)

Spoof GPT partitions of type 21686148-6449-6e6f-744e-656564454649 (a.k.a.
"IdontNeedEFI", a.k.a. "BIOS boot") as FS_BOOT. Often used to contain the second
stage boot loader binary on disk images.

Makes it easier to recognize/overwrite/remove the contents.

Not yet supported in fdisk(8).

Example image provided by mlarkin@

Revision 1.77 / (download) - annotate - [select for diffs], Sat Nov 14 20:53:31 2020 UTC (3 years, 6 months ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_9_BASE, OPENBSD_6_9
Changes since 1.76: +3 -3 lines
Diff to previous 1.76 (colored)

Constify dktypenames and fstypenames in libc.
Adjust variable declaration in disklabel to match.

ok millert@ deraadt@

Revision 1.76 / (download) - annotate - [select for diffs], Sun May 10 00:56:06 2020 UTC (4 years, 1 month ago) by guenther
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.75: +16 -16 lines
Diff to previous 1.75 (colored)

Use a double-underscore prefix for local variables declared in macros
that have arguments.  Document this requirement/recommendation in style(9)

prompted by mpi@
ok deraadt@

Revision 1.75 / (download) - annotate - [select for diffs], Tue Oct 24 09:36:13 2017 UTC (6 years, 7 months ago) by jsg
Branch: MAIN
CVS Tags: 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
Changes since 1.74: +1 -13 lines
Diff to previous 1.74 (colored)

remove defines for ioctls the kernel doesn't recognise
ok mpi@

Revision 1.74 / (download) - annotate - [select for diffs], Tue Nov 3 13:59:07 2015 UTC (8 years, 7 months ago) by krw
Branch: MAIN
CVS Tags: 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.73: +3 -2 lines
Diff to previous 1.73 (colored)

Add & use a #define GPTPARTNAMESIZE rather than the magic number
'36'.

ok jsg@ as part of larger diff.

Revision 1.73 / (download) - annotate - [select for diffs], Sun Oct 25 16:35:40 2015 UTC (8 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.72: +2 -20 lines
Diff to previous 1.72 (colored)

Nuke union of d_packname with un_d_boot0 & un_d_boot1, keeping
d_packname as a simple field. Also nuke the access #defines, and
support for b0 and b1 capabilities in disktab.

ok deraadt@ miod@

Revision 1.72 / (download) - annotate - [select for diffs], Thu Sep 24 19:28:33 2015 UTC (8 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.71: +3 -1 lines
Diff to previous 1.71 (colored)

Move declaration of readdisksector() to disklabel.h. This makes it
available to other areas of the kernel suffering from an overburden
of buf tweaking to read a disk sector.

ok mpi@

Revision 1.71 / (download) - annotate - [select for diffs], Sun Sep 13 15:18:14 2015 UTC (8 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.70: +1 -4 lines
Diff to previous 1.70 (colored)

Remove unused and incorrect defines GPT_PARTSPERSEC and GPT_SECOFFSET.

Revision 1.70 / (download) - annotate - [select for diffs], Sun Sep 13 14:38:17 2015 UTC (8 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.69: +1 -3 lines
Diff to previous 1.69 (colored)

Move prototype for spoofgptlabel() from disklabel.h to subr_disk.c.
It's a helper function for readdoslabel(). Not something called
outside of subr_disk.c.

Revision 1.69 / (download) - annotate - [select for diffs], Sun Sep 13 12:53:08 2015 UTC (8 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.68: +3 -3 lines
Diff to previous 1.68 (colored)

Rename readgptlabel() to spoofgptlabel() because that's what we
really want it to do. Handle all the actual disklabel reading in
readdoslabel().  Makes the code much simpler to understand.

ok deraadt@

Revision 1.68 / (download) - annotate - [select for diffs], Thu Sep 10 16:30:23 2015 UTC (8 years, 9 months ago) by krw
Branch: MAIN
Changes since 1.67: +1 -3 lines
Diff to previous 1.67 (colored)

Now that the GPT code tries really hard not to get in the way and
accidentally capture disks ...

Eliminate kernel option GPT and associated #ifdef GPT/#endif. Let
everybody get on the GPT bandwagon and we'll see what wheels fly
off.

Requested by & ok deraadt@

Revision 1.67 / (download) - annotate - [select for diffs], Fri Aug 14 23:45:56 2015 UTC (8 years, 9 months ago) by krw
Branch: MAIN
Changes since 1.66: +3 -1 lines
Diff to previous 1.66 (colored)

The disktab attribute 'ty' was used to set D_REMOVEABLE and D_RAMDISK
flags in the disklabel. These flags were discarded in 2006.

Remove documentation for and instances of 'ty'. Add instances of
'dt' that were missing. Use 'floppy' as the value of 'dt' for all
floppies and 'rdroot' for all boot images/miniroots.

Add 'rdroot' to dktypenames and an associated #define DTYPE_RDROOT,
since 'dt' values are parsed by matching entries in dktypenames[].

Slightly tweaked part of larger cleanup diff previously ok deraadt@.

Revision 1.66 / (download) - annotate - [select for diffs], Thu Jul 23 18:02:59 2015 UTC (8 years, 10 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.65: +7 -7 lines
Diff to previous 1.65 (colored)

Revert attempted GPT code cleanup. Too much code, too little testing.

Requested by deraadt@

Revision 1.65 / (download) - annotate - [select for diffs], Sat May 9 17:11:26 2015 UTC (9 years, 1 month ago) by krw
Branch: MAIN
Changes since 1.64: +7 -7 lines
Diff to previous 1.64 (colored)

Cleanup/rejig GPT code to be more readable, support different endian
archs and different sized disk sectors. Make MBR have higher priority
than GPT. Add many paranoia checks and associated DPRINTF's to make
further development easier. Keep everything hidden behind #ifdef
GPT.

Tested and ok doug@ mpi@. Nothing bad seen by millert@.

Revision 1.64 / (download) - annotate - [select for diffs], Sat Aug 30 10:44:02 2014 UTC (9 years, 9 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_5_7_BASE, OPENBSD_5_7
Changes since 1.63: +3 -1 lines
Diff to previous 1.63 (colored)

Recognize EFI protective and system partitions. Do not put disklabel entries
for the protective ones when creating a fake label, but do, for the system
ones, so that we may eventually copy boot code to them.

From Markus Mueller

Revision 1.63 / (download) - annotate - [select for diffs], Sun Jul 13 16:50:25 2014 UTC (9 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_6_BASE, OPENBSD_5_6
Changes since 1.62: +2 -2 lines
Diff to previous 1.62 (colored)

GPTSIGNATURE must be LL, for operation on non-punk machines
ok punk

Revision 1.62 / (download) - annotate - [select for diffs], Sun Jul 13 15:32:28 2014 UTC (9 years, 11 months ago) by miod
Branch: MAIN
Changes since 1.61: +97 -1 lines
Diff to previous 1.61 (colored)

Initial support to read GPT partition tables in the kernel, if option GPT.
Contributed by Markus Mueller; code based upon Bitrig's GPT support, with
stricter GPT structures validation and support for alternate header places.

ok deraadt@ jsing@ krw@

Revision 1.61 / (download) - annotate - [select for diffs], Tue Jul 1 05:22:09 2014 UTC (9 years, 11 months ago) by dlg
Branch: MAIN
Changes since 1.60: +1 -2 lines
Diff to previous 1.60 (colored)

i removed disksort. we dont need its prototype.

Revision 1.60 / (download) - annotate - [select for diffs], Mon May 5 13:32:15 2014 UTC (10 years, 1 month ago) by krw
Branch: MAIN
Changes since 1.59: +2 -2 lines
Diff to previous 1.59 (colored)

Tweak comment on struct _partitionv0. It's no longer the partition
table.

Suggested by David Vasek.

Revision 1.59 / (download) - annotate - [select for diffs], Sun Nov 10 04:59:06 2013 UTC (10 years, 7 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_5_5_BASE, OPENBSD_5_5
Changes since 1.58: +4 -4 lines
Diff to previous 1.58 (colored)

Tweak comments to d_secperunit, p_size and p_offset to clearly say
they are the 'low' parts of the disk size, partition size and
partition offset.  Like d_secpuerunith,  p_sizeh and p_offseth were
already commented as the 'high' parts.

Revision 1.58 / (download) - annotate - [select for diffs], Sun Nov 3 14:18:55 2013 UTC (10 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.57: +2 -2 lines
Diff to previous 1.57 (colored)

spelling; frantisek holop

Revision 1.57 / (download) - annotate - [select for diffs], Sat Oct 19 09:32:15 2013 UTC (10 years, 7 months ago) by krw
Branch: MAIN
Changes since 1.56: +2 -2 lines
Diff to previous 1.56 (colored)

Use daddr_t * instead of int * for the partoffp parameter to
readdoslabel(). Ditto all the MD variables whose addresses are passed
to readdoslabel() via partoffp.

Fix some 512-byte block vs disk sector confusion in hppa and sgi.
All the DL_GETxxxxx() defines return disk sector values. All
DL_SETxxxx() take disk sector values. These changes should be no-ops
until a drive using non-512-byte-sectors is encountered.

ok deraadt@

Revision 1.56 / (download) - annotate - [select for diffs], Wed Sep 11 01:42:21 2013 UTC (10 years, 9 months ago) by krw
Branch: MAIN
Changes since 1.55: +6 -6 lines
Diff to previous 1.55 (colored)

Use u_int64_t instead of daddr_t for the local variables in the
DL_SET* macros. These are sector values, not 512-byte block values.

ok deraadt@

Revision 1.55 / (download) - annotate - [select for diffs], Tue Jun 11 16:42:18 2013 UTC (11 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_4_BASE, OPENBSD_5_4
Changes since 1.54: +7 -7 lines
Diff to previous 1.54 (colored)

final removal of daddr64_t.  daddr_t has been 64 bit for a long enough
test period; i think 3 years ago the last bugs fell out.
ok otto beck others

Revision 1.54 / (download) - annotate - [select for diffs], Fri Apr 6 15:10:40 2012 UTC (12 years, 2 months ago) by jsing
Branch: MAIN
CVS Tags: OPENBSD_5_3_BASE, OPENBSD_5_3, OPENBSD_5_2_BASE, OPENBSD_5_2
Changes since 1.53: +2 -2 lines
Diff to previous 1.53 (colored)

tedu the raidframe.

ok deraadt@

Revision 1.53 / (download) - annotate - [select for diffs], Thu Oct 6 21:16:01 2011 UTC (12 years, 8 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_5_1_BASE, OPENBSD_5_1
Changes since 1.52: +3 -3 lines
Diff to previous 1.52 (colored)

mark ccd(4) deprecated in a few more places

Revision 1.52 / (download) - annotate - [select for diffs], Thu Sep 29 18:03:44 2011 UTC (12 years, 8 months ago) by miod
Branch: MAIN
Changes since 1.51: +1 -13 lines
Diff to previous 1.51 (colored)

Remove assembly defines for various struct disklabel field offsets, now that
nothing depends on them anymore.
ok jsing@ krw@

Revision 1.51 / (download) - annotate - [select for diffs], Fri Jun 3 21:14:11 2011 UTC (13 years ago) by matthew
Branch: MAIN
CVS Tags: OPENBSD_5_0_BASE, OPENBSD_5_0
Changes since 1.50: +2 -2 lines
Diff to previous 1.50 (colored)

Get rid of the wlabel argument to bounds_check_with_label().  It's
never done anything in OpenBSD and just clutters disk drivers with
silly flag handling.

More cleanup to follow.

ok deraadt@, millert@; no objections krw@

Revision 1.50 / (download) - annotate - [select for diffs], Tue Mar 22 19:26:55 2011 UTC (13 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.49: +2 -2 lines
Diff to previous 1.49 (colored)

Increase number of EBRs we can transit looking for the OpenBSD partition
to 256 from 8. 256 ought to be enough for anyone.

Revision 1.49 / (download) - annotate - [select for diffs], Thu Mar 17 21:44:10 2011 UTC (13 years, 2 months ago) by krw
Branch: MAIN
Changes since 1.48: +4 -1 lines
Diff to previous 1.48 (colored)

Uncommitted bits. Spotted by deraadt@, who theorizes I have insuffient
sushi level.

Revision 1.48 / (download) - annotate - [select for diffs], Sun Apr 25 06:15:16 2010 UTC (14 years, 1 month ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_9_BASE, OPENBSD_4_9, OPENBSD_4_8_BASE, OPENBSD_4_8
Changes since 1.47: +2 -2 lines
Diff to previous 1.47 (colored)

introducing a 64-bit type to the disklabel structure leads some architectures
to pad-align the size of the structure; it grows, the disklabel ioctl's are
break ABI.  Change the uid to a character array.  this also simplifies some
other stuff
ok jsing

Revision 1.47 / (download) - annotate - [select for diffs], Fri Apr 23 15:25:21 2010 UTC (14 years, 1 month ago) by jsing
Branch: MAIN
Changes since 1.46: +2 -26 lines
Diff to previous 1.46 (colored)

Recycle unused disklabel fields in order to create a disklabel unique
identifier, allowing the disk to be identified without relying on the
device name.

ok deraadt@ krw@ beck@ marco@ todd@

Revision 1.46 / (download) - annotate - [select for diffs], Thu Aug 13 15:23:11 2009 UTC (14 years, 10 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_7_BASE, OPENBSD_4_7
Changes since 1.45: +5 -5 lines
Diff to previous 1.45 (colored)

Replace the error strings that were being passed around with much simpler
errnos.  Note that the error strings are being ignored, since we long ago
decided to not spam the console, and there is no other nice way to use the
errors (without changing the ioctls to pass it back)
The errno is now useful, since we can pass b_error from failing IO up, and
the drive can decide how to use that
ok miod

Revision 1.45 / (download) - annotate - [select for diffs], Thu Jun 4 21:13:02 2009 UTC (15 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_4_6_BASE, OPENBSD_4_6
Changes since 1.44: +24 -10 lines
Diff to previous 1.44 (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.44 / (download) - annotate - [select for diffs], Sun Aug 10 15:52:50 2008 UTC (15 years, 10 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_4_5_BASE, OPENBSD_4_5
Changes since 1.43: +2 -2 lines
Diff to previous 1.43 (colored)

Fix other integer overflow vulnerability I introduced, this time in
DL_BLKOFFSET(). Pointed out by kettenis@ and deraadt@.

ok kettenis@

Revision 1.43 / (download) - annotate - [select for diffs], Sat Aug 9 19:20:07 2008 UTC (15 years, 10 months ago) by kettenis
Branch: MAIN
Changes since 1.42: +2 -2 lines
Diff to previous 1.42 (colored)

Prevent integer overflow in DL_BLKTOSEC().

ok krw@

Revision 1.42 / (download) - annotate - [select for diffs], Fri Aug 8 23:49:53 2008 UTC (15 years, 10 months ago) by krw
Branch: MAIN
Changes since 1.41: +6 -1 lines
Diff to previous 1.41 (colored)

Admit b_blkno means block number; a block is DEV_BSIZE (a.k.a.
512) bytes; ffs is inextricably tied to using b_blkno and disklabel
always uses sectorsize units.

Thus use DEV_BSIZE units for all fields describing ffs filesystems
and convert to/from sectors where required. This enables the creation
and use of ffs filesystems on non-512 byte sectorsize devices.

This diff allows i386 and sgi (the two test platforms) to find
disklabels that are not on a sectorsize boundary. Same change to
further archs coming.

This is a no-op on 512-byte sectorsize devices.

This work triggered by jsing@'s need to create ffs filesystems on
sgi cdroms so we can create cdrom install media for sgi.

sgi testing by jsing@

ok jsing@ pedro@ "looks sane" beck@ weingart@

Revision 1.41 / (download) - annotate - [select for diffs], Mon Jan 14 19:02:11 2008 UTC (16 years, 4 months ago) by otto
Branch: MAIN
CVS Tags: OPENBSD_4_4_BASE, OPENBSD_4_4, OPENBSD_4_3_BASE, OPENBSD_4_3
Changes since 1.40: +2 -2 lines
Diff to previous 1.40 (colored)

Fix max disk size: whe have 48 bits for size in 512 bytes units.
1 bit allowance to avoid possible sign extend issues for now.
This results in a max partition or disk size of 64PB.  ok krw@ miod@

Revision 1.40 / (download) - annotate - [select for diffs], Fri Nov 9 11:32:57 2007 UTC (16 years, 7 months ago) by jsing
Branch: MAIN
Changes since 1.39: +2 -1 lines
Diff to previous 1.39 (colored)

Make disklabel aware of NTFS.

ok miod@ krw@

Revision 1.39 / (download) - annotate - [select for diffs], Wed Jul 11 04:50:43 2007 UTC (16 years, 11 months ago) by miod
Branch: MAIN
CVS Tags: OPENBSD_4_2_BASE, OPENBSD_4_2
Changes since 1.38: +2 -2 lines
Diff to previous 1.38 (colored)

Do not divide by zero in DISKLABELV1_FFS_FSIZE if the argument value is bogus;
ok otto@ millert@ krw@

Revision 1.38 / (download) - annotate - [select for diffs], Wed Jun 20 18:15:47 2007 UTC (16 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.37: +6 -10 lines
Diff to previous 1.37 (colored)

b_cylinder does not need to be set on the callpath down into drivers.
cpu_disklabel can go away, since nothing anymore needs to use it; ok miod

Revision 1.37 / (download) - annotate - [select for diffs], Sun Jun 17 00:27:29 2007 UTC (16 years, 11 months ago) by deraadt
Branch: MAIN
Changes since 1.36: +57 -2 lines
Diff to previous 1.36 (colored)

significantly simplified disklabel infrastructure.  MBR handling becomes MI
to support hotplug media on most architectures.  disklabel setup and
verification done using new helper functions.  Disklabels must *always*
have a correct checksum now.  Same code paths are used to learn on-disk
location disklabels, to avoid new errors sneaking in.  Tested on almost all
cases, testing help from todd, kettenis, krw, otto, dlg, robert, gwk, drahn

Revision 1.36 / (download) - annotate - [select for diffs], Wed Jun 6 16:42:07 2007 UTC (17 years ago) by deraadt
Branch: MAIN
Changes since 1.35: +2 -2 lines
Diff to previous 1.35 (colored)

a fair sprinking of knf, code movement, and sometimes character-by-character
accuracy so that the variious disksubr.c's can be compared easier.
setdisklabel() starts taking an int for openmask.
ok krw, and read by quite a few other people

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jun 5 00:38:24 2007 UTC (17 years ago) by deraadt
Branch: MAIN
Changes since 1.34: +23 -5 lines
Diff to previous 1.34 (colored)

use six new macros to access & store the 48-bit disklabel fields related
to size.  tested on almost all machines, double checked by miod and krw
next comes the type handling surrounding these values

Revision 1.34 / (download) - annotate - [select for diffs], Sat Jun 2 02:35:27 2007 UTC (17 years ago) by krw
Branch: MAIN
Changes since 1.33: +2 -2 lines
Diff to previous 1.33 (colored)

Rename cvtdisklabelv1 -> disklabeltokernlabel. It does more than just
convert version 0 to version 1 disklabels.

Suggested by deraadt@.

ok deraadt@ otto@

Revision 1.33 / (download) - annotate - [select for diffs], Fri Jun 1 18:09:52 2007 UTC (17 years ago) by deraadt
Branch: MAIN
Changes since 1.32: +2 -2 lines
Diff to previous 1.32 (colored)

format_op df_startblk can be a daddr64_t too

Revision 1.32 / (download) - annotate - [select for diffs], Thu May 31 03:19:19 2007 UTC (17 years ago) by otto
Branch: MAIN
Changes since 1.31: +2 -2 lines
Diff to previous 1.31 (colored)

oops, typo

Revision 1.31 / (download) - annotate - [select for diffs], Thu May 31 02:33:37 2007 UTC (17 years ago) by otto
Branch: MAIN
Changes since 1.30: +5 -1 lines
Diff to previous 1.30 (colored)

macros to get the large sizes and offsets from a v1 label. ok deraadt@

Revision 1.30 / (download) - annotate - [select for diffs], Tue May 29 16:26:53 2007 UTC (17 years ago) by thib
Branch: MAIN
Changes since 1.29: +2 -7 lines
Diff to previous 1.29 (colored)

Collapse the __partition_u1 union in struct disklabel,
keep p_cpg around since its need. remove p_sgs.

ok otto@,krw@

Revision 1.29 / (download) - annotate - [select for diffs], Tue May 29 06:28:14 2007 UTC (17 years ago) by otto
Branch: MAIN
Changes since 1.28: +33 -4 lines
Diff to previous 1.28 (colored)

Updated disklabel format to support larger disks and partitions. We
free room in struct partition by packing fragment size and
fragments/block more tighlty and use the resulting space to make
offset and size 48 bits.  For the disk part we use spare fields in
struct disklabel.  Kernel converts in-mem copy of the on-disk
label if needed, disklabel(8) writes new version.
We are careful to only change fields not used by bootloaders.
Conception of basic scheme by deraadt.
ok deraadt@ krw@

Revision 1.28 / (download) - annotate - [select for diffs], Tue Sep 26 23:33:04 2006 UTC (17 years, 8 months ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_4_1_BASE, OPENBSD_4_1
Changes since 1.27: +1 -2 lines
Diff to previous 1.27 (colored)

Zap D_REMOVABLE flag from disklabel. If you didn't already know that
floppies and cd's were removable, displaying that fact in disklabel
output was unlikely to help. And the display in disklabel was the only
use of D_REMOVABLE in the tree.

ok marco@

Revision 1.27 / (download) - annotate - [select for diffs], Sun Sep 24 20:29:52 2006 UTC (17 years, 8 months ago) by krw
Branch: MAIN
Changes since 1.26: +1 -4 lines
Diff to previous 1.26 (colored)

Eliminate D_CHAIN, D_ECC and D_RAMDISK flags from disklabel. They were
not being used in the tree for anything obviously useful. Get it done
early so we can find if there are non-obvious uses out there.

ok deraadt@ beck@

Revision 1.26 / (download) - annotate - [select for diffs], Tue Mar 29 16:30:21 2005 UTC (19 years, 2 months ago) by deraadt
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
Changes since 1.25: +5 -1 lines
Diff to previous 1.25 (colored)

udf_disklabelspoof() proto

Revision 1.25 / (download) - annotate - [select for diffs], Mon Mar 28 21:26:19 2005 UTC (19 years, 2 months ago) by deraadt
Branch: MAIN
Changes since 1.24: +4 -1 lines
Diff to previous 1.24 (colored)

p_fstype FS_UDF or #21

Revision 1.17.6.4 / (download) - annotate - [select for diffs], Thu Feb 19 11:01:32 2004 UTC (20 years, 3 months ago) by niklas
Branch: SMP
Changes since 1.17.6.3: +4 -1 lines
Diff to previous 1.17.6.3 (colored) to branchpoint 1.17 (colored) next main 1.18 (colored)

Merge of current from two weeks agointo the SMP branch

Revision 1.24 / (download) - annotate - [select for diffs], Fri Jan 23 19:36:25 2004 UTC (20 years, 4 months ago) by millert
Branch: MAIN
CVS Tags: SMP_SYNC_B, SMP_SYNC_A, OPENBSD_3_7_BASE, OPENBSD_3_7, OPENBSD_3_6_BASE, OPENBSD_3_6, OPENBSD_3_5_BASE, OPENBSD_3_5
Changes since 1.23: +4 -1 lines
Diff to previous 1.23 (colored)

Add NTFS; deraadt@ OK

Revision 1.17.6.3 / (download) - annotate - [select for diffs], Sat Jun 7 11:09:07 2003 UTC (21 years ago) by ho
Branch: SMP
Changes since 1.17.6.2: +2 -6 lines
Diff to previous 1.17.6.2 (colored) to branchpoint 1.17 (colored)

Sync SMP branch to -current

Revision 1.23 / (download) - annotate - [select for diffs], Mon Jun 2 23:28:21 2003 UTC (21 years ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_3_4_BASE, OPENBSD_3_4
Changes since 1.22: +2 -6 lines
Diff to previous 1.22 (colored)

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999.  Proofed by myself and Theo.

Revision 1.20.6.1 / (download) - annotate - [select for diffs], Tue Jun 11 03:32:33 2002 UTC (22 years ago) by art
Branch: UBC
Changes since 1.20: +15 -16 lines
Diff to previous 1.20 (colored) next main 1.21 (colored)

Sync UBC branch to -current

Revision 1.17.6.2 / (download) - annotate - [select for diffs], Thu Mar 28 14:52:01 2002 UTC (22 years, 2 months ago) by niklas
Branch: SMP
Changes since 1.17.6.1: +15 -16 lines
Diff to previous 1.17.6.1 (colored) to branchpoint 1.17 (colored)

Merge in -current from roughly a week ago

Revision 1.22 / (download) - annotate - [select for diffs], Thu Mar 14 03:16:12 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
CVS Tags: UBC_SYNC_B, UBC_SYNC_A, OPENBSD_3_3_BASE, OPENBSD_3_3, OPENBSD_3_2_BASE, OPENBSD_3_2, OPENBSD_3_1_BASE, OPENBSD_3_1
Changes since 1.21: +7 -7 lines
Diff to previous 1.21 (colored)

Final __P removal plus some cosmetic fixups

Revision 1.21 / (download) - annotate - [select for diffs], Thu Mar 14 01:27:14 2002 UTC (22 years, 3 months ago) by millert
Branch: MAIN
Changes since 1.20: +10 -11 lines
Diff to previous 1.20 (colored)

First round of __P removal in sys

Revision 1.17.6.1 / (download) - annotate - [select for diffs], Mon May 14 22:45:01 2001 UTC (23 years, 1 month ago) by niklas
Branch: SMP
Changes since 1.17: +10 -4 lines
Diff to previous 1.17 (colored)

merge in approximately 2.9 into SMP branch

Revision 1.20 / (download) - annotate - [select for diffs], Sat Nov 25 21:32:05 2000 UTC (23 years, 6 months ago) by hugh
Branch: MAIN
CVS Tags: UBC_BASE, OPENBSD_3_0_BASE, OPENBSD_3_0, OPENBSD_2_9_BASE, OPENBSD_2_9
Branch point for: UBC
Changes since 1.19: +2 -2 lines
Diff to previous 1.19 (colored)

Change d_end_ to relect the 16 slice struct disklabel OpenBSD uses.
Looks like only vax cares about this.

Revision 1.19 / (download) - annotate - [select for diffs], Tue Aug 8 16:03:16 2000 UTC (23 years, 10 months ago) by peter
Branch: MAIN
CVS Tags: OPENBSD_2_8_BASE, OPENBSD_2_8
Changes since 1.18: +4 -1 lines
Diff to previous 1.18 (colored)

add a 'RAID' filesystem type for RAIDframe updates - coming next

Revision 1.18 / (download) - annotate - [select for diffs], Fri Apr 7 13:53:40 2000 UTC (24 years, 2 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_7_BASE, OPENBSD_2_7
Changes since 1.17: +6 -3 lines
Diff to previous 1.17 (colored)

add DISKMINOR(), and repair redefinitions

Revision 1.17 / (download) - annotate - [select for diffs], Mon Jan 11 10:23:42 1999 UTC (25 years, 5 months ago) by niklas
Branch: MAIN
CVS Tags: kame_19991208, SMP_BASE, OPENBSD_2_6_BASE, OPENBSD_2_6, OPENBSD_2_5_BASE, OPENBSD_2_5
Branch point for: SMP
Changes since 1.16: +5 -1 lines
Diff to previous 1.16 (colored)

Add ATAPI and RAID types, compatibility with NetBSD

Revision 1.16 / (download) - annotate - [select for diffs], Sat Oct 3 21:19:01 1998 UTC (25 years, 8 months ago) by millert
Branch: MAIN
CVS Tags: OPENBSD_2_4_BASE, OPENBSD_2_4
Changes since 1.15: +2 -2 lines
Diff to previous 1.15 (colored)

Add a "spoofonly" argument to readdisklabel() which will be used to
implement an ioctl to get a spoofed label even for disks that have
a label on them.

Revision 1.15 / (download) - annotate - [select for diffs], Sun May 17 03:09:39 1998 UTC (26 years, 1 month ago) by mickey
Branch: MAIN
Changes since 1.14: +2 -1 lines
Diff to previous 1.14 (colored)

define DISKLABELDEV(dev) macro

Revision 1.14 / (download) - annotate - [select for diffs], Fri Feb 6 22:17:18 1998 UTC (26 years, 4 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_3_BASE, OPENBSD_2_3
Changes since 1.13: +4 -1 lines
Diff to previous 1.13 (colored)

add FS_CCD, make ccd prefer such partitions. It still accespts FS_BSDFFS, and something will change about that soon

Revision 1.13 / (download) - annotate - [select for diffs], Fri Aug 8 21:47:06 1997 UTC (26 years, 10 months ago) by niklas
Branch: MAIN
CVS Tags: OPENBSD_2_2_BASE, OPENBSD_2_2
Changes since 1.12: +3 -2 lines
Diff to previous 1.12 (colored)

Change the bounds_check_with_label API to also take a cpu_disklabel
reference for making transferral of meta-information possible from
readdisklabel to bounds_check_with_label.  The first (and maybe only)
thing that will use this is the multi-disklabel-format code on the
alpha where the labelsector is passed via cpu_disklabel so the label
write-protection can work correctly no matter what label was found.

Also use a new macro DKBAD to get at the dkbad field of the cpu_disklabel
implementations that contain it.  This too is for multi-disklabel
architectures where the "bad" field can be inside a union.  Use this
macro as a means for a driver to check if an architecture supports
dkbad constructs.

Remove proto of bounds_check_with_label from all MD disklabel.h as it
is in sys/disklabel.h.

I have not been able to test the changes everywhere, if I break anything
I apologize, and promise to fix it as soon as I become aware of it.

Revision 1.12 / (download) - annotate - [select for diffs], Sat May 31 06:17:10 1997 UTC (27 years ago) by deraadt
Branch: MAIN
Changes since 1.11: +5 -5 lines
Diff to previous 1.11 (colored)

kill spaces in fstypenames[] entries; abs@mono.org

Revision 1.11 / (download) - annotate - [select for diffs], Thu Dec 5 13:08:47 1996 UTC (27 years, 6 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_1_BASE, OPENBSD_2_1
Changes since 1.10: +5 -1 lines
Diff to previous 1.10 (colored)

proto iso_disklabelspoof() inside an #ifdef (no nicer place)

Revision 1.10 / (download) - annotate - [select for diffs], Tue Dec 3 01:06:50 1996 UTC (27 years, 6 months ago) by downsj
Branch: MAIN
Changes since 1.9: +26 -2 lines
Diff to previous 1.9 (colored)

Add readlabelfs()'s table, a shorter form of fstypenames.

Revision 1.9 / (download) - annotate - [select for diffs], Wed Nov 6 01:36:54 1996 UTC (27 years, 7 months ago) by deraadt
Branch: MAIN
Changes since 1.8: +3 -1 lines
Diff to previous 1.8 (colored)

FS_EXT2FS

Revision 1.8 / (download) - annotate - [select for diffs], Wed May 22 11:40:49 1996 UTC (28 years ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_2_0_BASE, OPENBSD_2_0
Changes since 1.7: +3 -1 lines
Diff to previous 1.7 (colored)

acorn filesystem addition

Revision 1.7 / (download) - annotate - [select for diffs], Thu May 2 13:14:51 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.6: +3 -2 lines
Diff to previous 1.6 (colored)

proto more stuff

Revision 1.6 / (download) - annotate - [select for diffs], Sun Apr 21 22:31:42 1996 UTC (28 years, 1 month ago) by deraadt
Branch: MAIN
Changes since 1.5: +6 -6 lines
Diff to previous 1.5 (colored)

partial sync with netbsd 960418, more to come

Revision 1.5 / (download) - annotate - [select for diffs], Tue Mar 19 21:10:47 1996 UTC (28 years, 2 months ago) by mickey
Branch: MAIN
Changes since 1.4: +7 -7 lines
Diff to previous 1.4 (colored)

Merging w/ NetBSD 021796.
speaker upgraded to the current.
some changes to the VM stuff (ie kern_thread.c added and so).

Revision 1.4 / (download) - annotate - [select for diffs], Sun Mar 3 12:11:33 1996 UTC (28 years, 3 months ago) by niklas
Branch: MAIN
Changes since 1.3: +1 -0 lines
Diff to previous 1.3 (colored)

From NetBSD: 960217 merge

Revision 1.3 / (download) - annotate - [select for diffs], Tue Feb 20 05:05:45 1996 UTC (28 years, 3 months ago) by briggs
Branch: MAIN
Changes since 1.2: +6 -6 lines
Diff to previous 1.2 (colored)

Not ready for LOCORE -> _LOCORE.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Feb 20 04:53:03 1996 UTC (28 years, 3 months ago) by briggs
Branch: MAIN
Changes since 1.1: +9 -29 lines
Diff to previous 1.1 (colored)

Merge in changes from NetBSD:
- Filesystem prototype changes
- LOCORE -> _LOCORE
- Move disk-specific ioctls out of <sys/disklabel.h> and into <sys/dkio.h>.
  <sys/dkio.h> is in turn included by <sys/ioctl.h>, much like how
  <sys/filio.h> and <sys/sockio.h> are handled.  This minimizes changes to
  existing sources which use the disk ioctls.
  Define DIOCLOCK which is used to lock and unlock the pack.

Revision 1.1.1.1 / (download) - annotate - [select for diffs] (vendor branch), Wed Oct 18 08:53:26 1995 UTC (28 years, 7 months ago) by deraadt
CVS Tags: netbsd_1_1
Changes since 1.1: +0 -0 lines
Diff to previous 1.1 (colored)

initial import of NetBSD tree

Revision 1.1 / (download) - annotate - [select for diffs], Wed Oct 18 08:53:26 1995 UTC (28 years, 7 months ago) by deraadt
Branch: MAIN

Initial revision

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.