diff --git a/format/main.c b/format/main.c index c226f0f..5eb408e 100644 --- a/format/main.c +++ b/format/main.c @@ -33,6 +33,7 @@ #include #include "ubixfs.h" +#include "superblock.h" static void usage() { fprintf(stderr, "usage: format [-q] disk [slice]\n"); @@ -41,7 +42,8 @@ int main(int argc,char **argv) { FILE *fd; - struct ubixDiskLabel *d = (struct ubixDiskLabel *)malloc(512); + struct ubixDiskLabel *d = (struct ubixDiskLabel *)malloc(512); + ubixfs_superBlock *sb = (ubixfs_superBlock *)malloc(sizeof(ubixfs_superBlock)); int ch = 0x0; int i = 0x0; int x = 0x0; @@ -146,11 +148,17 @@ fclose(fd); printf("Format Complete\n"); + free(d); + free(sb); + return(0); } /*** $Log$ + Revision 1.1 2004/09/01 09:26:13 reddawg + frame works are laid out + END ***/ diff --git a/include/superblock.h b/include/superblock.h index fac50cd..831e8d5 100644 --- a/include/superblock.h +++ b/include/superblock.h @@ -1,8 +1,6 @@ #ifndef SUPERBLOCK_H #define SUPERBLOCK_H -#include - typedef struct blockRun { int allocationGroup __attribute__ ((packed)); unsigned short start __attribute__ ((packed)); @@ -17,7 +15,7 @@ typedef unsigned long long uInt64; typedef signed long long int64; -typedef struct diskSuperBlock { +typedef struct { char name[32] __attribute__ ((packed)); int32 magic1 __attribute__ ((packed)); int32 fsByteOrder __attribute__ ((packed)); @@ -43,7 +41,7 @@ int32 flags __attribute__ ((packed)); // journal information - blockRun logBlocks __attribute__ ((packed)); + inodeAddr logBlocks __attribute__ ((packed)); off_t logStart __attribute__ ((packed)); off_t logEnd __attribute__ ((packed)); @@ -57,6 +55,6 @@ int32 pad[94] __attribute__ ((packed)); -} diskSuperBlock; +} ubixfs_superBlock; #endif // !SUPERBLOCK_H