17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  *  GRUB  --  GRand Unified Bootloader
37c478bd9Sstevel@tonic-gate  *  Copyright (C) 2001   Free Software Foundation, Inc.
47c478bd9Sstevel@tonic-gate  *
57c478bd9Sstevel@tonic-gate  *  This program is free software; you can redistribute it and/or modify
67c478bd9Sstevel@tonic-gate  *  it under the terms of the GNU General Public License as published by
77c478bd9Sstevel@tonic-gate  *  the Free Software Foundation; either version 2 of the License, or
87c478bd9Sstevel@tonic-gate  *  (at your option) any later version.
97c478bd9Sstevel@tonic-gate  *
107c478bd9Sstevel@tonic-gate  *  This program is distributed in the hope that it will be useful,
117c478bd9Sstevel@tonic-gate  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
127c478bd9Sstevel@tonic-gate  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
137c478bd9Sstevel@tonic-gate  *  GNU General Public License for more details.
147c478bd9Sstevel@tonic-gate  *
157c478bd9Sstevel@tonic-gate  *  You should have received a copy of the GNU General Public License
167c478bd9Sstevel@tonic-gate  *  along with this program; if not, write to the Free Software
177c478bd9Sstevel@tonic-gate  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
187c478bd9Sstevel@tonic-gate  */
197c478bd9Sstevel@tonic-gate 
207c478bd9Sstevel@tonic-gate 
217c478bd9Sstevel@tonic-gate #ifndef VSTAFS_H
227c478bd9Sstevel@tonic-gate #define VSTAFS_H	1
237c478bd9Sstevel@tonic-gate 
247c478bd9Sstevel@tonic-gate 
257c478bd9Sstevel@tonic-gate #define LINE			16
267c478bd9Sstevel@tonic-gate #define BLOCK_SIZE		512
277c478bd9Sstevel@tonic-gate #define VSTAFS_START_DATA	320
287c478bd9Sstevel@tonic-gate 
297c478bd9Sstevel@tonic-gate struct bootrecord
307c478bd9Sstevel@tonic-gate {
317c478bd9Sstevel@tonic-gate   unsigned char flag;
327c478bd9Sstevel@tonic-gate   unsigned char s_sector;
337c478bd9Sstevel@tonic-gate   unsigned char s_head;
347c478bd9Sstevel@tonic-gate   unsigned char s_cylinder;
357c478bd9Sstevel@tonic-gate   unsigned char p_type;
367c478bd9Sstevel@tonic-gate   unsigned char e_sector;
377c478bd9Sstevel@tonic-gate   unsigned char e_head;
387c478bd9Sstevel@tonic-gate   unsigned char e_cylinder;
397c478bd9Sstevel@tonic-gate   unsigned long start_lba;
407c478bd9Sstevel@tonic-gate   unsigned long nr_sector_lba;
417c478bd9Sstevel@tonic-gate };
427c478bd9Sstevel@tonic-gate 
437c478bd9Sstevel@tonic-gate struct alloc
447c478bd9Sstevel@tonic-gate {
457c478bd9Sstevel@tonic-gate   unsigned long a_start;
467c478bd9Sstevel@tonic-gate   unsigned long a_len;
477c478bd9Sstevel@tonic-gate };
487c478bd9Sstevel@tonic-gate 
497c478bd9Sstevel@tonic-gate struct first_sector
507c478bd9Sstevel@tonic-gate {
517c478bd9Sstevel@tonic-gate   unsigned long fs_magic;
527c478bd9Sstevel@tonic-gate   unsigned long fs_size;
537c478bd9Sstevel@tonic-gate   unsigned long fs_extsize;
547c478bd9Sstevel@tonic-gate   unsigned long fs_free;
557c478bd9Sstevel@tonic-gate   struct  alloc fs_freesecs[0];
567c478bd9Sstevel@tonic-gate };
577c478bd9Sstevel@tonic-gate 
587c478bd9Sstevel@tonic-gate struct prot
597c478bd9Sstevel@tonic-gate {
607c478bd9Sstevel@tonic-gate   unsigned char len;
617c478bd9Sstevel@tonic-gate   unsigned char pdefault;
627c478bd9Sstevel@tonic-gate   unsigned char id[7];
637c478bd9Sstevel@tonic-gate   unsigned char bits[7];
647c478bd9Sstevel@tonic-gate };
657c478bd9Sstevel@tonic-gate 
667c478bd9Sstevel@tonic-gate struct fs_file
677c478bd9Sstevel@tonic-gate {
687c478bd9Sstevel@tonic-gate   unsigned long prev;
697c478bd9Sstevel@tonic-gate   unsigned long rev;
707c478bd9Sstevel@tonic-gate   unsigned long len;
717c478bd9Sstevel@tonic-gate   unsigned short type;
727c478bd9Sstevel@tonic-gate   unsigned short nlink;
737c478bd9Sstevel@tonic-gate   struct prot pprot;
747c478bd9Sstevel@tonic-gate   unsigned int owner;
757c478bd9Sstevel@tonic-gate   unsigned int extents;
767c478bd9Sstevel@tonic-gate   struct alloc blocks[32];
777c478bd9Sstevel@tonic-gate   long fs_ctime, fs_mtime; /* it is not lon but time_t */
787c478bd9Sstevel@tonic-gate   char pad[16];
797c478bd9Sstevel@tonic-gate   char data[0];
807c478bd9Sstevel@tonic-gate };
817c478bd9Sstevel@tonic-gate 
827c478bd9Sstevel@tonic-gate struct dir_entry
837c478bd9Sstevel@tonic-gate {
847c478bd9Sstevel@tonic-gate   char name[28];
857c478bd9Sstevel@tonic-gate   unsigned long start;
867c478bd9Sstevel@tonic-gate };
877c478bd9Sstevel@tonic-gate 
887c478bd9Sstevel@tonic-gate #endif /* ! VSTAFS_H */
89