[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] pickles/jffs2.pk: Add initializer to `magic` field
From: |
Mohammad-Reza Nabipoor |
Subject: |
[PATCH] pickles/jffs2.pk: Add initializer to `magic` field |
Date: |
Sun, 14 Mar 2021 02:16:13 +0330 |
2021-03-14 Mohammad-Reza Nabipoor <m.nabipoor@yahoo.com>
* pickles/jffs2.pk (JFFS2_Dirent): Add initializer to `magic` field.
(JFFS2_Inode): Likewise.
(JFFS2_XAttr): Likewise.
(JFFS2_XRef): Likewise.
(JFFS2_Summary): Likewise.
(JFFS2_Unk_Node): Likewise.
---
ChangeLog | 9 +++++++++
pickles/jffs2.pk | 12 ++++++------
2 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 080456cb..da4322d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2021-03-14 Mohammad-Reza Nabipoor <m.nabipoor@yahoo.com>
+
+ * pickles/jffs2.pk (JFFS2_Dirent): Add initializer to `magic` field.
+ (JFFS2_Inode): Likewise.
+ (JFFS2_XAttr): Likewise.
+ (JFFS2_XRef): Likewise.
+ (JFFS2_Summary): Likewise.
+ (JFFS2_Unk_Node): Likewise.
+
2021-03-14 Mohammad-Reza Nabipoor <m.nabipoor@yahoo.com>
* doc/learn-poke-language-in-y-minutes.pk: Add a new example of
diff --git a/pickles/jffs2.pk b/pickles/jffs2.pk
index c017d718..64baad34 100644
--- a/pickles/jffs2.pk
+++ b/pickles/jffs2.pk
@@ -150,7 +150,7 @@ fun jffs2_nodetype_to_str = (uint<16> node_type) string: {
type JFFS2_Dirent =
struct
{
- uint<16> magic : magic in [JFFS2_MAGIC, JFFS2_MAGIC_OLD];
+ uint<16> magic = JFFS2_MAGIC : magic in [JFFS2_MAGIC, JFFS2_MAGIC_OLD];
uint<16> node_type = JFFS2_NODETYPE_DIRENT;
offset<uint<32>, B> total_len : total_len >= JFFS2_HEADER_SIZE;
uint<32> node_header_crc;
@@ -191,7 +191,7 @@ struct
type JFFS2_Inode =
struct
{
- uint<16> magic : magic in [JFFS2_MAGIC, JFFS2_MAGIC_OLD];
+ uint<16> magic = JFFS2_MAGIC : magic in [JFFS2_MAGIC, JFFS2_MAGIC_OLD];
uint<16> node_type = JFFS2_NODETYPE_INODE;
offset<uint<32>, B> total_len : total_len >= JFFS2_HEADER_SIZE;
uint<32> node_header_crc;
@@ -233,7 +233,7 @@ struct
type JFFS2_XAttr =
struct
{
- uint<16> magic : magic in [JFFS2_MAGIC, JFFS2_MAGIC_OLD];
+ uint<16> magic = JFFS2_MAGIC : magic in [JFFS2_MAGIC, JFFS2_MAGIC_OLD];
uint<16> node_type = JFFS2_NODETYPE_XATTR;
offset<uint<32>, B> total_len : total_len >= JFFS2_HEADER_SIZE;
uint<32> node_header_crc;
@@ -269,7 +269,7 @@ struct
type JFFS2_XRef =
struct
{
- uint<16> magic : magic in [JFFS2_MAGIC, JFFS2_MAGIC_OLD];
+ uint<16> magic = JFFS2_MAGIC : magic in [JFFS2_MAGIC, JFFS2_MAGIC_OLD];
uint<16> node_type = JFFS2_NODETYPE_XREF;
offset<uint<32>, B> total_len : total_len >= JFFS2_HEADER_SIZE;
uint<32> node_header_crc;
@@ -383,7 +383,7 @@ union {
type JFFS2_Summary =
struct
{
- uint<16> magic : magic in [JFFS2_MAGIC, JFFS2_MAGIC_OLD];
+ uint<16> magic = JFFS2_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;
@@ -424,7 +424,7 @@ struct
type JFFS2_Unk_Node =
struct
{
- uint<16> magic : magic in [JFFS2_MAGIC, JFFS2_MAGIC_OLD];
+ uint<16> magic = JFFS2_MAGIC : magic in [JFFS2_MAGIC, JFFS2_MAGIC_OLD];
uint<16> node_type; // could be anything
offset<uint<32>, B> total_len : total_len >= JFFS2_HEADER_SIZE;
uint<32> node_header_crc;
--
2.30.1
- [PATCH] pickles/jffs2.pk: Add initializer to `magic` field,
Mohammad-Reza Nabipoor <=