Closed grische closed 6 years ago
According to https://github.com/clbr/radeontop/blob/master/radeontop.asc#options the option of -b should be used from the output of lspci. Unfortunately the input of -b needs to be decimal, while the output of lspci is hexadecimal: https://github.com/clbr/radeontop/blob/099045e52b2d417efc49215b2737b16bf2be74dc/radeontop.c#L124
-b
The atoi() could be replaced by a strtoul(), but this will break existing scripts of course.
atoi()
strtoul()
Should the logic of -b be changed to support hexadecimal arguments or should another parameter be added (e.g. -B) which allows hexadecimal inputs?
-B
It should be changed to read hex. Most machines have the bus < 10 (0xa).
According to https://github.com/clbr/radeontop/blob/master/radeontop.asc#options the option of
-b
should be used from the output of lspci. Unfortunately the input of-b
needs to be decimal, while the output of lspci is hexadecimal: https://github.com/clbr/radeontop/blob/099045e52b2d417efc49215b2737b16bf2be74dc/radeontop.c#L124The
atoi()
could be replaced by astrtoul()
, but this will break existing scripts of course.Should the logic of
-b
be changed to support hexadecimal arguments or should another parameter be added (e.g.-B
) which allows hexadecimal inputs?