diff options
author | Doug Zongker <dougz@android.com> | 2010-09-16 01:32:52 +0200 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-16 01:32:52 +0200 |
commit | 6b1ff61f62db82adf8e47c121cd13c29831ad21b (patch) | |
tree | 8c6fc308e9e26895a46aca7ba7e930dd83fe6a44 /mtdutils | |
parent | am bd4bc088: am d12560aa: add the ability to seek to a raw location while reading MTD partition (diff) | |
parent | am 8e5e4dad: close update package before installing; allow remount (diff) | |
download | android_bootable_recovery-6b1ff61f62db82adf8e47c121cd13c29831ad21b.tar android_bootable_recovery-6b1ff61f62db82adf8e47c121cd13c29831ad21b.tar.gz android_bootable_recovery-6b1ff61f62db82adf8e47c121cd13c29831ad21b.tar.bz2 android_bootable_recovery-6b1ff61f62db82adf8e47c121cd13c29831ad21b.tar.lz android_bootable_recovery-6b1ff61f62db82adf8e47c121cd13c29831ad21b.tar.xz android_bootable_recovery-6b1ff61f62db82adf8e47c121cd13c29831ad21b.tar.zst android_bootable_recovery-6b1ff61f62db82adf8e47c121cd13c29831ad21b.zip |
Diffstat (limited to 'mtdutils')
-rw-r--r-- | mtdutils/mounts.c | 8 | ||||
-rw-r--r-- | mtdutils/mounts.h | 2 | ||||
-rw-r--r-- | mtdutils/mtdutils.c | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/mtdutils/mounts.c b/mtdutils/mounts.c index 2ab3ff60c..c90fc8acf 100644 --- a/mtdutils/mounts.c +++ b/mtdutils/mounts.c @@ -212,3 +212,11 @@ unmount_mounted_volume(const MountedVolume *volume) } return ret; } + +int +remount_read_only(const MountedVolume* volume) +{ + return mount(volume->device, volume->mount_point, volume->filesystem, + MS_NOATIME | MS_NODEV | MS_NODIRATIME | + MS_RDONLY | MS_REMOUNT, 0); +} diff --git a/mtdutils/mounts.h b/mtdutils/mounts.h index 2e2765a93..30b2927c2 100644 --- a/mtdutils/mounts.h +++ b/mtdutils/mounts.h @@ -28,4 +28,6 @@ find_mounted_volume_by_mount_point(const char *mount_point); int unmount_mounted_volume(const MountedVolume *volume); +int remount_read_only(const MountedVolume* volume); + #endif // MTDUTILS_MOUNTS_H_ diff --git a/mtdutils/mtdutils.c b/mtdutils/mtdutils.c index d16f44ef8..48d5ea9ab 100644 --- a/mtdutils/mtdutils.c +++ b/mtdutils/mtdutils.c @@ -455,7 +455,7 @@ static int write_block(MtdWriteContext *ctx, const char *data) if (retry > 0) { fprintf(stderr, "mtd: wrote block after %d retries\n", retry); } - fprintf(stderr, "mtd: successfully wrote block at %x\n", pos); + fprintf(stderr, "mtd: successfully wrote block at %llx\n", pos); return 0; // Success! } |