Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: I84d1f641c7d493c268dcd26fceba863a042c490d
- Loading branch information
Change-Id: I84d1f641c7d493c268dcd26fceba863a042c490d
d3efd1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet, here's a definitive fix:
My fstab:
/emmc vfat /dev/block/mmcblk0p11
/sdcard vfat /dev/block/mmcblk1p1
actual code:
What happens:
First enter Advanced menu: all is displayed ok: list 7: sdcard, list 8: null, list 9: /emmc
Back to main menu, then return to advanced menu, what happens:
list 7: /sdcard, list 8: NULL ----> since it was memorized as /emmc, we loose the option to format /emmc, there is no list [9]
----> you can format /sdcard only, /emmc is no more displayed to format
*************** Clean fix method **********
.
.
.
In original code, if no second sdcard is inserted, it will show as if you can partition it and partitioning was successful while it is not
d3efd1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edited code above for fix
d3efd1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Provide a diff please
d3efd1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the bug may be in get_filtered_menu_selection. that should show menu items even if previous items were NULLed out.
d3efd1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If by diff you mean difference, here it is (I'd edit inline but it seems commits that way are not accepted...)
Original code in show_advanced_menu()
Becomes:
Then, in same void show_advanced_menu():
Original is:
Proposed changes that do work:
This will also fix the bug where we get a successful formatting output log on a non existing external sdcard because of the missing ensure_path_mounted() in partition_sdcard() function
See inline comments on my proposed edit
This will provide a clean fix until the bug source is identified as you suggested (get_filtered_menu_selection) or fflush(stdout)?
d3efd1f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cannot git diff, but here's a diff link from my repo
PhilZ-cwm6/philz_touch_cwm6@fddbc56
Just list [8] and [9] will be for you [7] and [8]