From 92d0c2eeeb975b56293b6b317c02be6c35e8f532 Mon Sep 17 00:00:00 2001 From: Daniel Rosenberg Date: Mon, 13 May 2024 14:33:31 -0700 Subject: [PATCH] Fix vfat retry fsck logic On case 4 (filesystem modified), we attempt to recheck the filesystem, but due to the while(0), this immediately returns 0, resulting in mounting a filesystem with unfixed errors. This corrects that. Bug: 340128961 Test: Ensure case 4 leads to retries Change-Id: Ida2840538ad88c8de5341b0d71d3712d93b0cab1 --- fs/Vfat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/Vfat.cpp b/fs/Vfat.cpp index c0cd918..d9e2713 100644 --- a/fs/Vfat.cpp +++ b/fs/Vfat.cpp @@ -114,7 +114,7 @@ status_t Check(const std::string& source) { errno = EIO; return -1; } - } while (0); + } while (1); return 0; }