|
Lines 226-234
Link Here
|
| 226 |
|
226 |
|
| 227 |
FILE *exepipe = popen(command.ascii(), "r"); |
227 |
FILE *exepipe = popen(command.ascii(), "r"); |
| 228 |
if (exepipe) { |
228 |
if (exepipe) { |
| 229 |
TQString pmount_output; |
229 |
TQString eject_output; |
| 230 |
char buffer[8092]; |
230 |
TQTextStream ts(exepipe, IO_ReadOnly); |
| 231 |
pmount_output = fgets(buffer, sizeof(buffer), exepipe); |
231 |
eject_output = ts.read(); |
| 232 |
int retcode = pclose(exepipe); |
232 |
int retcode = pclose(exepipe); |
| 233 |
if (retcode == 0) { |
233 |
if (retcode == 0) { |
| 234 |
return TRUE; |
234 |
return TRUE; |
|
Lines 661-667
Link Here
|
| 661 |
optionString.insert(0, "-o "); |
661 |
optionString.insert(0, "-o "); |
| 662 |
} |
662 |
} |
| 663 |
|
663 |
|
| 664 |
if (mountOptions.contains("filesystem")) { |
664 |
if (mountOptions.contains("filesystem") && !mountOptions["filesystem"].isEmpty()) { |
| 665 |
optionString.append(TQString(" -t %1").arg(mountOptions["filesystem"])); |
665 |
optionString.append(TQString(" -t %1").arg(mountOptions["filesystem"])); |
| 666 |
} |
666 |
} |
| 667 |
|
667 |
|
|
Lines 681-687
Link Here
|
| 681 |
optionString.insert(0, "--mount-options "); |
681 |
optionString.insert(0, "--mount-options "); |
| 682 |
} |
682 |
} |
| 683 |
|
683 |
|
| 684 |
if (mountOptions.contains("filesystem")) { |
684 |
if (mountOptions.contains("filesystem") && !mountOptions["filesystem"].isEmpty()) { |
| 685 |
optionString.append(TQString(" --mount-fstype %1").arg(mountOptions["filesystem"])); |
685 |
optionString.append(TQString(" --mount-fstype %1").arg(mountOptions["filesystem"])); |
| 686 |
} |
686 |
} |
| 687 |
|
687 |
|
|
Lines 715-721
Link Here
|
| 715 |
optionString.append(" -s"); |
715 |
optionString.append(" -s"); |
| 716 |
} |
716 |
} |
| 717 |
|
717 |
|
| 718 |
if (mountOptions.contains("filesystem")) { |
718 |
if (mountOptions.contains("filesystem") && !mountOptions["filesystem"].isEmpty()) { |
| 719 |
optionString.append(TQString(" -t %1").arg(mountOptions["filesystem"])); |
719 |
optionString.append(TQString(" -t %1").arg(mountOptions["filesystem"])); |
| 720 |
} |
720 |
} |
| 721 |
|
721 |
|
|
Lines 736-747
Link Here
|
| 736 |
|
736 |
|
| 737 |
FILE *exepipe = popen(command.local8Bit(), "r"); |
737 |
FILE *exepipe = popen(command.local8Bit(), "r"); |
| 738 |
if (exepipe) { |
738 |
if (exepipe) { |
| 739 |
TQString pmount_output; |
739 |
TQString mount_output; |
| 740 |
char buffer[8092]; |
740 |
TQTextStream ts(exepipe, IO_ReadOnly); |
| 741 |
pmount_output = fgets(buffer, sizeof(buffer), exepipe); |
741 |
mount_output = ts.read(); |
| 742 |
*retcode = pclose(exepipe); |
742 |
*retcode = pclose(exepipe); |
| 743 |
if (errRet) { |
743 |
if (errRet) { |
| 744 |
*errRet = pmount_output; |
744 |
*errRet = mount_output; |
| 745 |
} |
745 |
} |
| 746 |
} |
746 |
} |
| 747 |
|
747 |
|
|
Lines 793-799
Link Here
|
| 793 |
optionString.append(" -s"); |
793 |
optionString.append(" -s"); |
| 794 |
} |
794 |
} |
| 795 |
|
795 |
|
| 796 |
if (mountOptions.contains("filesystem")) { |
796 |
if (mountOptions.contains("filesystem") && !mountOptions["filesystem"].isEmpty()) { |
| 797 |
optionString.append(TQString(" -t %1").arg(mountOptions["filesystem"])); |
797 |
optionString.append(TQString(" -t %1").arg(mountOptions["filesystem"])); |
| 798 |
} |
798 |
} |
| 799 |
|
799 |
|
|
Lines 810-821
Link Here
|
| 810 |
|
810 |
|
| 811 |
FILE *exepipe = popen(command.local8Bit(), "r"); |
811 |
FILE *exepipe = popen(command.local8Bit(), "r"); |
| 812 |
if (exepipe) { |
812 |
if (exepipe) { |
| 813 |
TQString pmount_output; |
813 |
TQString mount_output; |
| 814 |
char buffer[8092]; |
814 |
TQTextStream ts(exepipe, IO_ReadOnly); |
| 815 |
pmount_output = fgets(buffer, sizeof(buffer), exepipe); |
815 |
mount_output = ts.read(); |
| 816 |
*retcode = pclose(exepipe); |
816 |
*retcode = pclose(exepipe); |
| 817 |
if (errRet) { |
817 |
if (errRet) { |
| 818 |
*errRet = pmount_output; |
818 |
*errRet = mount_output; |
| 819 |
} |
819 |
} |
| 820 |
} |
820 |
} |
| 821 |
|
821 |
|
|
Lines 867-882
Link Here
|
| 867 |
|
867 |
|
| 868 |
FILE *exepipe = popen(command.local8Bit(), "r"); |
868 |
FILE *exepipe = popen(command.local8Bit(), "r"); |
| 869 |
if (exepipe) { |
869 |
if (exepipe) { |
| 870 |
TQString pmount_output; |
870 |
TQString umount_output; |
| 871 |
char buffer[8092]; |
871 |
TQTextStream ts(exepipe, IO_ReadOnly); |
| 872 |
pmount_output = fgets(buffer, sizeof(buffer), exepipe); |
872 |
umount_output = ts.read(); |
| 873 |
*retcode = pclose(exepipe); |
873 |
*retcode = pclose(exepipe); |
| 874 |
if (*retcode == 0) { |
874 |
if (*retcode == 0) { |
| 875 |
return true; |
875 |
return true; |
| 876 |
} |
876 |
} |
| 877 |
else { |
877 |
else { |
| 878 |
if (errRet) { |
878 |
if (errRet) { |
| 879 |
*errRet = pmount_output; |
879 |
*errRet = umount_output; |
| 880 |
} |
880 |
} |
| 881 |
} |
881 |
} |
| 882 |
} |
882 |
} |