~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to include/grub/fat.h

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-09-13 18:02:04 UTC
  • mfrom: (1.17.15 upstream)
  • mto: (17.6.27 experimental)
  • mto: This revision was merged to the branch mainline in revision 145.
  • Revision ID: package-import@ubuntu.com-20120913180204-mojnmocbimlom4im
Tags: upstream-2.00
ImportĀ upstreamĀ versionĀ 2.00

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  GRUB  --  GRand Unified Bootloader
 
3
 *  Copyright (C) 2000,2001,2002,2003,2004,2005,2007,2008,2009  Free Software Foundation, Inc.
 
4
 *
 
5
 *  GRUB 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 3 of the License, or
 
8
 *  (at your option) any later version.
 
9
 *
 
10
 *  GRUB 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 GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
17
 */
 
18
 
 
19
#ifndef GRUB_FAT_H
 
20
#define GRUB_FAT_H      1
 
21
 
 
22
#include <grub/types.h>
 
23
 
 
24
struct grub_fat_bpb
 
25
{
 
26
  grub_uint8_t jmp_boot[3];
 
27
  grub_uint8_t oem_name[8];
 
28
  grub_uint16_t bytes_per_sector;
 
29
  grub_uint8_t sectors_per_cluster;
 
30
  grub_uint16_t num_reserved_sectors;
 
31
  grub_uint8_t num_fats;
 
32
  grub_uint16_t num_root_entries;
 
33
  grub_uint16_t num_total_sectors_16;
 
34
  grub_uint8_t media;
 
35
  grub_uint16_t sectors_per_fat_16;
 
36
  grub_uint16_t sectors_per_track;
 
37
  grub_uint16_t num_heads;
 
38
  grub_uint32_t num_hidden_sectors;
 
39
  grub_uint32_t num_total_sectors_32;
 
40
  union
 
41
  {
 
42
    struct
 
43
    {
 
44
      grub_uint8_t num_ph_drive;
 
45
      grub_uint8_t reserved;
 
46
      grub_uint8_t boot_sig;
 
47
      grub_uint32_t num_serial;
 
48
      grub_uint8_t label[11];
 
49
      grub_uint8_t fstype[8];
 
50
    } __attribute__ ((packed)) fat12_or_fat16;
 
51
    struct
 
52
    {
 
53
      grub_uint32_t sectors_per_fat_32;
 
54
      grub_uint16_t extended_flags;
 
55
      grub_uint16_t fs_version;
 
56
      grub_uint32_t root_cluster;
 
57
      grub_uint16_t fs_info;
 
58
      grub_uint16_t backup_boot_sector;
 
59
      grub_uint8_t reserved[12];
 
60
      grub_uint8_t num_ph_drive;
 
61
      grub_uint8_t reserved1;
 
62
      grub_uint8_t boot_sig;
 
63
      grub_uint32_t num_serial;
 
64
      grub_uint8_t label[11];
 
65
      grub_uint8_t fstype[8];
 
66
    } __attribute__ ((packed)) fat32;
 
67
  } __attribute__ ((packed)) version_specific;
 
68
} __attribute__ ((packed));
 
69
 
 
70
#endif