diff options
author | Tom Rini <trini@konsulko.com> | 2020-08-24 20:24:21 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2020-08-25 08:12:05 -0400 |
commit | 8ee3a24fdc237c76cead618a173740594287dd96 (patch) | |
tree | a19a58ee49166c02dce5bdb35262bb48c2078e8c /cmd | |
parent | 3c0cec035e5b06b638fb52ccd7383bbd5bcede35 (diff) | |
parent | 3337b291442e31b1db0ff5975f74fec7d9741794 (diff) |
Merge branch '2020-08-24-misc-improvements'
- Squashfs compression support
- Coverity fixes
- XEN guest updates
- Finish previous MediaTek updates
- Arm Total Compute platform support
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/clone.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/clone.c b/cmd/clone.c index 97747f8f08..32473a032c 100644 --- a/cmd/clone.c +++ b/cmd/clone.c @@ -38,7 +38,7 @@ static int do_clone(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv srcbz = srcdesc->blksz; destbz = destdesc->blksz; - if ((srcbz * (buffersize / srcbz) != buffersize) && + if ((srcbz * (buffersize / srcbz) != buffersize) || (destbz * (buffersize / destbz) != buffersize)) { printf("failed: cannot match device block sizes\n"); return 1; @@ -55,10 +55,12 @@ static int do_clone(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv switch (unit[0]) { case 'g': case 'G': - requested *= 1024; + requested *= 1024 * 1024 * 1024; + break; case 'm': case 'M': - requested *= 1024; + requested *= 1024 * 1024; + break; case 'k': case 'K': requested *= 1024; |