* [U-Boot] [PATCH v4 2/6] cmd: ubifs: Factor out some checking codes into cmd_ubifs_mount()
@ 2018-07-06 8:26 tien.fong.chee at intel.com
2018-07-12 4:56 ` Heiko Schocher
2018-09-29 15:43 ` [U-Boot] [U-Boot, v4, " Tom Rini
0 siblings, 2 replies; 3+ messages in thread
From: tien.fong.chee at intel.com @ 2018-07-06 8:26 UTC (permalink / raw)
To: u-boot
From: Tien Fong Chee <tien.fong.chee@intel.com>
cmd_ubifs_mount() function would be called directly instead of
involving whole command machinery for mounting ubifs in
generic firmware loader, so some checking codes need to be factored out
into cmd_ubifs_mount() without breaking original functionality design.
Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Reviewed-by: Marek Vasut <marex@denx.de>
---
cmd/ubifs.c | 22 ++++++++++++++--------
include/ubi_uboot.h | 1 +
2 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/cmd/ubifs.c b/cmd/ubifs.c
index 1710348..e4000b7 100644
--- a/cmd/ubifs.c
+++ b/cmd/ubifs.c
@@ -19,16 +19,10 @@
static int ubifs_initialized;
static int ubifs_mounted;
-static int do_ubifs_mount(cmd_tbl_t *cmdtp, int flag, int argc,
- char * const argv[])
+int cmd_ubifs_mount(char *vol_name)
{
- char *vol_name;
int ret;
- if (argc != 2)
- return CMD_RET_USAGE;
-
- vol_name = argv[1];
debug("Using volume %s\n", vol_name);
if (ubifs_initialized == 0) {
@@ -42,7 +36,19 @@ static int do_ubifs_mount(cmd_tbl_t *cmdtp, int flag, int argc,
ubifs_mounted = 1;
- return 0;
+ return ret;
+}
+static int do_ubifs_mount(cmd_tbl_t *cmdtp, int flag, int argc,
+ char * const argv[])
+{
+ char *vol_name;
+
+ if (argc != 2)
+ return CMD_RET_USAGE;
+
+ vol_name = argv[1];
+
+ return cmd_ubifs_mount(vol_name);
}
int ubifs_is_mounted(void)
diff --git a/include/ubi_uboot.h b/include/ubi_uboot.h
index 827dbfc..0770228 100644
--- a/include/ubi_uboot.h
+++ b/include/ubi_uboot.h
@@ -75,6 +75,7 @@ extern int ubi_volume_write(char *volume, void *buf, size_t size);
extern int ubi_volume_read(char *volume, char *buf, size_t size);
extern struct ubi_device *ubi_devices[];
+int cmd_ubifs_mount(char *vol_name);
int cmd_ubifs_umount(void);
#endif
--
2.2.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v4 2/6] cmd: ubifs: Factor out some checking codes into cmd_ubifs_mount()
2018-07-06 8:26 [U-Boot] [PATCH v4 2/6] cmd: ubifs: Factor out some checking codes into cmd_ubifs_mount() tien.fong.chee at intel.com
@ 2018-07-12 4:56 ` Heiko Schocher
2018-09-29 15:43 ` [U-Boot] [U-Boot, v4, " Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Schocher @ 2018-07-12 4:56 UTC (permalink / raw)
To: u-boot
Hello tien.fong.chee,
Am 06.07.2018 um 10:26 schrieb tien.fong.chee at intel.com:
> From: Tien Fong Chee <tien.fong.chee@intel.com>
>
> cmd_ubifs_mount() function would be called directly instead of
> involving whole command machinery for mounting ubifs in
> generic firmware loader, so some checking codes need to be factored out
> into cmd_ubifs_mount() without breaking original functionality design.
>
> Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
> Reviewed-by: Marek Vasut <marex@denx.de>
> ---
> cmd/ubifs.c | 22 ++++++++++++++--------
> include/ubi_uboot.h | 1 +
> 2 files changed, 15 insertions(+), 8 deletions(-)
Reviewed-by: Heiko Schocher <hs@denx.de>
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [U-Boot, v4, 2/6] cmd: ubifs: Factor out some checking codes into cmd_ubifs_mount()
2018-07-06 8:26 [U-Boot] [PATCH v4 2/6] cmd: ubifs: Factor out some checking codes into cmd_ubifs_mount() tien.fong.chee at intel.com
2018-07-12 4:56 ` Heiko Schocher
@ 2018-09-29 15:43 ` Tom Rini
1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2018-09-29 15:43 UTC (permalink / raw)
To: u-boot
On Fri, Jul 06, 2018 at 04:26:01PM +0800, tien.fong.chee at intel.com wrote:
> From: Tien Fong Chee <tien.fong.chee@intel.com>
>
> cmd_ubifs_mount() function would be called directly instead of
> involving whole command machinery for mounting ubifs in
> generic firmware loader, so some checking codes need to be factored out
> into cmd_ubifs_mount() without breaking original functionality design.
>
> Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
> Reviewed-by: Marek Vasut <marex@denx.de>
> Reviewed-by: Heiko Schocher <hs@denx.de>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180929/906d6133/attachment.sig>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-09-29 15:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-06 8:26 [U-Boot] [PATCH v4 2/6] cmd: ubifs: Factor out some checking codes into cmd_ubifs_mount() tien.fong.chee at intel.com
2018-07-12 4:56 ` Heiko Schocher
2018-09-29 15:43 ` [U-Boot] [U-Boot, v4, " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox