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 common header for a block. */ 2N/A/* The sfs rootblock. */ 2N/A/* A SFS object container. */ 2N/A/* A SFS object container. */ 2N/A /* The amount of objects depends on the blocksize. */ 2N/A /* Normally this can be kind of node, but just extents are 2N/A/* Information about a "mounted" sfs filesystem. */ 2N/A /* Blocksize in sectors. */ 2N/A /* Label of the filesystem. */ 2N/A/* Lookup the extent starting with BLOCK in the filesystem described 2N/A by DATA. Return the extent size in SIZE and the following extent 2N/A /* Handle this level in the btree. */ 2N/A /* Follow the tree down to the leaf level. */ 2N/A /* If the leaf level is reached, just find the correct extent. */ 2N/A /* We found a correct leaf. */ 2N/A /* In case of the first block we don't have to lookup the 2N/A extent, the minimum size is always 1. */ 2N/A "reading a SFS block outside the extent");
2N/A/* Read LEN bytes from the file described by DATA starting with byte 2N/A POS. Return the amount of read bytes in READ. */ 2N/A /* Read the rootblock. */ 2N/A /* Make sure this is a sfs filesystem. */ 2N/A /* Read the root object container. */ 2N/A /* This is just a wild guess, but it always worked for me. How the 2N/A SLNK block looks like is not documented in the SFS docs. */ 2N/A /* The Object container can consist of multiple blocks, iterate over 2N/A /* Iterate over all entries in this block. */ 2N/A /* The filename and comment dynamically increase the size of 2N/A /* Round up to a multiple of two bytes. */ 2N/A /* First check if the file was not deleted. */ 2N/A/* Open a file named NAME and initialize FILE. */ 2N/A/* Read LEN bytes data from FILE into BUF. */