[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix XFS directory extent parsing
From: |
Jon DeVree |
Subject: |
Re: [PATCH] Fix XFS directory extent parsing |
Date: |
Fri, 15 Sep 2023 09:58:52 -0400 |
On Fri, Sep 15, 2023 at 15:23:23 +0200, Vladimir 'phcoder' Serbinenko wrote:
> > @@ -877,9 +883,8 @@ grub_xfs_iterate_dir (grub_fshelp_node_t dir,
> > {
> > struct grub_xfs_dir2_entry *direntry =
> > grub_xfs_first_de(dir->data,
> > dirblock);
> > - int entries;
> > - struct grub_xfs_dirblock_tail *tail =
> > - grub_xfs_dir_tail(dir->data,
> > dirblock);
> > + int entries = -1;
> > + char *end = dirblock + dirblk_size;
> >
>
> Is grub_xfs_dir_tail still used? If not we can remove it
>
yeah, that is still used. This line of code just got moved down a few
lines.
> > + /* the expected number of directory entries is only
> > tracked for the
> > + * single extent case */
> > + if (grub_be_to_cpu32 (dir->inode.nextents) == 1)
> >
> Small nit : byte-swap the const using grub_cpu_to_be32_compile_time rather
> than the value.
>
You mean like this?
if (dir->inode.nextents == grub_cpu_to_be32_compile_time (1))
--
Jon
Doge Wrangler
X(7): A program for managing terminal windows. See also screen(1) and tmux(1).