<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/ubifs-utils/mkfs.ubifs/mkfs.ubifs.c, branch v2.3.1</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2024-11-11T09:32:46+00:00</updated>
<entry>
<title>fsck.ubifs: check and correct the space statistics</title>
<updated>2024-11-11T09:32:46+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T09:08:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=83b7477eae174e974237685f83f0fec4fb794892'/>
<id>urn:sha1:83b7477eae174e974237685f83f0fec4fb794892</id>
<content type='text'>
This is the 12/18 step of fsck. Check and correct the space statistics.
There could be following steps and possible errors:
 Step 1. Exit for check mode, if %FR_LPT_CORRUPTED or %FR_LPT_INCORRECT
 is set in lpt status, the exit code should have %FSCK_UNCORRECTED.
 Step 2. Check lpt status, if %FR_LPT_CORRUPTED is set in lpt status,
 normal mode with 'no' answer will exit, other modes will rebuild lpt.
 Step 3. Traverse LPT nodes, check the correctness of nnode and pnode,
 compare LEB scanning result with LEB properties.
  a. LPT node is corrupted, normal mode with 'no' answer will exit,
     rebuild lpt for other modes.
  b. Incorrect nnode/pnode, normal mode with 'no' answer will exit,
     other other modes will correct the nnode/pnode.
  c. Inconsistent comparing result, normal mode with 'no' answer
     will exit, other modes will correct the space statistics.
 Step 4. Check and correct the lprops table information.
 Step 5. Set gc lnum(ubifs_rcvry_gc_commit / take_gc_lnum).

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: Replace ubifs related source code with linux kernel implementation</title>
<updated>2024-11-11T09:32:45+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T09:01:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=665c44e7c9135a58847ab0773fc7977929d1497c'/>
<id>urn:sha1:665c44e7c9135a58847ab0773fc7977929d1497c</id>
<content type='text'>
Replace ubifs related source code with the implementation of linux kernel.
It makes userspace implementation be same with linux kernel, then
fsck.ubifs can resuse the code.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: Add implementations for linux kernel printing functions</title>
<updated>2024-11-11T09:32:45+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T08:36:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=24f4d8abd9fc7f8e90c0f1d2a652cb8ea790d54c'/>
<id>urn:sha1:24f4d8abd9fc7f8e90c0f1d2a652cb8ea790d54c</id>
<content type='text'>
Add implementations for linux kernel printing functions, because these
functions(eg. pr_debug, pr_err, etc.) are widely used in UBIFS linux
kernel libs. No need to define multiple levels in dbg_msg for debuging,
just replace dbg_msg with pr_debug. Now, there are five levels of
printing messages:
 0 - none
 1 - error message
 2 - warning message [default]
 3 - notice message
 4 - debug message

This is a preparation for replacing implementation of UBIFS utils with
linux kernel libs.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: Add linux type definitions</title>
<updated>2024-11-11T09:32:45+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T08:36:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=583125d58cc604ba8bb3cdca1656c7f973fae69c'/>
<id>urn:sha1:583125d58cc604ba8bb3cdca1656c7f973fae69c</id>
<content type='text'>
Add linux type definitions, because there are many types
(eg. u8/u16/u64) used in UBIFS linux kernel libs. Besides
move type conversions (eg. cpu_to_le16, cpu_to_le32, etc.)
into type definitions header file.

This is a preparation for replacing implementation of UBIFS utils with
linux kernel libs.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: Extract UBI opening/closing/volume_check_empty functions into a new source file</title>
<updated>2024-11-11T09:32:45+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T08:36:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=b88ce3ced2123752f6da25abba119ae117bcc771'/>
<id>urn:sha1:b88ce3ced2123752f6da25abba119ae117bcc771</id>
<content type='text'>
Move UBI opening/closing/volume_check_empty functions into common/super.c.
These functions will be used in fsck.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: Add 'dev_fd' and 'libubi' into 'ubifs_info' structure</title>
<updated>2024-11-11T09:32:45+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T08:36:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=0d1c454bfcbbe90f6fe9930f1c68f259bd66b114'/>
<id>urn:sha1:0d1c454bfcbbe90f6fe9930f1c68f259bd66b114</id>
<content type='text'>
Embed new members 'dev_fd' and 'libubi' into ubifs_info structure, so
that global variable 'ubi', 'out_fd' and 'out_ubi' could be removed
from mkfs.ubifs.c. Besides, add parameter in check_volume_empty().
Next patch will extract UBI opening/closing/check_volume_empty functions
into a new source file, these functions will be used in fsck.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: Add 'dev_name' into 'ubifs_info' structure</title>
<updated>2024-11-11T09:32:45+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T08:36:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=f3bacdcd9cdfbe4f9861767258b359aba4db3f80'/>
<id>urn:sha1:f3bacdcd9cdfbe4f9861767258b359aba4db3f80</id>
<content type='text'>
Embed new member 'dev_name' into 'ubifs_info' structure, then global
variable 'output' can be removed from mkfs.ubifs.c. Next patches will
import UBIFS libs from linux kernel, which could print messages that
contain device information, so this patch can distinguish different
devices according to messages.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: Move 'debug_level' into ubifs_info structure</title>
<updated>2024-11-11T09:32:45+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T08:36:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=6a4a0c16329b6649d5eb00d318d8a95503e3597a'/>
<id>urn:sha1:6a4a0c16329b6649d5eb00d318d8a95503e3597a</id>
<content type='text'>
Embed new member 'debug_level' into 'ubifs_info' structure, then global
variable 'debug_level' can be removed from mkfs.ubifs.c. Next patches
will import UBIFS libs from linux kernel, which could print messages
with different levels, then 'debug_level' can be used to control which
level messages should be printed.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: Clean up error message printing functions</title>
<updated>2024-11-11T09:32:45+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T08:36:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=14aa5e63ab989e4f85495e96a74f34d18813caf6'/>
<id>urn:sha1:14aa5e63ab989e4f85495e96a74f34d18813caf6</id>
<content type='text'>
Functions 'err_msg' and 'sys_err_msg' are almost same with 'errmsg' and
'sys_errmsg', since 'errmsg' and 'sys_errmsg' can print programe name,
so replace error message printing functions (ubifs-utils) with common
lib functions(include/common.h).

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubifs-utils: Define PROGRAM_NAME as variable</title>
<updated>2024-11-11T09:32:45+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2024-11-11T08:36:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=bc85302b02f8a1af351d05050f9de8a54c68ba09'/>
<id>urn:sha1:bc85302b02f8a1af351d05050f9de8a54c68ba09</id>
<content type='text'>
PROGRAM_NAME is defined as a const string "mkfs.ubifs", which won't be
suitable for fsck.ubifs. Add 'program_name' member in ubifs_info
structure, define PROGRAM_NAME as ubifs_info.program_name. Then, error
messages will display right program name if fsck.ubifs is supported.
Besides, add 'program_type' member in ubifs_info structure to identify
which current program type is, without comparing program name.

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
