On Tue, Apr 30, 2024 at 4:27 PM Yifan Zhao <zhaoyi...@sjtu.edu.cn> wrote:
>
>
>> +  err = grub_disk_read (disk, EROFS_SUPER_OFFSET >> GRUB_DISK_SECTOR_BITS, 
>> 0,
>> +                       sizeof (sb), &sb);
>> +  if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
>> +    grub_error (GRUB_ERR_BAD_FS, "not a valid erofs filesystem");
>
> OUT_OF_RANGE is already treated the same asBAD_FS in context of opening a file
>>
>>
>
> Sorry, I didn't fully understand that. I copied similar logic from the ext2 
> driver (fs/ext2.c).
>
> Are you suggesting that I should remove the error code conversion here?
>

Yes. Since 2012 (commit bfb320c644e2a3ea463f8bbf72507b2f7b7132d0) this
logic is no longer necessary. ext2 has this logic back from 2009 and
probably should be removed by now

>
> All the other suggestions are great, I will reply in subsequent emails.
>
>
> Thanks,
>
> Yifan Zhao



-- 
Regards
Vladimir 'phcoder' Serbinenko

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to