Commit Graph

25 Commits

Author SHA1 Message Date
Poul-Henning Kamp
68283a9b5a Remove unused variable.
Found by:       FlexeLint
2003-05-31 19:28:53 +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
7e28a78f0e Use le_uuid_dec() since GPT UUID's are always in LE format.
Tested by:      Marcel
2003-05-31 16:48:43 +00:00
Poul-Henning Kamp
c9c29450f5 Use g_slice_spoiled() instead of g_std_spoiled().
Add XXX comment about minor memory leak until I can fix it.
2003-05-02 08:33:26 +00:00
Poul-Henning Kamp
c4da4e46b2 Back out all the stuff that didn't belong in the last commit. 2003-05-02 06:42:59 +00:00
Poul-Henning Kamp
e65ab0f83f Use g_slice_spoiled() rather than g_std_spoiled().
Remember to free the buffer we got from g_read_data().
2003-05-02 06:36:14 +00:00
Marcel Moolenaar
b52e9eb6b6 Don't emulate a MBR by handling the MBR::type attribute. It is
not needed at all. The BSD class will attach to a GPT class without
it.
2003-05-01 01:51:28 +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
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
Warner Losh
a163d034fa Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
Alfred Perlstein
44956c9863 Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
Poul-Henning Kamp
2cc40a38a8 Constify the dumpconf() function. 2002-12-17 07:22:48 +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
Marcel Moolenaar
0df5787813 Fix dumpconf so libdisk can grok its output. We weren't checking
if indent was NULL. Consequently we always emitted the XML format.
2002-11-02 11:45:54 +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
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
af820f158f Remove unneeded #include <sys/disklabel.h>
Sponsored by:	DARPA & NAI Labs.
2002-09-20 17:00:24 +00:00
Marcel Moolenaar
c2926e2329 Use 'p' as the partition specifier instead of 's'. We continue to use
's' for compatibility partitions (ie partitions with a BSD disklabel).
Partition numbers continue to start with 1.
Example /etc/fstab:
	# Device        Mountpoint      FStype          Options	...
	/dev/da0p1      /efi            msdos           rw	...
	/dev/da0p2      /               ufs             rw	...
	/dev/da0p3      none            swap            sw	...
2002-08-24 22:42:16 +00:00
Poul-Henning Kamp
503abe4540 Improve some on the naming.
Submitted by:	iedowse
2002-06-09 10:57:34 +00:00
Marcel Moolenaar
fd8706be29 Add compile time asserts for the size of struct gpt_hdr and struct
gpt_ent. Use offsetof() for struct gpt_hdr to exclude padding.
2002-05-30 06:33:07 +00:00
Poul-Henning Kamp
f4258597dc Add one copy of crc32() and crc32_tab[] in libkern, and remove it two other
places.

Comment out crc32 related definitions in zlib.h, we don't seem to have the
corresponding code in our kernel.
2002-05-29 20:24:09 +00:00
Marcel Moolenaar
bcd46c600a Add support to GEOM for GUID Partition Tables (GPTs). The support
is currently conditional on both the GEOM and GEOM_GPT options to
avoid getting GPT by default and having the MBR and GPT classes
clash.
The correct behaviour of the MBR class would be to back-off (reject)
a MBR if it's a Protective MBR (a MBR with a single partition of type
0xEE that spans the whole disk (as far as the MBR is concerned).
The correct behaviour if the GPT class would be to back-off (reject)
a GPT if there's a MBR that's not a Protective MBR.

At this stage it's inconvenient to destroy a good MBR when working
with GPTs that it's more convenient to have the MBR class back-off
when it detects the GPT signature on disk and have the GPT class
ignore the MBR.

In sys/gpt.h UUIDs (GUIDs) for the following FreeBSD partitions
have been defined:

GPT_ENT_TYPE_FREEBSD
	FreeBSD slice with disklabel. This is the equivalent of
	the well-known FreeBSD MBR partition type.
GPT_ENT_TYPE_FREEBSD_{SWAP|UFS|UFS2|VINUM}
	FreeBSD partitions in the context of disklabel. This is
	speculating on the idea to use the GPT to hold partitions
	instead if slices and removing the fixed (and low) limits
	we have on the number of partitions.

This commit lacks a GPT image for the regression suite.
2002-05-28 09:04:48 +00:00