diff options
author | Simon Rettberg | 2024-05-15 15:47:17 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-05-15 15:47:17 +0200 |
commit | dbd8cd879e1770e92b01e3bc1cbeb107460a51f2 (patch) | |
tree | 7c10b4786aeedaa9d4b6390ce2b2725ea5043672 /src/main.cpp | |
parent | Fix displaying of progess, add debug log messages (diff) | |
download | cowgui-dbd8cd879e1770e92b01e3bc1cbeb107460a51f2.tar.gz cowgui-dbd8cd879e1770e92b01e3bc1cbeb107460a51f2.tar.xz cowgui-dbd8cd879e1770e92b01e3bc1cbeb107460a51f2.zip |
Show progress of upload by reading status.txt from dnbd3-fuse
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index bbb70a5..134f3a9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,9 +20,13 @@ int main(int argc, char **argv) QCommandLineOption pidOption(QStringList() << QLatin1String("pid") << QLatin1String("p"), QObject::tr("PID of dnbd3-fuse, so we can cancel the upload via SIGQUIT on abort"), QLatin1String("pid")); + QCommandLineOption statusOption(QStringList() << QLatin1String("status") << QLatin1String("f"), + QObject::tr("Path to dnbd3-fuse cow status file"), + QLatin1String("path")); parser.addOption(sessionOption); parser.addOption(urlOption); parser.addOption(pidOption); + parser.addOption(statusOption); parser.process(app); if (!parser.isSet(sessionOption) || !parser.isSet(urlOption) || !parser.isSet(pidOption)) { @@ -31,7 +35,7 @@ int main(int argc, char **argv) return 1; } - Gui window(parser.value(urlOption), parser.value(sessionOption), parser.value(pidOption).toInt()); + Gui window(parser.value(urlOption), parser.value(sessionOption), parser.value(pidOption).toInt(), parser.value(statusOption)); window.show(); return QGuiApplication::exec(); |