summaryrefslogtreecommitdiffstats
path: root/sys/geom/geom_mbr.c
Commit message (Collapse)AuthorAgeFilesLines
* Don't pass error value pointer to g_read_data(9) at all if we don'tsobomax2005-11-301-2/+2
| | | | | | have any use of it. Suggested by: pjd
* Check for g_read_data(9) errors properly:sobomax2005-11-301-2/+2
| | | | | | | | | | o The only indication of error condition is NULL value returned by the function; o value pointed to by error argument is undefined in the case when operation completes successfully. Discussed with: phk
* Implement a gctl handler and the verb "write MBR" which can be used tophk2005-07-151-5/+55
| | | | | | update metadata and bootcode while the MBR is in use. MFC candidate
* Do not attach MBR on top of an MBR. This removes some confusingphk2005-03-141-0/+2
| | | | | | slice names on disks with extended partitions. Spotted on: Mother-in-laws computer.
* Protect against recursive slices creation in simlar way as it is donepjd2005-01-201-7/+33
| | | | | | | | | | in BSD class, ie. if provider below us uses the same metadata, don't create slices based on the metadata. This allows to create slices on geoms with rank != 1 without hacks. Discussed with: phk Approved by: phk MFC after: 2 weeks
* Pass the file->flags down to geom ioctl handlers.phk2004-12-121-1/+4
| | | | | | | | Reject certain ioctls if write permission is not indicated. Bump geom API version. Reported by: Ruben de Groot <mail25@bzerk.org>
* Fix a long standing bug in geom_mbr which is only now exposed by thephk2004-11-281-4/+14
| | | | | | | | | | | | | | | correct open/close behaviour of filesystems: When an ioctl to modify the MBR arrives, we cannot take for granted that we have the consumer open. The symptom is that one cannot run 'boot0cfg -s2 /dev/ad0' in single-user mode because / is the only open partition in only open r1w0e1. If it is not, we attempt to increase the write count by one and decrease it again afterwards. Presumably most if not all other slices suffer from the same problem.
* Stop dumping the MBR entries under bootverbosephk2004-11-031-2/+2
|
* Tag all geom classes in the tree with a version number.phk2004-08-081-0/+2
|
* Use default method initialization on geoms.phk2004-08-081-3/+3
|
* Allow slice creation on providers from MIRROR class.pjd2004-07-311-0/+1
| | | | This should allow mounting root file system from a mirror.
* Allow to create slices on providers from class LABEL and class NOP.pjd2004-07-301-1/+5
| | | | | | | | This is really ugly way to do this, but there is no other way for now. It allows to mount root file system from providers which belong to those classes. Approved by: phk
* Remove the absolute count g_access_abs() function since experience hasphk2004-02-121-2/+2
| | | | | | | | | | | | shown that it is not useful. Rename the relative count g_access_rel() function to g_access(), only the name has changed. Change all g_access_rel() calls in our CVS tree to call g_access() instead. Add an #ifndef BURN_BRIDGES #define of g_access_rel() for source code compatibility.
* Simplify the ioctl handling in GEOM.phk2003-09-011-53/+21
| | | | | | | | | | | | | | | 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.
* Implement DOSPTYP_EXTLBA more completely: loop until we find no morephk2003-07-291-1/+2
| | | | | | | partitions. Submitted by: Rudolf Cejka <cejkar@fit.vutbr.cz> PR: 53719
* Use __FBSDID().obrien2003-06-111-2/+3
| | | | Approved by: phk
* Remove unused variable.phk2003-05-311-6/+0
| | | | | | Remove unneeded return. Found by: FlexeLint
* Remove the G_CLASS_INITIALIZER, we do not need it anymore.phk2003-05-311-2/+0
|
* Use g_slice_spoiled().phk2003-05-021-3/+5
| | | | Free buffer from g_read_data().
* Back out all the stuff that didn't belong in the last commit.phk2003-05-021-5/+3
|
* Use g_slice_spoiled() rather than g_std_spoiled().phk2003-05-021-3/+5
| | | | Remember to free the buffer we got from g_read_data().
* Rename g_call_me() to g_post_event(), and give it a flagphk2003-04-231-1/+1
| | | | argument to determine if we can M_WAITOK in malloc.
* Time has run from the "run GEOM in userland" harness, and the new regressionphk2003-04-131-9/+0
| | | | | | | 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.
* Retire the "frontstuff" record keeping, it was no match for thephk2003-04-121-2/+0
| | | | in-band meta-data of BSD labels and a more complex solution will be needed.
* Move the functions for encoding decoding struct dos_partition intophk2003-04-121-18/+2
| | | | a separate .c file so they can be used from userland as well.
* Only be verbose if (bootverbose)phk2003-04-091-3/+6
|
* Correctly split cyl/sects bytes when we print them.phk2003-04-091-2/+5
|
* Style issue: use do {...} while(0); for multi-exit section.phk2003-04-091-4/+4
|
* Retire the DIOCGMBR ioctl before anybody starts to use it.phk2003-04-031-5/+0
|
* Update the initializer for GEOM_MBREXT, I overlooked it previously.phk2003-04-031-3/+2
|
* Add #define for DOSPTYP_PMBR, and use it.phk2003-04-031-1/+1
|
* Use <sys/endian.h> instead of geom_enc.c for endianess-agnostification.phk2003-04-031-2/+3
|
* Add handling for cancelled events in the g_call_me() methods.phk2003-04-021-2/+5
|
* Change events to have an array of "void *" references, and give thephk2003-04-021-2/+2
| | | | | | | | | | | 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.
* Premptively change initializations of struct g_class to use C99phk2003-03-241-3/+2
| | | | | sparse struct initializations before we extend the struct with new OAM related member functions.
* Wrap a long line.phk2003-02-111-1/+2
|
* Remove commented out g_enc_dos_partition(). We won't be needing it.phk2003-01-311-18/+0
|
* Don't restrict MBR sectorsize to 512 bytes.phk2003-01-111-20/+23
| | | | Test data provided by: Andrey Koklin <aka@veco.ru>
* Implement ioctls for tampering with sector0.phk2002-12-291-27/+84
|
* Don't forget our topology lock in the MBREXT case.phk2002-12-191-0/+1
|
* Remember to hold topology lock when we change things.phk2002-12-171-0/+2
| | | | Spotted by: kuriyama
* Get rid of g_slice_addslice() and use g_slice_config() instead.phk2002-12-161-71/+82
| | | | Tested with: i386 + src/tools/regression/geom
* Constification and some s/int/u_int/ changes.phk2002-12-161-9/+9
|
* Remove clause 3 in the license with NAI's consent.phk2002-11-041-6/+6
| | | | | | | Reject slices with type==0. Diddle the bootverbose printfs. Sponsored by: DARPA & NAI Labs
* Remove the GEOM_GPT hack. We now check for partition type 0xEE andmarcel2002-11-021-25/+23
| | | | | | | | | | | | | | skip those. This handles the Protective MBR (PMBR) which consists of a single partition of type 0xEE that covers the whole disk and as such protects the GPT partitioning. We allow other partitions to be present besides partitions of type 0xEE and as such interpret partition type 0xEE as a "hands-off" partition only. While here, fix g_mbrext_dumpconf to test if indent is NULL and dump the data in a form that libdisk can grok. Change the logic in g_mbr_dumpconf to match that of g_mbrext_dumpconf. This does not change the output, but prevents a NULL-pointer dereference when indent == NULL && pp == NULL.
* Spruce up bootverbose output a bit.phk2002-10-311-17/+8
| | | | Allow extended partitions to have flag=0x80
* Add more compatibility junk.phk2002-10-281-3/+16
|
* Reduce the GEOM verbosity under bootverbose to something more sufferable.phk2002-10-251-3/+4
| | | | | | | 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.
* Now that the sectorsize and mediasize are properties of the provider,phk2002-10-201-6/+2
| | | | | | | | | | | 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.
* Make the sectorsize a property of providers so we can include it in the XMLphk2002-10-201-2/+4
| | | | | | output. Sponsored by: DARPA & NAI Labs
OpenPOWER on IntegriCloud