diff --git a/disklabel/main.c b/disklabel/main.c index 70f727c..474f6ec 100644 --- a/disklabel/main.c +++ b/disklabel/main.c @@ -97,10 +97,21 @@ printf("New Value: "); fgets((char *)&buf,256,stdin); d->partitions[i].p_offset = atoi(buf); + getFs: + printf("1) UbixFS, 2) UbixSWAP\n"); printf("d->partitions[%i].p_fstype = %i, ",i,d->partitions[i].p_fstype); printf("New Value: "); fgets((char *)&buf,256,stdin); - d->partitions[i].p_fstype = atoi(buf); + switch (atoi(buf)) { + case 1: + d->partitions[i].p_fstype = UBIX_UBIXFS_MAGIC; + break; + case 2: + d->partitions[i].p_fstype = UBIX_SWAP_MAGIC; + break; + default: + goto getFs; + } printf("d->partitions[%i].p_bsize = %i, ",i,d->partitions[i].p_bsize); printf("New Value: "); fgets((char *)&buf,256,stdin); @@ -131,6 +142,9 @@ /*** $Log$ + Revision 1.3 2004/09/01 07:56:52 reddawg + disklabel: works enough to test with + Revision 1.2 2004/09/01 06:48:23 reddawg no more gets();