From: relan Date: Mon, 4 Dec 2017 06:46:58 +0000 (+0300) Subject: Pass "ro" option to FUSE when FS is read-only. X-Git-Tag: android-x86-9.0-r1~30 X-Git-Url: http://git.osdn.net/view?p=android-x86%2Fexternal-exfat.git;a=commitdiff_plain;h=b80f452a39ee1e39e1ee552b9bf7d82b335f84a6 Pass "ro" option to FUSE when FS is read-only. No matter the reason why FS is read-only (requested by user or device is write-protected), we should inform FUSE about this. --- diff --git a/fuse/main.c b/fuse/main.c index 17bd1ff..2fd523b 100644 --- a/fuse/main.c +++ b/fuse/main.c @@ -590,7 +590,7 @@ int main(int argc, char* argv[]) free(exfat_options); - fuse_options = add_fuse_options(fuse_options, spec, (ef.ro == -1)); + fuse_options = add_fuse_options(fuse_options, spec, ef.ro != 0); if (fuse_options == NULL) { exfat_unmount(&ef);