From dbd8cd879e1770e92b01e3bc1cbeb107460a51f2 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 15 May 2024 15:47:17 +0200 Subject: Show progress of upload by reading status.txt from dnbd3-fuse --- src/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') 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(); -- cgit v1.2.3-55-g7522