File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -833,7 +833,9 @@ static bool checkUnpartitionedSpace() {
833833 TrimWhiteSpace (rootPart);
834834 if (startsWith (rootPart, SD_CARD_DEVICE)) {
835835 std::string lastPartNum = execAndReturn (" /usr/sbin/parted " + SD_CARD_DEVICE + " -ms unit s p | tail -n 1 | cut -f 1 -d:" );
836+ TrimWhiteSpace (lastPartNum);
836837 std::string startPos = execAndReturn (" /usr/sbin/parted " + SD_CARD_DEVICE + " -ms unit s p | grep \" ^" + lastPartNum + " \" | cut -f 2 -d: | sed 's/[^0-9]//g'" );
838+ TrimWhiteSpace (startPos);
837839 std::string fdiskInstructions = " p\n d\n " + lastPartNum + " \n n\n p\n " + lastPartNum + " \n " + startPos + " \n\n p\n w\n " ;
838840 PutFileContents (" /tmp/fdisk.cmds" , fdiskInstructions);
839841 exec (" /usr/sbin/fdisk " + SD_CARD_DEVICE + " < /tmp/fdisk.cmds" );
You can’t perform that action at this time.
0 commit comments