[libcalamares] Special-case for not-for-dash-o options
- The unpackfs module uses this to --bind-mount things without options.
This commit is contained in:
parent
5597215d58
commit
08537823ae
@ -58,16 +58,24 @@ mount( const QString& devicePath, const QString& mountPoint, const QString& file
|
||||
}
|
||||
}
|
||||
|
||||
QStringList args = { "mount", devicePath, mountPoint };
|
||||
QStringList args = { "mount" };
|
||||
|
||||
if ( !filesystemName.isEmpty() )
|
||||
{
|
||||
args << "-t" << filesystemName;
|
||||
}
|
||||
if ( !options.isEmpty() )
|
||||
{
|
||||
if ( options.startsWith( '-' ) )
|
||||
{
|
||||
args << options;
|
||||
}
|
||||
else
|
||||
{
|
||||
args << "-o" << options;
|
||||
}
|
||||
}
|
||||
args << devicePath << mountPoint;
|
||||
|
||||
auto r = CalamaresUtils::System::runCommand( args, 10 );
|
||||
sync();
|
||||
|
@ -36,6 +36,8 @@ namespace Partition
|
||||
* @param mountPoint the full path of the target mount point.
|
||||
* @param filesystemName the name of the filesystem (optional).
|
||||
* @param options any additional options as passed to mount -o (optional).
|
||||
* If @p options starts with a dash (-) then it is passed unchanged
|
||||
* and no -o option is added; this is used in handling --bind mounts.
|
||||
* @returns the program's exit code, or:
|
||||
* Crashed = QProcess crash
|
||||
* FailedToStart = QProcess cannot start
|
||||
|
Loading…
Reference in New Issue
Block a user