#define	DOSPTYP_UBX	 0xAD	/* UbixFS partition type */
#define UBIXDISKMAGIC    ((u_int32_t)0x45) /* The disk magic number */
#define MAXUBIXPARTITIONS 16
#define UBIXFSMAGIC      ((u_int32_t)0x69) /* The File System Magic Number */

typedef unsigned long uLong;
typedef unsigned short uShort;


struct ubixDiskLabel {
  u_int32_t magicNum;
  u_int32_t magicNum2;
  u_int16_t driveType;
  u_int16_t numPartitions;
  struct  ubixPartitions {             /* the partition table */
    u_int32_t p_size;       /* number of sectors in partition */
    u_int32_t p_offset;     /* starting sector */
    u_int32_t p_fsize;      /* filesystem basic fragment size */
    u_int32_t p_bsize;      /* BAT size */
    u_int8_t p_fstype;      /* filesystem type, see below */
    u_int8_t p_frag;        /* filesystem fragments per block */
        } partitions[MAXUBIXPARTITIONS];
  };

//Block Allocation Table Entry
struct blockAllocationTableEntry {
  long attributes; //Block Attributes
  long realSector; //Real Sector  
  long nextBlock;  //Sector Of Next Block
  long reserved;   //Reserved
  };


struct directoryEntry {
  uLong  startCluster;   //Starting Cluster Of File
  uLong  size;           //Size Of File
  uLong  creationDate;  //Date Created
  uLong  lastModified;  //Date Last Modified
  uLong  uid;           //UID Of Owner
  uLong  gid;           //GID Of Owner
  uShort attributes;    //Files Attributes
  uShort permissions;   //Files Permissions
  char   fileName[256]; //File Name
  };
