Skip to content

Commit

Permalink
Merge pull request #427 from YorikSar/let-cptofs-fail
Browse files Browse the repository at this point in the history
cptofs: Don't overwrite failure with umount return value
  • Loading branch information
tavip committed Mar 10, 2018
2 parents 9b72637 + 394f2a4 commit 8772a4d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/lkl/cptofs.c
Expand Up @@ -560,7 +560,7 @@ int copy_one(const char *src, const char *mpoint, const char *dst)
int main(int argc, char **argv)
{
struct lkl_disk disk;
long ret;
long ret, umount_ret;
int i;
char mpoint[32];
unsigned int disk_id;
Expand Down Expand Up @@ -613,7 +613,9 @@ int main(int argc, char **argv)
break;
}

ret = lkl_umount_dev(disk_id, cla.part, 0, 1000);
umount_ret = lkl_umount_dev(disk_id, cla.part, 0, 1000);
if (ret == 0)
ret = umount_ret;

out_close:
close(disk.fd);
Expand Down

0 comments on commit 8772a4d

Please sign in to comment.