-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/winusb: Re-implement clean_mounpoints and traps
Previously cleanup_mountpoints includes status report and unmounting and sync, which is unmaintainable, now we simplify the function to only do what it implies, cleanup_mountpoints(unmount and remove mounpoint directory) and separate status checking to independent trap functions. We also maded source_fs_mountpoint, target_fs_mountpoint and target_device global so it can be referenced by trap function whereever they're triggered, and also introduced current_state to determine whether we need to clean-up or not. Signed-off-by: 林博仁 <[email protected]>
- Loading branch information
Showing
1 changed file
with
108 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters