mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
[libcalamares] Tidy up documentation for System::runCommand
- Make explicit which one runs in the host, which one is selectable. - Document *location* parameter in the selectable version. - Tidy up alignment of apidox.
This commit is contained in:
parent
00293d1111
commit
b4aca7e188
1 changed files with 25 additions and 23 deletions
|
@ -139,32 +139,33 @@ public:
|
||||||
RunInTarget
|
RunInTarget
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** @brief Runs a command in the host or the target (select explicitly)
|
||||||
* Runs the specified command in the chroot of the target system.
|
*
|
||||||
* @param args the command with arguments, as a string list.
|
* @param location whether to run in the host or the target
|
||||||
* @param workingPath the current working directory for the QProcess
|
* @param args the command with arguments, as a string list.
|
||||||
* call (optional).
|
* @param workingPath the current working directory for the QProcess
|
||||||
* @param stdInput the input string to send to the running process as
|
* call (optional).
|
||||||
* standard input (optional).
|
* @param stdInput the input string to send to the running process as
|
||||||
* @param timeoutSec the timeout after which the process will be
|
* standard input (optional).
|
||||||
* killed (optional, default is 0 i.e. no timeout).
|
* @param timeoutSec the timeout after which the process will be
|
||||||
*
|
* killed (optional, default is 0 i.e. no timeout).
|
||||||
* @returns the program's exit code and its output (if any). Special
|
*
|
||||||
* exit codes (which will never have any output) are:
|
* @returns the program's exit code and its output (if any). Special
|
||||||
* Crashed = QProcess crash
|
* exit codes (which will never have any output) are:
|
||||||
* FailedToStart = QProcess cannot start
|
* Crashed = QProcess crash
|
||||||
* NoWorkingDirectory = bad arguments
|
* FailedToStart = QProcess cannot start
|
||||||
* TimedOut = QProcess timeout
|
* NoWorkingDirectory = bad arguments
|
||||||
*/
|
* TimedOut = QProcess timeout
|
||||||
|
*/
|
||||||
static DLLEXPORT ProcessResult runCommand( RunLocation location,
|
static DLLEXPORT ProcessResult runCommand( RunLocation location,
|
||||||
const QStringList& args,
|
const QStringList& args,
|
||||||
const QString& workingPath = QString(),
|
const QString& workingPath = QString(),
|
||||||
const QString& stdInput = QString(),
|
const QString& stdInput = QString(),
|
||||||
std::chrono::seconds timeoutSec = std::chrono::seconds( 0 ) );
|
std::chrono::seconds timeoutSec = std::chrono::seconds( 0 ) );
|
||||||
|
|
||||||
/** @brief Convenience wrapper for runCommand()
|
/** @brief Convenience wrapper for runCommand() in the host
|
||||||
*
|
*
|
||||||
* Runs the given command-line @p args in the host in the current direcory
|
* Runs the given command-line @p args in the **host** in the current direcory
|
||||||
* with no input, and the given @p timeoutSec for completion.
|
* with no input, and the given @p timeoutSec for completion.
|
||||||
*/
|
*/
|
||||||
static inline ProcessResult runCommand( const QStringList& args, std::chrono::seconds timeoutSec )
|
static inline ProcessResult runCommand( const QStringList& args, std::chrono::seconds timeoutSec )
|
||||||
|
@ -173,10 +174,11 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @brief Convenience wrapper for runCommand().
|
/** @brief Convenience wrapper for runCommand().
|
||||||
* Runs the command in the location specified through the boolean
|
*
|
||||||
* doChroot(), which is what you usually want for running commands
|
* Runs the command in the location specified through the boolean
|
||||||
* during installation.
|
* doChroot(), which is what you usually want for running commands
|
||||||
*/
|
* during installation.
|
||||||
|
*/
|
||||||
inline ProcessResult targetEnvCommand( const QStringList& args,
|
inline ProcessResult targetEnvCommand( const QStringList& args,
|
||||||
const QString& workingPath = QString(),
|
const QString& workingPath = QString(),
|
||||||
const QString& stdInput = QString(),
|
const QString& stdInput = QString(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue