2N/A * GRUB -- GRand Unified Bootloader 2N/A * Copyright (C) 2004,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 magic for JFS. It should contain the string "JFS1". */ 2N/A /* The size of a filesystem block in bytes. XXX: currently only 2N/A /* The length of the extent in filesystem blocks. */ 2N/A /* The physical offset of the first block on the disk. */ 2N/A/* The head of the tree used to find extents. */ 2N/A/* A node in the extent tree. */ 2N/A /* The offset is the key used to lookup an extent. */ 2N/A/* The tree of directory entries. */ 2N/A /* Pointers to the previous and next tree headers of other nodes on 2N/A /* The amount of dirents in this node. */ 2N/A /* The location of the sorted array of pointers to dirents. */ 2N/A/* An internal node in the dirents tree. */ 2N/A/* A leaf node in the dirents tree. */ 2N/A /* The inode for this dirent. */ 2N/A /* The size of the name. */ 2N/A/* A leaf in the dirents tree. This one is used if the previously 2N/A dirent was not big enough to store the name. */ 2N/A /* The tree describing the extents of the file. */ 2N/A /* The tree describing the dirents. */ 2N/A /* Amount of dirents in this node. */ 2N/A /* The filename and inode of the last read dirent. */ 2N/A /* On-disk name is at most 255 UTF-16 codepoints. 2N/A Every UTF-16 codepoint is at most 4 UTF-8 bytes. 2N/A/* Get the block number for the block BLK in the node INODE in the 2N/A mounted filesystem DATA. */ 2N/A /* Read the leafnode. */ 2N/A /* Read in the IAG. */ 2N/A /* Read the superblock. */ 2N/A /* Read the inode of the first fileset. */ 2N/A /* Check if the entire tree is contained within the inode. */ 2N/A /* Read in the nodes until we are on the leaf node level. */ 2N/A/* Read in the next dirent from the directory described by DIRO. */ 2N/A /* Add the unicode string to the utf16 filename buffer. */ 2N/A /* The last node, read in more. */ 2N/A /* If the inode contains the entry tree or if this was the last 2N/A node, there is nothing to read. */ 2N/A /* Move down to the leaf level. */ 2N/A /* Convert the temporary UTF16 filename to UTF8. */ 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/* Find the file with the pathname PATH on the filesystem described by 2N/A /* Skip the first slashes. */ 2N/A /* Extract the actual part from the pathname. */ 2N/A /* Check if the current direntry matches the current part of the 2N/A /* Check if this is a symlink. */ 2N/A /* Open this directory for reading dirents. */ 2N/A /* The symlink is an absolute path, go back to the root inode. */ 2N/A /* Iterate over the dirents in the directory that was found. */ 2N/A /* XXX: GRUB_ERR_OUT_OF_RANGE is used for the last dirent. */ 2N/A/* Open a file named NAME and initialize FILE. */ 2N/A /* It is only possible for open regular files. */ 2N/A "%02x%02x%02x%02x%02x%02x",