Date: Thu, 23 Dec 2004 11:44:37 -0500 From: "Walt Haynes" <whaynes@ptd.net> To: "freebsd questions" <freebsd-questions@FreeBSD.org> Subject: "max one 'fat' allowed as child of whole" Message-ID: <000701c4e90e$b7593fb0$52809842@walt>
next in thread | raw e-mail | index | archive | help
I found the following as the result of a search for the string "max = one 'fat' allowed" at the following URL: http://www.watson.org/~arr/sri-audit/src/lib/libdisk/rules.c /* * = -------------------------------------------------------------------------= --- * "THE BEER-WARE LICENSE" (Revision 42): * <phk@login.dknet.dk> wrote this file. As long as you retain this = notice you * can do whatever you want with this stuff. If we meet some day, and you = think * this stuff is worth it, you can buy me a beer in return. = Poul-Henning Kamp * = -------------------------------------------------------------------------= --- * * $FreeBSD$ * */ #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <sys/types.h> #include <sys/diskslice.h> #include <sys/disklabel.h> #include <err.h> #include "libdisk.h" int Track_Aligned(struct disk *d, u_long offset) { if (!d->bios_sect) return 1; if (offset % d->bios_sect) return 0; return 1; } u_long Prev_Track_Aligned(struct disk *d, u_long offset) { if (!d->bios_sect) return offset; return (offset / d->bios_sect) * d->bios_sect; } u_long Next_Track_Aligned(struct disk *d, u_long offset) { if (!d->bios_sect) return offset; return Prev_Track_Aligned(d,offset + d->bios_sect-1); } int Cyl_Aligned(struct disk *d, u_long offset) { if (!d->bios_sect || !d->bios_hd) return 1; if (offset % (d->bios_sect * d->bios_hd)) return 0; return 1; } u_long Prev_Cyl_Aligned(struct disk *d, u_long offset) { if (!d->bios_sect || !d->bios_hd) return offset; return (offset / (d->bios_sect*d->bios_hd)) * d->bios_sect * d->bios_hd; } u_long Next_Cyl_Aligned(struct disk *d, u_long offset) { if (!d->bios_sect || !d->bios_hd) return offset; return Prev_Cyl_Aligned(d,offset + (d->bios_sect * d->bios_hd)-1); } /* /* * Rule#2: * Max one 'fat' as child of 'whole' */ void Rule_002(struct disk *d, struct chunk *c, char *msg) { int i; struct chunk *c1; if (c->type !=3D whole) return; for (i=3D0, c1=3Dc->part; c1; c1=3Dc1->next) { if (c1->type !=3D fat) continue; i++; } if (i > 1) { sprintf(msg+strlen(msg), "Max one 'fat' allowed as child of 'whole'\n"); } } /* I don't understand what this means; does it imply that you can't have a = multiple operating system with a non-FreeBSD OS ? I have Windows XP = Professional in primary partition 1 of 4 primary partitions on my hard = drive. Partitions 2 and 4 are available to accept FreeBSD but won't = because of that "max one 'fat' allowed as child of whole" message. Is = there a circumvention to this problem ?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?000701c4e90e$b7593fb0$52809842>