system/core
Révision | f0db8d044bbd06e824450e6673bacd8131a3c1f8 (tree) |
---|---|
l'heure | 2019-09-29 08:14:53 |
Auteur | android-build-team Robot <android-build-team-robot@goog...> |
Commiter | android-build-team Robot |
Snap for 5907400 from aebebeb92311f9867200238835eb0aced259a8b7 to qt-qpr1-release
Change-Id: Idd42e02b47610b4cadfe10ba06af2396f57dc147
@@ -245,11 +245,11 @@ static void check_fs(const std::string& blk_device, const std::string& fs_type, | ||
245 | 245 | if (should_force_check(*fs_stat)) { |
246 | 246 | ret = android_fork_execvp_ext( |
247 | 247 | ARRAY_SIZE(e2fsck_forced_argv), const_cast<char**>(e2fsck_forced_argv), &status, |
248 | - true, LOG_KLOG | LOG_FILE, true, const_cast<char*>(FSCK_LOG_FILE), NULL, 0); | |
248 | + true, LOG_KLOG | LOG_FILE, true, const_cast<char*>(FSCK_LOG_FILE), nullptr, 0); | |
249 | 249 | } else { |
250 | 250 | ret = android_fork_execvp_ext( |
251 | 251 | ARRAY_SIZE(e2fsck_argv), const_cast<char**>(e2fsck_argv), &status, true, |
252 | - LOG_KLOG | LOG_FILE, true, const_cast<char*>(FSCK_LOG_FILE), NULL, 0); | |
252 | + LOG_KLOG | LOG_FILE, true, const_cast<char*>(FSCK_LOG_FILE), nullptr, 0); | |
253 | 253 | } |
254 | 254 | |
255 | 255 | if (ret < 0) { |
@@ -263,13 +263,19 @@ static void check_fs(const std::string& blk_device, const std::string& fs_type, | ||
263 | 263 | } |
264 | 264 | } else if (is_f2fs(fs_type)) { |
265 | 265 | const char* f2fs_fsck_argv[] = {F2FS_FSCK_BIN, "-a", blk_device.c_str()}; |
266 | - LINFO << "Running " << F2FS_FSCK_BIN << " -a " << realpath(blk_device); | |
266 | + const char* f2fs_fsck_forced_argv[] = {F2FS_FSCK_BIN, "-f", blk_device.c_str()}; | |
267 | 267 | |
268 | - ret = android_fork_execvp_ext(ARRAY_SIZE(f2fs_fsck_argv), | |
269 | - const_cast<char **>(f2fs_fsck_argv), | |
270 | - &status, true, LOG_KLOG | LOG_FILE, | |
271 | - true, const_cast<char *>(FSCK_LOG_FILE), | |
272 | - NULL, 0); | |
268 | + if (should_force_check(*fs_stat)) { | |
269 | + LINFO << "Running " << F2FS_FSCK_BIN << " -f " << realpath(blk_device); | |
270 | + ret = android_fork_execvp_ext( | |
271 | + ARRAY_SIZE(f2fs_fsck_forced_argv), const_cast<char**>(f2fs_fsck_forced_argv), &status, | |
272 | + true, LOG_KLOG | LOG_FILE, true, const_cast<char*>(FSCK_LOG_FILE), nullptr, 0); | |
273 | + } else { | |
274 | + LINFO << "Running " << F2FS_FSCK_BIN << " -a " << realpath(blk_device); | |
275 | + ret = android_fork_execvp_ext( | |
276 | + ARRAY_SIZE(f2fs_fsck_argv), const_cast<char**>(f2fs_fsck_argv), &status, true, | |
277 | + LOG_KLOG | LOG_FILE, true, const_cast<char*>(FSCK_LOG_FILE), nullptr, 0); | |
278 | + } | |
273 | 279 | if (ret < 0) { |
274 | 280 | /* No need to check for error in fork, we can't really handle it now */ |
275 | 281 | LERROR << "Failed trying to run " << F2FS_FSCK_BIN; |