-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: do not renumber logical parts after removing a primary
The renumber_logical_partition function does not do the right thing if called after removing a primary partition. As it is today, the implementation does not ensure that the new partition numbers are in the range of logical partition numbers. As a consequence, if we remove partition 1 from a MSDOS partition table, the logical partitions will be renumbered 2, 3, 4, ... which are not in the 5+ range. The new numbers might also conflict with primary partition 2, 3, and 4 if they exist. Fixed by invoking the function only after removing a logical partition. Signed-off-by: Olivier Gayot <[email protected]>
- Loading branch information
Showing
2 changed files
with
51 additions
and
1 deletion.
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
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