mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-11 01:46:14 +00:00
debugger: avoid global variable shadowing
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
862de5636f
commit
ae57cd7dc7
@ -418,7 +418,7 @@ static int
|
|||||||
wait_for_scratch_bo(void) {
|
wait_for_scratch_bo(void) {
|
||||||
struct sockaddr_un addr;
|
struct sockaddr_un addr;
|
||||||
uint32_t version;
|
uint32_t version;
|
||||||
int fd, ret, handle = -1;
|
int fd, ret, dh_handle = -1;
|
||||||
|
|
||||||
assert(sizeof(version) == sizeof(dh.version));
|
assert(sizeof(version) == sizeof(dh.version));
|
||||||
|
|
||||||
@ -478,7 +478,7 @@ wait_for_scratch_bo(void) {
|
|||||||
perror("write ack");
|
perror("write ack");
|
||||||
goto loop_out;
|
goto loop_out;
|
||||||
}
|
}
|
||||||
handle = dh.flink_handle;
|
dh_handle = dh.flink_handle;
|
||||||
if (debug > 0) {
|
if (debug > 0) {
|
||||||
printf("Handshake completed successfully\n"
|
printf("Handshake completed successfully\n"
|
||||||
"\tprotocol version = %d\n"
|
"\tprotocol version = %d\n"
|
||||||
@ -494,7 +494,7 @@ wait_for_scratch_bo(void) {
|
|||||||
|
|
||||||
done:
|
done:
|
||||||
close(fd);
|
close(fd);
|
||||||
return handle;
|
return dh_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -552,7 +552,7 @@ int main(int argc, char* argv[]) {
|
|||||||
* non-blocking versions of the functions.
|
* non-blocking versions of the functions.
|
||||||
*/
|
*/
|
||||||
if (!clear_waits) {
|
if (!clear_waits) {
|
||||||
int handle;
|
int dh_handle;
|
||||||
drm_fd = drm_open_any();
|
drm_fd = drm_open_any();
|
||||||
bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
|
bufmgr = drm_intel_bufmgr_gem_init(drm_fd, 4096);
|
||||||
|
|
||||||
@ -560,13 +560,13 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
/* We are probably root, make files world friendly */
|
/* We are probably root, make files world friendly */
|
||||||
umask(0);
|
umask(0);
|
||||||
handle = wait_for_scratch_bo();
|
dh_handle = wait_for_scratch_bo();
|
||||||
if (handle == -1) {
|
if (dh_handle == -1) {
|
||||||
printf("No handle from mesa, please enter manually: ");
|
printf("No handle from mesa, please enter manually: ");
|
||||||
if (fscanf(stdin, "%1d", &handle) == 0)
|
if (fscanf(stdin, "%1d", &dh_handle) == 0)
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
scratch_bo = intel_bo_gem_create_from_name(bufmgr, "scratch", handle);
|
scratch_bo = intel_bo_gem_create_from_name(bufmgr, "scratch", dh_handle);
|
||||||
if (scratch_bo == NULL) {
|
if (scratch_bo == NULL) {
|
||||||
fprintf(stderr, "Couldn't flink buffer\n");
|
fprintf(stderr, "Couldn't flink buffer\n");
|
||||||
abort();
|
abort();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user