mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-08 00:16:18 +00:00
tools/intel_display_poller: Make pipe name alphabetic
Instead of raw numbers the user can now specify the pipe as 'a',b'... or 'A','B'... Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
This commit is contained in:
parent
01a2a4d85d
commit
a8b85ea21b
@ -1010,7 +1010,17 @@ int main(int argc, char *argv[])
|
||||
usage(argv[0]);
|
||||
break;
|
||||
case 'p':
|
||||
pipe = atoi(optarg);
|
||||
if (optarg[1] != '\0')
|
||||
usage(argv[0]);
|
||||
pipe = optarg[0];
|
||||
if (pipe >= 'a')
|
||||
pipe -= 'a';
|
||||
else if (pipe >= 'A')
|
||||
pipe -= 'A';
|
||||
else if (pipe >= '0')
|
||||
pipe -= '0';
|
||||
else
|
||||
usage(argv[0]);
|
||||
if (pipe < 0 || pipe > 2)
|
||||
usage(argv[0]);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user