2N/A * GRUB -- GRand Unified Bootloader 2N/A * Copyright (C) 2005,2006,2007,2008,2009 Free Software Foundation, Inc. 2N/A * GRUB is free software: you can redistribute it and/or modify 2N/A * it under the terms of the GNU General Public License as published by 2N/A * the Free Software Foundation, either version 3 of the License, or 2N/A * (at your option) any later version. 2N/A * GRUB is distributed in the hope that it will be useful, 2N/A * but WITHOUT ANY WARRANTY; without even the implied warranty of 2N/A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2N/A * GNU General Public License for more details. 2N/A * You should have received a copy of the GNU General Public License 2N/A/* The affs bootblock. */ 2N/A/* Set if the filesystem is a AFFS filesystem. Otherwise this is an 2N/A/* The affs rootblock. */ 2N/A/* The second part of a file header block. */ 2N/A/* The location of `struct grub_affs_file' relative to the end of a 2N/A file header block. */ 2N/A/* The offset in both the rootblock and the file header block for the 2N/A hashtable, symlink and block pointers (all synonyms). */ 2N/A/* Information about a "mounted" affs filesystem. */ 2N/A /* Blocksize in sectors. */ 2N/A /* The number of entries in the hashtable. */ 2N/A /* Files are at most 2G on AFFS, so no need for 64-bit division. */ 2N/A /* Find the block that points to the fileblock we are looking up by 2N/A following the chain until the right table is reached. */ 2N/A /* Translate the fileblock to the block within the right table. */ 2N/A /* Read the bootblock. */ 2N/A /* Make sure this is an affs filesystem. */ 2N/A /* Test if the filesystem is a OFS filesystem. */ 2N/A /* No sane person uses more than 8KB for a block. At least I hope 2N/A for that person because in that case this won't work. */ 2N/A /* Read the rootblock. */ 2N/A /* The filesystem blocksize is not stored anywhere in the filesystem 2N/A itself. One way to determine it is reading blocks for the 2N/A rootblock until the checksum is correct. */ 2N/A /* Create the directory entries for `.' and `..'. */ 2N/A /* Every entry in the hashtable can be chained. Read the entire 2N/A/* Open a file named NAME and initialize FILE. */ 2N/A/* Read LEN bytes data from FILE into BUF. */ 2N/A +
8 *
365 *
86400 +
86400 *
2;
2N/A /* The rootblock maps quite well on a file header block, it's 2N/A something we can use here. */