| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
ok mpi@ kspillner@
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
after discussions with beck deraadt kettenis.
|
|
|
|
|
|
| |
From Markus Mueller.
ok krw@ miod@ tedu@
|
|
|
|
|
|
|
|
| |
Now, for kernel to "reboot" (reboot, halt, or shutdown), MD boot(9) is called
in some places. This change introduces a new MI function reboot(9) which is
simply a wrapper to call MD boot(9).
OK kettenis@ deraadt@
|
|
|
|
| |
deraadt says go ahead
|
|
|
|
|
|
|
|
| |
replace the OpenBSD bounds with the A6 MBR partition limits. Thus
preserving any changes the user makes with the 'b' command in
disklabel.
Reported, tested & ok blambert@, ok deraadt@
|
|
|
|
| |
ok phessler@ deraadt@ jsing@ guenther@
|
|
|
|
|
|
|
|
| |
For now and until 5.5 is cut, also read from current/incorrect spot
so people don't immediately lose their existing disklabels on such
devices.
Problem spotted by David Vasek.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
safely remove disksort.
most hardware and pretty much all of the kernel has moved to logical
block addressing when dealing with disks, so the assumptions disksort
was built against arent useful these days. it also has bad edge cases
with lots of sequential writes being able to starve other io requests
in the system. these issues have been addressed by becks nscan
implementation, which disksort was previously deprecated in favour
of.
this removes the guts of disksort and the bufq wrapper around it.
ok miod@
|
| |
|
|
|
|
|
|
| |
variables. Some random whitespace/knf repairs encountered on the way.
ok miod@ on inspection, feedback & more suggestions from millert@
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
|
|
|
| |
diskerr() messages by doing DL_SECTOBLK() dance repeatedly.
|
|
|
|
|
| |
values rather than daddr_t values. So use u_int64_t to store them
and %llu to print them in checkdisklabel().
|
|
|
|
|
|
|
|
|
|
|
|
| |
values for the p_fragblock and p_cpg fields. But we were saving the
info for open partitions only. Instead, look at all partitions.
And stop discarding the new partition type.
In addition to general betterness, this lets you change the RAW_PART
partition (a.k.a. 'c') to UNUSED. This problem was pointed out by
Federico Giannici via misc@.
ok otto@
|
|
|
|
| |
tested on vax (gcc3) ok miod@
|
|
|
|
|
|
| |
this is necessary to enable -Wformat or -Wno-error=format
ok deraadt@
|
|
|
|
|
| |
test period; i think 3 years ago the last bugs fell out.
ok otto beck others
|
|
|
|
|
|
|
|
| |
the random pool as unique-esque-but-not-secret data.
inspired by conversations with tedu@/deraadt@
ok deraadt@
|
|
|
|
|
|
| |
in MI code; gcc 2.95 does not accept such annotation for function pointer
declarations, only function prototypes.
To be uncommented once gcc 2.95 bites the dust.
|
|
|
|
|
|
| |
function pointer arguments which are {used as,} wrappers around the kernel
printf function.
No functional change.
|
|
|
|
|
|
|
|
|
|
| |
the 0x55aa signature. Don't try FAT detection if we have found an
OpenBSD MBR partition. Don't try to read a disklabel from 'bare'
FAT media. There can't be one.
Finally, don't allow the writing of a disklabel on 'bare' FAT media.
There is no safe spot for it, and splatting it in the middle of the
FAT structures has not proved helpful.
|
|
|
|
| |
'fattest' to 'mbrtest'. No change to .o.
|
|
|
|
|
|
| |
actually doing so before using them
OK deraadt@, krw@
|
|
|
|
|
|
|
| |
the message less scary and print out the failing devices to improve
troubleshooting.
ok jsing@
|
|
|
|
|
|
|
|
| |
callback for this disk.
Fixes an issue found by krw on macppc.
ok krw@
|
|
|
|
|
|
| |
to locate the root via DUID.
ok krw@
|
| |
|
|
|
|
| |
select root.
|
|
|
|
|
|
|
|
|
|
|
| |
via the boot device. This allows root on softraid to work on most
architectures. For architectures that cannot clearly identify their boot
device, the DUID of the boot disk can still be passed from the boot loader,
as is already done for amd64 and i386.
Based on a suggestion from kettenis@
ok krw@
|
|
|
|
| |
us to play some tricks in setroot().
|
|
|
|
|
|
|
|
|
| |
if we correctly read and validated the disklabel. Always check that this
flag is set before using the DUID from the disklabel.
Discussed with deraadt@
ok krw@
|
|
|
|
|
|
| |
generate one.
ok krw@
|
|
|
|
|
| |
can get at it.
ok jsing
|
|
|
|
|
| |
implementation does not support it and handles it as `h'.
ok jsing@
|
|
|
|
| |
ok matthew@
|
|
|
|
|
| |
read a native label fails. Reset B_ERROR/b_error on buf to ensure any i/o failure on
that first attempt is forgiven. A la the dkcsum() fix to recover from a disk error.
|
|
|
|
|
|
|
|
|
|
|
|
| |
that they're implemented consistently in bounds_check_with_label().
Also, per krw's request, change bounds_check_with_label() to return 0
if the checks succeed, and change the drivers to test == -1 instead of
<= 0. (Man page update to follow; intentionally omitting
arch/vax/mba/hp.c from this commit because it doesn't even build
currently and miod@ promises to kill it soon.)
ok krw@
|
|
|
|
|
|
| |
bounds_check_with_label() and generally cleanup the code while here.
ok krw@ ("I like this a *lot*"); "i like it" tedu@
|
|
|
|
|
|
| |
subr_disk.c. For now just the MI disk drivers.
ok deraadt@, krw@; jsing@ liked the approach too
|
|
|
|
| |
ok deraadt@
|
|
|
|
|
|
| |
interrupted by signals.
ok deraadt@
|
|
|
|
| |
ok deraadt@
|
|
|
|
|
|
|
|
|
| |
never done anything in OpenBSD and just clutters disk drivers with
silly flag handling.
More cleanup to follow.
ok deraadt@, millert@; no objections krw@
|
|
|
|
|
|
|
|
|
| |
issue in disk_attach_callback. Assumes that the struct disk is part
of the driver's softc, but this is always true in practice.
Still other scary use-after-free races lying around here though...
ok jsing@, deraadt@
|
| |
|