void-packages/srcpkgs/trace-cmd/patches/fix-program-name.patch

24 lines
613 B
Diff

--- kernel-shark/src/kernelshark.cpp 2019-07-05 18:23:00.000000000 +0200
+++ kernel-shark/src/kernelshark.cpp 2019-07-08 17:52:19.081010524 +0200
@@ -35,6 +35,11 @@
{
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication a(argc, argv);
+ const char* program_name = strrchr(argv[0], '/');
+ if (nullptr == program_name)
+ program_name = argv[0];
+ else
+ ++program_name;
KsMainWindow ks;
@@ -48,7 +51,7 @@
return 0;
case 'v':
- printf("%s - %s\n", basename(argv[0]), KS_VERSION_STRING);
+ printf("%s - %s\n", program_name, KS_VERSION_STRING);
return 0;
case 'i':