diff options
| author | Dave Airlie <airlied@redhat.com> | 2007-12-03 13:42:32 +1000 | 
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2007-12-03 15:30:05 +1000 | 
| commit | 96df9b11ad8974d7a2a0a589114cbbb04a584f18 (patch) | |
| tree | 1d1abe533919afcdc3530a214eb43fcf78e51dbf /tests | |
| parent | 91cd3e3c097d581ea75ec4bcbc1ba8d23b471a2e (diff) | |
finish of mode add/remove, just have attach/detach modes
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/mode/modetest.c | 19 | 
1 files changed, 2 insertions, 17 deletions
| diff --git a/tests/mode/modetest.c b/tests/mode/modetest.c index 2871fde4..1d5002b0 100644 --- a/tests/mode/modetest.c +++ b/tests/mode/modetest.c @@ -201,45 +201,30 @@ int testMode(int fd, drmModeResPtr res)  	int ret = 0;  	int error = 0; -#if 0  	printf("Test: adding mode to output %i\n", output);  	/* printMode(&mode); */ -	printf("\tAdding mode\n"); -	newMode = drmModeAddMode(fd, &mode); -	if (!newMode) -		goto err; -  	printf("\tAttaching mode %i to output %i\n", newMode, output); -	ret = drmModeAttachMode(fd, output, newMode); +	ret = drmModeAttachMode(fd, output, &mode);  	if (ret)  		goto err_mode;  	printf("\tDetaching mode %i from output %i\n", newMode, output); -	ret = drmModeDetachMode(fd, output, newMode); +	ret = drmModeDetachMode(fd, output, &mode);  	if (ret)  		goto err_mode; - -	printf("\tRemoveing new mode %i\n", newMode); -	ret = drmModeRmMode(fd, newMode); -	if (ret) -		goto err; -  	return 0;  err_mode: -	error = drmModeRmMode(fd, newMode); -err:  	printf("\tFailed\n");  	if (error)  		printf("\tFailed to delete mode %i\n", newMode); -#endif  	return 1;  } | 
