<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/ubifs-utils/common/devtable.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>2025-06-02T05:23:41+00:00</updated>
<entry>
<title>ubifs-utils: common: fix memory leak in devtable.c</title>
<updated>2025-06-02T05:23:41+00:00</updated>
<author>
<name>AntonMoryakov</name>
<email>ant.v.moryakov@gmail.com</email>
</author>
<published>2025-04-24T18:19:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=2669111e3c60b8e146c174db5d2e7e9991f3dd87'/>
<id>urn:sha1:2669111e3c60b8e146c174db5d2e7e9991f3dd87</id>
<content type='text'>
Report of the static analyzer:
Dynamic memory, referenced by 'line', is allocated at devtable.c:356
by calling function 'getline' and lost at devtable.c:388.
(line: while (getline(&amp;line, &amp;len, f) != -1) {)

Correct explained:
Now line is freed in any exit scenario via out_close which eliminates this error.

Triggers found by static analyzer Svace.

Signed-off-by: Anton Moryakov &lt;ant.v.moryakov@gmail.co
Reviewed-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: 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: Decouple mkfs.ubifs.h out of other modules</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:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=03ec75b9e6ad4cb372f86d1581c2b1b2ef987c72'/>
<id>urn:sha1:03ec75b9e6ad4cb372f86d1581c2b1b2ef987c72</id>
<content type='text'>
Header file mkfs.ubifs.h is included in other modules(eg. compr.c, lpt.c,
fscrypt.h, sign.c), decouple it out of other modules.

There are two parts in mkfs.ubifs.h:
1. common functions, for example dbg_msg, err_msg and write_leb, move
   these functions into common/defs.h and common/ubifs.h.
2. devtable related definations, move them into a new header file
   common/devtable.h.

Splitting common functions from mkfs.ubifs.h is also a preparation for
importing libubifs(from linux kernel) to replace current UBIFS 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: Split common source files from mkfs.ubifs</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:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=e7e19cd9d8cc0f54ca463c4aebf7c4ef5e4f84f8'/>
<id>urn:sha1:e7e19cd9d8cc0f54ca463c4aebf7c4ef5e4f84f8</id>
<content type='text'>
Split common source files into common dir from mkfs.ubifs, this is a
preparation for importing libubifs(from linux kernel) to replace
current UBIFS 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>
</feed>
