mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-20 18:05:21 -04:00
[ext2fs] return a more explicit error on directory corruption
This commit is contained in:
parent
4cdbad283a
commit
1dcfd69dee
2 changed files with 7 additions and 8 deletions
|
@ -406,14 +406,14 @@ BOOL FormatExtFs(DWORD DriveIndex, uint64_t PartitionOffset, DWORD BlockSize, LP
|
|||
// Create root and lost+found dirs
|
||||
r = ext2fs_mkdir(ext2fs, EXT2_ROOT_INO, EXT2_ROOT_INO, 0);
|
||||
if (r != 0) {
|
||||
SET_EXT2_FORMAT_ERROR(ERROR_DIR_NOT_ROOT);
|
||||
SET_EXT2_FORMAT_ERROR(ERROR_FILE_CORRUPT);
|
||||
uprintf("Failed to create %s root dir: %s", FSName, error_message(r));
|
||||
goto out;
|
||||
}
|
||||
ext2fs->umask = 077;
|
||||
r = ext2fs_mkdir(ext2fs, EXT2_ROOT_INO, 0, "lost+found");
|
||||
if (r != 0) {
|
||||
SET_EXT2_FORMAT_ERROR(ERROR_DIR_NOT_ROOT);
|
||||
SET_EXT2_FORMAT_ERROR(ERROR_FILE_CORRUPT);
|
||||
uprintf("Failed to create %s 'lost+found' dir: %s", FSName, error_message(r));
|
||||
goto out;
|
||||
}
|
||||
|
@ -491,7 +491,6 @@ BOOL FormatExtFs(DWORD DriveIndex, uint64_t PartitionOffset, DWORD BlockSize, LP
|
|||
goto out;
|
||||
}
|
||||
UpdateProgressWithInfo(OP_FORMAT, MSG_217, 100, 100);
|
||||
uprintf("Done");
|
||||
ret = TRUE;
|
||||
|
||||
out:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue