• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  GRUB  --  GRand Unified Bootloader
3  *  Copyright (C) 2001   Free Software Foundation, Inc.
4  *
5  *  This program is free software; you can redistribute it and/or modify
6  *  it under the terms of the GNU General Public License as published by
7  *  the Free Software Foundation; either version 2 of the License, or
8  *  (at your option) any later version.
9  *
10  *  This program is distributed in the hope that it will be useful,
11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  *  GNU General Public License for more details.
14  *
15  *  You should have received a copy of the GNU General Public License
16  *  along with this program; if not, write to the Free Software
17  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */
19 
20 
21 #ifndef VSTAFS_H
22 #define VSTAFS_H	1
23 
24 
25 #define LINE			16
26 #define BLOCK_SIZE		512
27 #define VSTAFS_START_DATA	320
28 
29 struct bootrecord
30 {
31   unsigned char flag;
32   unsigned char s_sector;
33   unsigned char s_head;
34   unsigned char s_cylinder;
35   unsigned char p_type;
36   unsigned char e_sector;
37   unsigned char e_head;
38   unsigned char e_cylinder;
39   unsigned long start_lba;
40   unsigned long nr_sector_lba;
41 };
42 
43 struct alloc
44 {
45   unsigned long a_start;
46   unsigned long a_len;
47 };
48 
49 struct first_sector
50 {
51   unsigned long fs_magic;
52   unsigned long fs_size;
53   unsigned long fs_extsize;
54   unsigned long fs_free;
55   struct  alloc fs_freesecs[0];
56 };
57 
58 struct prot
59 {
60   unsigned char len;
61   unsigned char pdefault;
62   unsigned char id[7];
63   unsigned char bits[7];
64 };
65 
66 struct fs_file
67 {
68   unsigned long prev;
69   unsigned long rev;
70   unsigned long len;
71   unsigned short type;
72   unsigned short nlink;
73   struct prot pprot;
74   unsigned int owner;
75   unsigned int extents;
76   struct alloc blocks[32];
77   long fs_ctime, fs_mtime; /* it is not lon but time_t */
78   char pad[16];
79   char data[0];
80 };
81 
82 struct dir_entry
83 {
84   char name[28];
85   unsigned long start;
86 };
87 
88 #endif /* ! VSTAFS_H */
89