summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Runge <mrunge@google.com>2014-10-25 04:37:16 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2014-10-25 04:37:16 +0200
commitf997340fe84cefd84d0a5d4aed5fbbd7a19784d6 (patch)
tree38ef2272bb6256e787dbc8ebbde26c2a961c01d2
parentam 944fc5e6: am 915d661c: am 68802416: unconditionally apply SELinux labels to symlinks (diff)
parentam fe8563f4: am 5ddf4293: Log mount/unmount errors to UI (diff)
downloadandroid_bootable_recovery-f997340fe84cefd84d0a5d4aed5fbbd7a19784d6.tar
android_bootable_recovery-f997340fe84cefd84d0a5d4aed5fbbd7a19784d6.tar.gz
android_bootable_recovery-f997340fe84cefd84d0a5d4aed5fbbd7a19784d6.tar.bz2
android_bootable_recovery-f997340fe84cefd84d0a5d4aed5fbbd7a19784d6.tar.lz
android_bootable_recovery-f997340fe84cefd84d0a5d4aed5fbbd7a19784d6.tar.xz
android_bootable_recovery-f997340fe84cefd84d0a5d4aed5fbbd7a19784d6.tar.zst
android_bootable_recovery-f997340fe84cefd84d0a5d4aed5fbbd7a19784d6.zip
Diffstat (limited to '')
-rw-r--r--updater/install.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/updater/install.c b/updater/install.c
index db2bd3295..ff7de4793 100644
--- a/updater/install.c
+++ b/updater/install.c
@@ -151,13 +151,13 @@ Value* MountFn(const char* name, State* state, int argc, Expr* argv[]) {
const MtdPartition* mtd;
mtd = mtd_find_partition_by_name(location);
if (mtd == NULL) {
- printf("%s: no mtd partition named \"%s\"",
+ uiPrintf(state, "%s: no mtd partition named \"%s\"",
name, location);
result = strdup("");
goto done;
}
if (mtd_mount_partition(mtd, mount_point, fs_type, 0 /* rw */) != 0) {
- printf("mtd mount of %s failed: %s\n",
+ uiPrintf(state, "mtd mount of %s failed: %s\n",
location, strerror(errno));
result = strdup("");
goto done;
@@ -167,7 +167,7 @@ Value* MountFn(const char* name, State* state, int argc, Expr* argv[]) {
if (mount(location, mount_point, fs_type,
MS_NOATIME | MS_NODEV | MS_NODIRATIME,
has_mount_options ? mount_options : "") < 0) {
- printf("%s: failed to mount %s at %s: %s\n",
+ uiPrintf(state, "%s: failed to mount %s at %s: %s\n",
name, location, mount_point, strerror(errno));
result = strdup("");
} else {
@@ -231,10 +231,14 @@ Value* UnmountFn(const char* name, State* state, int argc, Expr* argv[]) {
scan_mounted_volumes();
const MountedVolume* vol = find_mounted_volume_by_mount_point(mount_point);
if (vol == NULL) {
- printf("unmount of %s failed; no such volume\n", mount_point);
+ uiPrintf(state, "unmount of %s failed; no such volume\n", mount_point);
result = strdup("");
} else {
- unmount_mounted_volume(vol);
+ int ret = unmount_mounted_volume(vol);
+ if (ret != 0) {
+ uiPrintf(state, "unmount of %s failed (%d): %s\n",
+ mount_point, ret, strerror(errno));
+ }
result = mount_point;
}