summaryrefslogtreecommitdiffstats
path: root/lib/libdisk/tst01.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1995-04-29 01:55:25 +0000
committerphk <phk@FreeBSD.org>1995-04-29 01:55:25 +0000
commitf7bf327ed4f468193062d32f7b6bb2cc4b521e9b (patch)
tree18f4a0a2d2e1413fdf21f0dd954bae1ddab9657f /lib/libdisk/tst01.c
parent66c00a8f24111e84617ee4d9c63bce82a6738d38 (diff)
downloadFreeBSD-src-f7bf327ed4f468193062d32f7b6bb2cc4b521e9b.zip
FreeBSD-src-f7bf327ed4f468193062d32f7b6bb2cc4b521e9b.tar.gz
Sanitize and explain a little bit... Implement the first rules...
Diffstat (limited to 'lib/libdisk/tst01.c')
-rw-r--r--lib/libdisk/tst01.c39
1 files changed, 5 insertions, 34 deletions
diff --git a/lib/libdisk/tst01.c b/lib/libdisk/tst01.c
index bcc1344..9320356 100644
--- a/lib/libdisk/tst01.c
+++ b/lib/libdisk/tst01.c
@@ -14,37 +14,8 @@
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
-#include <sys/ioctl.h>
-#include <sys/disklabel.h>
-#include <sys/diskslice.h>
-#include <sys/queue.h>
#include "libdisk.h"
-void
-fprint_diskslices(FILE *fi, struct diskslices *ds)
-{
- int i;
-
- printf("@%p: struct diskslices\n",ds);
- printf("\tdss_first_bsd_slice = %d\n",ds->dss_first_bsd_slice);
- printf("\tdss_nslices = %d\n",ds->dss_nslices);
- for(i=0;i<ds->dss_nslices;i++) {
- printf("\tdss_slices[%d] = struct diskslice",i);
- if (i == 0)
- printf(" /* FreeBSD compatibility slice */\n");
- else if (i == 1)
- printf(" /* Whole disk slice */\n");
- else if (i < 6)
- printf(" /* Primary MBR slice %d */\n",i-1);
- else
- printf("\n");
- printf("\t\tds_offset = %lu\n",ds->dss_slices[i].ds_offset);
- printf("\t\tds_size = %lu\n",ds->dss_slices[i].ds_size);
- printf("\t\tds_type = %u\n",ds->dss_slices[i].ds_type);
- printf("\t\tds_openmask = %u\n",ds->dss_slices[i].ds_openmask);
- }
-}
-
int
main(int argc, char **argv)
{
@@ -55,12 +26,12 @@ main(int argc, char **argv)
d = Open_Disk(argv[i]);
if (!d) continue;
Debug_Disk(d);
- Delete_Chunk(d,0,4108599,freebsd);
- Debug_Disk(d);
- printf("Create=%d\n",Create_Chunk(d,0,32768,fat,0,0));
- printf("Create=%d\n",Create_Chunk(d,192512,409600,freebsd,0,0));
- printf("Create=%d\n",Create_Chunk(d,192512,409600,part,0,0));
+ if (d->chunks->size == 1411200)
+ Set_Bios_Geom(d,1024,15,63);
+ else
+ Set_Bios_Geom(d,2003,64,32);
Debug_Disk(d);
+ printf("<%s>\n",CheckRules(d));
}
exit (0);
}
OpenPOWER on IntegriCloud