Add TWFunc::Exec_Cmd() with no 'result' agrument

Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: Id8acff1ac9b3c7e4b562c80562a8ff42a1d132b9
This commit is contained in:
Vojtech Bocek
2013-09-11 08:11:56 +02:00
committed by Dees Troy
parent f193f88e6d
commit 05534209f1
8 changed files with 80 additions and 72 deletions
+7 -7
View File
@@ -1635,8 +1635,8 @@ int TWPartitionManager::Partition_SDCard(void) {
if (!SDext->UnMount(true))
return false;
}
string result;
TWFunc::Exec_Cmd("umount \"$SWAPPATH\"", result);
TWFunc::Exec_Cmd("umount \"$SWAPPATH\"");
Device = SDCard->Actual_Block_Device;
// Just use the root block device
Device.resize(strlen("/dev/block/mmcblkX"));
@@ -1688,7 +1688,7 @@ int TWPartitionManager::Partition_SDCard(void) {
gui_print("Removing partition table...\n");
Command = "parted -s " + Device + " mklabel msdos";
LOGINFO("Command is: '%s'\n", Command.c_str());
if (TWFunc::Exec_Cmd(Command, result) != 0) {
if (TWFunc::Exec_Cmd(Command) != 0) {
LOGERR("Unable to remove partition table.\n");
Update_System_Details();
return false;
@@ -1696,7 +1696,7 @@ int TWPartitionManager::Partition_SDCard(void) {
gui_print("Creating FAT32 partition...\n");
Command = "parted " + Device + " mkpartfs primary fat32 0 " + fat_str + "MB";
LOGINFO("Command is: '%s'\n", Command.c_str());
if (TWFunc::Exec_Cmd(Command, result) != 0) {
if (TWFunc::Exec_Cmd(Command) != 0) {
LOGERR("Unable to create FAT32 partition.\n");
return false;
}
@@ -1704,7 +1704,7 @@ int TWPartitionManager::Partition_SDCard(void) {
gui_print("Creating EXT partition...\n");
Command = "parted " + Device + " mkpartfs primary ext2 " + fat_str + "MB " + ext_str + "MB";
LOGINFO("Command is: '%s'\n", Command.c_str());
if (TWFunc::Exec_Cmd(Command, result) != 0) {
if (TWFunc::Exec_Cmd(Command) != 0) {
LOGERR("Unable to create EXT partition.\n");
Update_System_Details();
return false;
@@ -1714,7 +1714,7 @@ int TWPartitionManager::Partition_SDCard(void) {
gui_print("Creating swap partition...\n");
Command = "parted " + Device + " mkpartfs primary linux-swap " + ext_str + "MB " + swap_str + "MB";
LOGINFO("Command is: '%s'\n", Command.c_str());
if (TWFunc::Exec_Cmd(Command, result) != 0) {
if (TWFunc::Exec_Cmd(Command) != 0) {
LOGERR("Unable to create swap partition.\n");
Update_System_Details();
return false;
@@ -1749,7 +1749,7 @@ int TWPartitionManager::Partition_SDCard(void) {
Command = "mke2fs -t " + ext_format + " -m 0 " + SDext->Actual_Block_Device;
gui_print("Formatting sd-ext as %s...\n", ext_format.c_str());
LOGINFO("Formatting sd-ext after partitioning, command: '%s'\n", Command.c_str());
TWFunc::Exec_Cmd(Command, result);
TWFunc::Exec_Cmd(Command);
}
Update_System_Details();