The exact errors are printed, the removed message does not seem to be
necessary. Return proper errors.
Signed-off-by: David Sterba <dsterba@suse.com>
{
int ret;
struct btrfs_trans_handle *trans;
-
struct stat root_st;
-
struct directory_name_entry dir_head;
-
struct directory_name_entry *dir_entry = NULL;
ret = lstat(source_dir, &root_st);
if (ret) {
error("unable to lstat %s: %s", source_dir, strerror(errno));
+ ret = -errno;
goto out;
}
free(dir_entry);
}
out:
- fprintf(stderr, "Making image is aborted.\n");
- return -1;
+ return ret;
}
/*