[PATCH 1/2] umr: Convert the last underscored parameters to dash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Convert --vm_partition and --vbios_info, to --vm-partition and --vbios-info,
respectively.

The old underscored versions are still supported and understood, however not
suggested in shell completion or printed in the help menu.

Now, for instance, completion on --vm looks much better.

Cc: Tom StDenis <tom.stdenis@xxxxxxx>
Signed-off-by: Luben Tuikov <luben.tuikov@xxxxxxx>
---
 doc/umr.1                   |  2 +-
 scripts/umr-completion.bash |  2 +-
 src/app/main.c              | 14 +++++++++-----
 3 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/doc/umr.1 b/doc/umr.1
index b462e2a56584b6..fcc50fe259a46b 100644
--- a/doc/umr.1
+++ b/doc/umr.1
@@ -30,7 +30,7 @@ loaded the corresponding instance will be automatically detected.
 .IP "--gfxoff, -go <0 | 1>"
 Turn on or off GFXOFF on select hardware.  A non-zero value enables the GFXOFF feature and
 a zero value disables it.
-.IP "--vm_partition, -vmp <-1, 0...n>"
+.IP "--vm-partition, -vmp <-1, 0...n>"
 Select a VM partition for all GPUVM accesses.  Default is -1 which
 refers to the 0'th instance of the VM hub which is not the same as
 specifying '0'.  Values above -1 are for ASICs with multiple IP instances.
diff --git a/scripts/umr-completion.bash b/scripts/umr-completion.bash
index 0b8beab97b9aec..1488dc10d6dc5c 100644
--- a/scripts/umr-completion.bash
+++ b/scripts/umr-completion.bash
@@ -333,7 +333,7 @@ _umr_comp_ring_stream()
 
 _umr_completion()
 {
-    local ALL_LONG_ARGS=(--database-path --option --gpu --instance --force --pci --gfxoff --vm_partition --bank --sbank --cbank --config --enumerate --list-blocks --list-regs --dump-discovery-table --lookup --write --writebit --read --scan --logscan --top --waves --profiler --vm-decode --vm-read --vm-write --vm-write-word --vm-disasm --ring-stream --dump-ib --dump-ib-file --header-dump --power --clock-scan --clock-manual --clock-high --clock-low --clock-auto --ppt-read --gpu-metrics --power --vbios_info --test-log --test-harness --server --gui)
+    local ALL_LONG_ARGS=(--database-path --option --gpu --instance --force --pci --gfxoff --vm-partition --bank --sbank --cbank --config --enumerate --list-blocks --list-regs --dump-discovery-table --lookup --write --writebit --read --scan --logscan --top --waves --profiler --vm-decode --vm-read --vm-write --vm-write-word --vm-disasm --ring-stream --dump-ib --dump-ib-file --header-dump --power --clock-scan --clock-manual --clock-high --clock-low --clock-auto --ppt-read --gpu-metrics --power --vbios-info --test-log --test-harness --server --gui)
 
     local cur prev
 
diff --git a/src/app/main.c b/src/app/main.c
index dbe85f94e025eb..aa2152f977367e 100644
--- a/src/app/main.c
+++ b/src/app/main.c
@@ -265,12 +265,14 @@ int main(int argc, char **argv)
 				fprintf(stderr, "[ERROR]: --instance requires a number\n");
 				return EXIT_FAILURE;
 			}
-		} else if (!strcmp(argv[i], "--vm_partition") || !strcmp(argv[i], "-vmp")) {
+		} else if (!strcmp(argv[i], "--vm-partition") ||
+			   !strcmp(argv[i], "--vm_partition") ||
+			   !strcmp(argv[i], "-vmp")) {
 			if (i + 1 < argc) {
 				options.vm_partition = atoi(argv[i+1]);
 				++i;
 			} else {
-				fprintf(stderr, "[ERROR]: --vm_partition requires a number\n");
+				fprintf(stderr, "[ERROR]: --vm-partition requires a number\n");
 				return EXIT_FAILURE;
 			}
 		} else if (!strcmp(argv[i], "--bank") || !strcmp(argv[i], "-b")) {
@@ -889,7 +891,9 @@ int main(int argc, char **argv)
 				asic = get_asic();
 			ih_self_test(asic);
 #endif
-		} else if (!strcmp(argv[i], "--vbios_info") || !strcmp(argv[i], "-vi")) {
+		} else if (!strcmp(argv[i], "--vbios-info") ||
+			   !strcmp(argv[i], "--vbios_info") ||
+			   !strcmp(argv[i], "-vi")) {
 			if (!asic)
 				asic = get_asic();
 			if (umr_print_vbios_info(asic) != 0)
@@ -955,7 +959,7 @@ int main(int argc, char **argv)
 "\n\t--gfxoff, -go <0 | 1>"
 	"\n\t\tEnable GFXOFF with a non-zero value or disable with a 0.  Used to control the GFXOFF feature on"
 	"\n\t\tselect hardware. Command without parameter will check GFXOFF status.\n"
-"\n\t--vm_partition, -vmp <-1, 0...n>"
+"\n\t--vm-partition, -vmp <-1, 0...n>"
 	"\n\t\tSelect a VM partition for all GPUVM accesses.  Default is -1 which"
 	"\n\t\trefers to the 0'th instance of the VM hub which is not the same as"
 	"\n\t\tspecifying '0'.  Values above -1 are for ASICs with multiple IP instances.\n"
@@ -1068,7 +1072,7 @@ printf(
 "\n\t--power, -p \n\t\tRead the conetent of clocks, temperature, gpu loading at runtime"
 	"\n\t\toptions 'use_colour' to colourize output \n"
 "\n*** Video BIOS Information ***\n"
-	"\n\t--vbios_info, -vi \n\t\tPrint Video BIOS information\n"
+	"\n\t--vbios-info, -vi \n\t\tPrint Video BIOS information\n"
 "\n*** Test Vector Generation ***\n"
 	"\n\t--test-log, -tl <filename>\n\t\tLog all MMIO/memory reads to a file\n"
 	"\n\t--test-harness, -th <filename>\n\t\tUse a test harness file instead of reading from hardware\n");

base-commit: 7a56fe819d76884a68c31d34e56f9e7c462da351
-- 
2.39.0.rc0




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux