1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 17 unchanged lines hidden (view full) --- 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/geom/geom_pc98.c 133314 2004-08-08 06:49:07Z phk $"); |
35 36#include <sys/param.h> 37#include <sys/endian.h> 38#include <sys/systm.h> 39#include <sys/kernel.h> 40#include <sys/malloc.h> 41#include <sys/bio.h> 42#include <sys/lock.h> --- 190 unchanged lines hidden (view full) --- 233 g_topology_assert(); 234 if (flags == G_TF_NORMAL && 235 !strcmp(pp->geom->class->name, PC98_CLASS_NAME)) 236 return (NULL); 237 gp = g_slice_new(mp, NDOSPART, pp, &cp, &ms, sizeof *ms, g_pc98_start); 238 if (gp == NULL) 239 return (NULL); 240 g_topology_unlock(); |
241 do { 242 if (gp->rank != 2 && flags == G_TF_NORMAL) 243 break; 244 error = g_getattr("GEOM::fwsectors", cp, &fwsectors); 245 if (error || fwsectors == 0) { 246 fwsectors = 17; 247 if (bootverbose) 248 printf("g_pc98_taste: guessing %d sectors\n", --- 28 unchanged lines hidden (view full) --- 277 return (NULL); 278 } 279 return (gp); 280} 281 282static struct g_class g_pc98_class = { 283 .name = PC98_CLASS_NAME, 284 .taste = g_pc98_taste, |
285 .dumpconf = g_pc98_dumpconf, 286 .ioctl = g_pc98_ioctl, |
287}; 288 289DECLARE_GEOM_CLASS(g_pc98_class, g_pc98); |