i created one script file (script.sh) inside that file i have written the command to mount
sudo mount -o umask=0 /dev/sdb1 /media/usb
sudo mount -o umask=0 /dev/sdb1 /media/usb
To copy to clipboard, switch view to plain text mode
i called this file using Qprocess,the result its mounted,
int Widget::process()
{
arguments << SCRIPTFILEPATH;
transcodescript.start(program, arguments);
status=transcodescript.waitForFinished(-1);
if(!status)
{
qDebug()<<"failed to mount";
}
return SUCCESS;
}
int Widget::process()
{
QProcess transcodescript;
QStringList arguments;
QString program ="/bin/sh";
arguments << SCRIPTFILEPATH;
transcodescript.start(program, arguments);
status=transcodescript.waitForFinished(-1);
if(!status)
{
qDebug()<<"failed to mount";
}
return SUCCESS;
}
To copy to clipboard, switch view to plain text mode
i dont get any error for this above command,but when i use that command in terminal its get mounting,,i know am doing some mistakes please can any one give me solution for this.
Thanks in Advance
Bookmarks