[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Patch] Added a JFFS2 pickle
From: |
Jose E. Marchesi |
Subject: |
Re: [Patch] Added a JFFS2 pickle |
Date: |
Mon, 08 Mar 2021 20:15:37 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hi Matt.
> Summary of v4 Patch Changes:
>
> * Removed unnecessary data fields from JFFS2_Inode and JFFS2_XAttr
> * Change get_*_offset functions JFFS2_Inode JFFS2_XAttr,
> and JFFS2_Summary to return relative offsets
> * Changed JFFS2_XAttr.get_name to use try..catch instead of
> if..else
Just one more thing :)
> +type JFFS2_Summary =
> +struct
> +{
> + uint<16> magic : magic in [JFFS2_MAGIC, JFFS2_MAGIC_OLD];
> + uint<16> node_type = JFFS2_NODETYPE_SUMMARY;
> + offset<uint<32>, B> total_len : total_len >= JFFS2_HEADER_SIZE;
> + uint<32> node_header_crc;
> + uint<32> sum_num;
> + uint<32> cln_mkr;
> + uint<32> padded;
> + uint<32> sum_crc;
> + uint<32> node_crc;
> +
> + var rel_records_offset = OFFSET;
> + byte[0] records;
> +
> + // records end + padding
> + byte[0] @ total_len + alignto(total_len, JFFS2_ALIGNMENT);
> +
> + method get_records = JFFS2_Sum_Rec[]:
> + {
> + return JFFS2_Sum_Rec[sum_num] @ records'offset;
> + }
> +
> + method get_records_offset = uoff64:
> + {
> + return rel_records_offset;
> + }
> +
> +};
I don't think you need to have a `byte[0] records' field there. You can
use rel_records_offset instead of records'offset in `get_records'.
Other than that, I think this is good! :)
If you create an account in savannah.gnu.org and let me know the
username I will add you to the `poke' project so you can commit and push
your patch yourself.
Thanks!
- [PATCH] Added a JFFS2 pickle, Matt Ihlenfield, 2021/03/04
- Re: [Patch] Added a JFFS2 pickle, Matt Ihlenfield, 2021/03/04
- Re: [Patch] Added a JFFS2 pickle, Matt Ihlenfield, 2021/03/07
- Re: [Patch] Added a JFFS2 pickle, Matt Ihlenfield, 2021/03/08
- Re: [Patch] Added a JFFS2 pickle,
Jose E. Marchesi <=
- Re: [Patch] Added a JFFS2 pickle, Matt Ihlenfield, 2021/03/08
- Re: [Patch] Added a JFFS2 pickle, Matt Ihlenfield, 2021/03/08