Accepting request 240953 from Base:System

1

OBS-URL: https://build.opensuse.org/request/show/240953
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grub2?expand=0&rev=94
This commit is contained in:
Stephan Kulow 2014-07-18 12:03:21 +00:00 committed by Git OBS Bridge
commit 77a5cd04db
2 changed files with 28 additions and 25 deletions

View File

@ -8,10 +8,10 @@ Signed-off-by: Jan Kara <jack@suse.cz>
grub-core/fs/xfs.c | 245 +++++++++++++++++++++++++++++++++++++----------------
1 file changed, 173 insertions(+), 72 deletions(-)
diff --git a/grub-core/fs/xfs.c b/grub-core/fs/xfs.c
index 7e247a32df5c..3b1d8994067f 100644
--- a/grub-core/fs/xfs.c
+++ b/grub-core/fs/xfs.c
Index: grub-2.02~beta2/grub-core/fs/xfs.c
===================================================================
--- grub-2.02~beta2.orig/grub-core/fs/xfs.c
+++ grub-2.02~beta2/grub-core/fs/xfs.c
@@ -34,6 +34,15 @@ GRUB_MOD_LICENSE ("GPLv3+");
#define XFS_INODE_FORMAT_EXT 2
#define XFS_INODE_FORMAT_BTREE 3
@ -140,7 +140,7 @@ index 7e247a32df5c..3b1d8994067f 100644
/* Filetype information as used in inodes. */
#define FILETYPE_INO_MASK 0170000
#define FILETYPE_INO_REG 0100000
@@ -219,18 +249,6 @@ GRUB_XFS_EXTENT_SIZE (grub_xfs_extent *exts, int ex)
@@ -219,18 +249,6 @@ GRUB_XFS_EXTENT_SIZE (grub_xfs_extent *e
return (grub_be_to_cpu32 (exts[ex][3]) & ((1 << 21) - 1));
}
@ -159,7 +159,7 @@ index 7e247a32df5c..3b1d8994067f 100644
static inline grub_uint64_t
grub_xfs_inode_block (struct grub_xfs_data *data,
@@ -261,6 +279,92 @@ grub_xfs_inode_size(struct grub_xfs_data *data)
@@ -261,6 +279,92 @@ grub_xfs_inode_size(struct grub_xfs_data
return 1 << data->sblock.log2_inode;
}
@ -246,13 +246,13 @@ index 7e247a32df5c..3b1d8994067f 100644
+
+ if (data->hascrc)
+ p += 48; /* crc, uuid, ... */
+ return (grub_uint64_t *)p;
+ return (grub_uint64_t *)(void*)p;
+}
+
static grub_err_t
grub_xfs_read_inode (struct grub_xfs_data *data, grub_uint64_t ino,
struct grub_xfs_inode *inode)
@@ -268,6 +372,9 @@ grub_xfs_read_inode (struct grub_xfs_data *data, grub_uint64_t ino,
@@ -268,6 +372,9 @@ grub_xfs_read_inode (struct grub_xfs_dat
grub_uint64_t block = grub_xfs_inode_block (data, ino);
int offset = grub_xfs_inode_offset (data, ino);
@ -262,7 +262,7 @@ index 7e247a32df5c..3b1d8994067f 100644
/* Read the inode. */
if (grub_disk_read (data->disk, block, offset, grub_xfs_inode_size(data),
inode))
@@ -290,6 +397,7 @@ grub_xfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
@@ -290,6 +397,7 @@ grub_xfs_read_block (grub_fshelp_node_t
if (node->inode.format == XFS_INODE_FORMAT_BTREE)
{
@ -270,7 +270,7 @@ index 7e247a32df5c..3b1d8994067f 100644
const grub_uint64_t *keys;
int recoffset;
@@ -297,15 +405,15 @@ grub_xfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
@@ -297,15 +405,15 @@ grub_xfs_read_block (grub_fshelp_node_t
if (leaf == 0)
return 0;
@ -291,7 +291,7 @@ index 7e247a32df5c..3b1d8994067f 100644
do
{
int i;
@@ -327,7 +435,10 @@ grub_xfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
@@ -327,7 +435,10 @@ grub_xfs_read_block (grub_fshelp_node_t
0, node->data->bsize, leaf))
return 0;
@ -303,7 +303,7 @@ index 7e247a32df5c..3b1d8994067f 100644
{
grub_free (leaf);
grub_error (GRUB_ERR_BAD_FS, "not a correct XFS BMAP node");
@@ -335,8 +446,8 @@ grub_xfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
@@ -335,8 +446,8 @@ grub_xfs_read_block (grub_fshelp_node_t
}
nrec = grub_be_to_cpu16 (leaf->numrecs);
@ -314,7 +314,7 @@ index 7e247a32df5c..3b1d8994067f 100644
- (char *) leaf))
/ (2 * sizeof (grub_uint64_t)));
}
@@ -346,7 +457,7 @@ grub_xfs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
@@ -346,7 +457,7 @@ grub_xfs_read_block (grub_fshelp_node_t
else if (node->inode.format == XFS_INODE_FORMAT_EXT)
{
nrec = grub_be_to_cpu32 (node->inode.nextents);
@ -323,7 +323,7 @@ index 7e247a32df5c..3b1d8994067f 100644
}
else
{
@@ -404,7 +515,7 @@ grub_xfs_read_symlink (grub_fshelp_node_t node)
@@ -404,7 +515,7 @@ grub_xfs_read_symlink (grub_fshelp_node_
switch (node->inode.format)
{
case XFS_INODE_FORMAT_INO:
@ -332,7 +332,7 @@ index 7e247a32df5c..3b1d8994067f 100644
case XFS_INODE_FORMAT_EXT:
{
@@ -501,23 +612,18 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
@@ -501,23 +612,18 @@ grub_xfs_iterate_dir (grub_fshelp_node_t
{
case XFS_INODE_FORMAT_INO:
{
@ -361,7 +361,7 @@ index 7e247a32df5c..3b1d8994067f 100644
/* Synthesize the direntries for `.' and `..'. */
if (iterate_dir_call_hook (diro->ino, ".", &ctx))
@@ -526,12 +632,10 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
@@ -526,12 +632,10 @@ grub_xfs_iterate_dir (grub_fshelp_node_t
if (iterate_dir_call_hook (parent, "..", &ctx))
return 1;
@ -376,7 +376,7 @@ index 7e247a32df5c..3b1d8994067f 100644
grub_uint8_t c;
/* inopos might be unaligned. */
@@ -556,10 +660,7 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
@@ -556,10 +660,7 @@ grub_xfs_iterate_dir (grub_fshelp_node_t
return 1;
de->name[de->len] = c;
@ -388,7 +388,7 @@ index 7e247a32df5c..3b1d8994067f 100644
}
break;
}
@@ -586,15 +687,11 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
@@ -586,15 +687,11 @@ grub_xfs_iterate_dir (grub_fshelp_node_t
>> dirblk_log2);
blk++)
{
@ -408,7 +408,7 @@ index 7e247a32df5c..3b1d8994067f 100644
numread = grub_xfs_read_file (dir, 0, 0,
blk << dirblk_log2,
@@ -606,13 +703,11 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
@@ -606,13 +703,11 @@ grub_xfs_iterate_dir (grub_fshelp_node_t
- grub_be_to_cpu32 (tail->leaf_stale));
/* Iterate over all entries within this block. */
@ -423,7 +423,7 @@ index 7e247a32df5c..3b1d8994067f 100644
freetag = (grub_uint8_t *) direntry;
if (grub_get_unaligned16 (freetag) == 0XFFFF)
@@ -620,14 +715,16 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
@@ -620,14 +715,16 @@ grub_xfs_iterate_dir (grub_fshelp_node_t
grub_uint8_t *skip = (freetag + sizeof (grub_uint16_t));
/* This entry is not used, go to the next one. */
@ -444,7 +444,7 @@ index 7e247a32df5c..3b1d8994067f 100644
filename[direntry->len] = '\0';
if (iterate_dir_call_hook (grub_be_to_cpu64(direntry->inode),
@@ -644,8 +741,7 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
@@ -644,8 +741,7 @@ grub_xfs_iterate_dir (grub_fshelp_node_t
break;
/* Select the next directory entry. */
@ -476,6 +476,3 @@ index 7e247a32df5c..3b1d8994067f 100644
grub_xfs_read_inode (data, data->diropen.ino, &data->diropen.inode);
--
1.8.1.4

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jul 9 16:26:35 UTC 2014 - dvlaeev@suse.com
- Fix ppc64le build by fixing
grub2-xfs-V5-filesystem-format-support.patch
-------------------------------------------------------------------
Wed Jun 25 09:20:16 UTC 2014 - jack@suse.cz