aboutsummaryrefslogtreecommitdiff
path: root/ubifs-utils/common/lpt.c
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2024-11-11 16:36:38 +0800
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2024-11-11 10:32:45 +0100
commit0d1c454bfcbbe90f6fe9930f1c68f259bd66b114 (patch)
tree4d23eef04a83c14adf17f4293ed946bd8e5caace /ubifs-utils/common/lpt.c
parentf3bacdcd9cdfbe4f9861767258b359aba4db3f80 (diff)
ubifs-utils: Add 'dev_fd' and 'libubi' into 'ubifs_info' structure
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 <chengzhihao1@huawei.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils/common/lpt.c')
-rw-r--r--ubifs-utils/common/lpt.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ubifs-utils/common/lpt.c b/ubifs-utils/common/lpt.c
index 9c1143f..d07f569 100644
--- a/ubifs-utils/common/lpt.c
+++ b/ubifs-utils/common/lpt.c
@@ -421,7 +421,7 @@ int create_lpt(struct ubifs_info *c)
alen = ALIGN(len, c->min_io_size);
set_ltab(c, lnum, c->leb_size - alen, alen - len);
memset(p, 0xff, alen - len);
- err = write_leb(lnum++, alen, buf);
+ err = write_leb(c, lnum++, alen, buf);
if (err)
goto out;
p = buf;
@@ -468,7 +468,7 @@ int create_lpt(struct ubifs_info *c)
set_ltab(c, lnum, c->leb_size - alen,
alen - len);
memset(p, 0xff, alen - len);
- err = write_leb(lnum++, alen, buf);
+ err = write_leb(c, lnum++, alen, buf);
if (err)
goto out;
p = buf;
@@ -515,7 +515,7 @@ int create_lpt(struct ubifs_info *c)
alen = ALIGN(len, c->min_io_size);
set_ltab(c, lnum, c->leb_size - alen, alen - len);
memset(p, 0xff, alen - len);
- err = write_leb(lnum++, alen, buf);
+ err = write_leb(c, lnum++, alen, buf);
if (err)
goto out;
p = buf;
@@ -538,7 +538,7 @@ int create_lpt(struct ubifs_info *c)
alen = ALIGN(len, c->min_io_size);
set_ltab(c, lnum, c->leb_size - alen, alen - len);
memset(p, 0xff, alen - len);
- err = write_leb(lnum++, alen, buf);
+ err = write_leb(c, lnum++, alen, buf);
if (err)
goto out;
p = buf;
@@ -558,7 +558,7 @@ int create_lpt(struct ubifs_info *c)
/* Write remaining buffer */
memset(p, 0xff, alen - len);
- err = write_leb(lnum, alen, buf);
+ err = write_leb(c, lnum, alen, buf);
if (err)
goto out;