Commit Graph

43 Commits

Author SHA1 Message Date
Poul-Henning Kamp
497c334767 Simplify the ioctl handling in GEOM.
This replaces the current ioctl processing with a direct call path
from geom_dev() where the ioctl arrives (from SPECFS) to any directly
connected GEOM class.

The inverse of the above is no longer supported.  This is the
situation were you have one or more intervening GEOM classes, for
instance a BSDlabel on top of a MBR or PC98.  If you want to issue
MBR or PC98 specific ioctls, you will need to issue them on a MBR
or PC98 providers.

This paves the way for inviting CD's, FD's and other special cases
inside GEOM.
2003-09-01 20:45:32 +00:00
David E. O'Brien
50b1faef38 Use __FBSDID().
Approved by:	phk
2003-06-11 06:49:16 +00:00
Poul-Henning Kamp
b77052e617 Remove unused variable.
Remove unneeded return;

Found by:       FlexeLint
2003-05-31 19:41:33 +00:00
Poul-Henning Kamp
f075585f67 Remove the G_CLASS_INITIALIZER, we do not need it anymore. 2003-05-31 16:59:27 +00:00
Poul-Henning Kamp
4f806d2428 Use g_slice_spoiled() not g_std_spoiled() 2003-05-02 06:34:51 +00:00
Yoshihiro Takahashi
4b4582a84c Remove DIOCGPC98 ioctl. 2003-05-01 14:40:16 +00:00
Yoshihiro Takahashi
50cf98ed97 - Move decoding pc98_partition function into geom_pc98_enc.c.
- Add encoding pc98_partition function.
2003-05-01 13:44:24 +00:00
Poul-Henning Kamp
8cd1535a24 Rename g_call_me() to g_post_event(), and give it a flag
argument to determine if we can M_WAITOK in malloc.
2003-04-23 20:46:12 +00:00
Poul-Henning Kamp
3924ad705e Time has run from the "run GEOM in userland" harness, and the new regression
test is built to test GEOM as running in the kernel.

This commit is basically "unifdef -D_KERNEL" to remove the mainly #include
related code to support the userland-harness.
2003-04-13 09:02:06 +00:00
Poul-Henning Kamp
0d3e96e39c Retire the "frontstuff" record keeping, it was no match for the
in-band meta-data of BSD labels and a more complex solution will be needed.
2003-04-12 08:41:26 +00:00
Poul-Henning Kamp
551e52efb8 With the magic sequence checks removed this class is downright dangerous
to have in your kernel since it indiscriminately attaches to anything
it is offered with a range of bogus partitions.

Stop this from happening by rejecting any label with negative numbers in
it.
2003-04-09 13:08:36 +00:00
Poul-Henning Kamp
2692cc08db Style issue: use do {...} while(0); for multi-exit section. 2003-04-09 08:56:26 +00:00
Poul-Henning Kamp
76c4109ebb #include <sys/endian.h> as needed. 2003-04-03 11:56:10 +00:00
Poul-Henning Kamp
d8cb8a5137 Use <sys/endian.h> instead of geom_enc.c for endianess-agnostification. 2003-04-03 11:36:53 +00:00
Poul-Henning Kamp
316aed030e Add handling for cancelled events in the g_call_me() methods. 2003-04-02 21:10:04 +00:00
Poul-Henning Kamp
afcbcfaed0 Change events to have an array of "void *" references, and give the
event posting functions varargs to fill these.

Attribute g_call_me() to appropriate g_geom's where necessary.

Add a flag argument to g_call_me() methods which will be used to signal
cancellation of events in the future.

This commit should be a no-op.
2003-04-02 20:41:18 +00:00
Poul-Henning Kamp
c138fec0b5 Premptively change initializations of struct g_class to use C99
sparse struct initializations before we extend the struct with
new OAM related member functions.
2003-03-24 19:30:15 +00:00
Poul-Henning Kamp
72384683ad In userland case include <errno.h>, not <err.h>. This is needed to make
the src/tools/regression/geom stuff compile.
2003-01-06 20:05:45 +00:00
Yoshihiro Takahashi
404a379e4a Rename the dos_partition structure for pc98 to pc98_partition. 2003-01-04 08:50:48 +00:00
Yoshihiro Takahashi
05f0a5a323 MFMBR: Add ioctls for writing an IPL and a boot menu. 2003-01-03 07:13:36 +00:00
Poul-Henning Kamp
dd0879a966 Don't mangle geometry for pc98, this will happen in the ata driver. 2002-12-17 15:50:51 +00:00
Poul-Henning Kamp
a1d5f791fa Get rid of g_slice_addslice() and use g_slice_config() instead.
Tested with:	i386 + src/tools/regression/geom
2002-12-16 23:08:48 +00:00
Poul-Henning Kamp
0f9d3dba37 Constification and some s/int/u_int/ changes. 2002-12-16 22:33:27 +00:00
Søren Schmidt
8ba4488cea Add support for the PC98 platform to the ATA driver.
This mostly consists of functionality to serialize accesses to
the two ATA channels (which can also be used to "fix" certain
PCI based controllers).
Add support for Acard controllers.
Enable the ATA driver in PC98 GENERIC, and add device hints.
Update man page with latest support.

The PC98 core team has kindly provided me with a PC98
machine that made this all possible, thanks to all that
contributed to that effort, without that this would
probably newer have been possible..

Approved by: re@
2002-12-03 20:20:44 +00:00
Yoshihiro Takahashi
8a529159ad Save a slice name on the disk and print it at g_pc98_dumpconf(). 2002-11-17 13:56:37 +00:00
Yoshihiro Takahashi
962cf6f7bb Fix to support pc98.
It is mostly merged from MBR specific part.

Reviewed by:	phk
2002-11-07 16:42:37 +00:00
Poul-Henning Kamp
4b787a3959 Reject slices where begin == end.
Remove clause 3 from the license with NAI Labs consent.

Sponsored by:	DARPA & NAI Labs
2002-11-04 06:30:38 +00:00
Poul-Henning Kamp
b2758b2f23 Don't truncate on large disks. 2002-10-27 10:17:38 +00:00
Poul-Henning Kamp
077f9aa12e Make geom_mbr.c optional on PC98, use GEOM_MBR option to include it.
Disable check for supposedly magic "IPL1" string for PC98 labels, its
thaumaturgical power is in doubt.
2002-10-26 20:17:59 +00:00
Poul-Henning Kamp
3d5500fc51 Reduce the GEOM verbosity under bootverbose to something more sufferable.
This is not quite the set of information I would want, but the tree where
I have the "correct" version is messed up with conflicts.

Sponsored by:	DARPA & NAI Labs.
2002-10-25 20:09:45 +00:00
Poul-Henning Kamp
3f12caa180 Now that the sectorsize and mediasize are properties of the provider,
don't take the detour over the I/O path to discover them using getattr(),
we can just pick them out directly.

Do note though, that for now they are only valid after the first open
of the underlying disk device due compatibility with the old disk_create()
API.  This will change in the future so they will always be valid.

Sponsored by:   DARPA & NAI Labs.
2002-10-20 20:28:24 +00:00
Poul-Henning Kamp
48444d6262 Make the sectorsize a property of providers so we can include it in the XML
output.

Sponsored by:	DARPA & NAI Labs
2002-10-20 19:18:07 +00:00
Poul-Henning Kamp
14ac6812b9 Use %jd instead of %lld now that we have it. 2002-10-20 18:48:12 +00:00
Poul-Henning Kamp
4ae677009e Style, whitespace and lint fixes.
Sponsored by:	DARPA & NAI Labs.
2002-09-28 11:57:20 +00:00
Poul-Henning Kamp
5a6baf5457 Add the new g_slice_config() call, which can add/delete/change a slice,
with support for trying, doing and forcing.

This will eventually replace g_slice_addslice() which gets changed from
grabbing topology to requing it in this commit as well.

Sponsored by:   DARPA & NAI Labs.
2002-09-27 21:37:11 +00:00
Poul-Henning Kamp
f3bbbfe2df Correctly calculate size of PC98 slices.
Sponsored by:	DARPA & NAI Labs.
2002-09-27 20:56:21 +00:00
Poul-Henning Kamp
c51f3753df "Fix" printf format issues by using %j
Sponsored by:	DARPA & NAI Labs.
2002-09-13 11:41:25 +00:00
Poul-Henning Kamp
503abe4540 Improve some on the naming.
Submitted by:	iedowse
2002-06-09 10:57:34 +00:00
Poul-Henning Kamp
3abe4a80a5 Remove the "-class" suffix from classes, they will not be ambiguous.
Sponsored by:	DARPA & NAI Labs.
2002-05-21 19:50:04 +00:00
Poul-Henning Kamp
1bdb20a68e Implement DIOCGFRONTSTUFF ioctl which reports how many bytes from the start
of the device magic stuff might occupy.

Sponsored by: DARPA & NAI Labs.
2002-04-09 15:43:32 +00:00
Poul-Henning Kamp
c7b1a1d1c3 Various stylistic nit picking.
Sponsored by: DARPA & NAI Labs.
2002-04-09 15:17:59 +00:00
Poul-Henning Kamp
07d77fc610 Move access and orphan member functions from class to geom.
Sponsored by: DARPA & NAI Labs
2002-04-04 09:54:13 +00:00
Poul-Henning Kamp
d93b7c5dcd Add preliminary PC98 class to GEOM.
I have not been able to find very much information about the PC98
extended partition layout so this is gleaned from the source in
our pc98 architecture.  Corrections and patched very welcome.

Sponsored by: DARPA and NAI Labs.
2002-03-28 21:38:38 +00:00