summaryrefslogtreecommitdiff
path: root/src/libXNVCtrlAttributes/NvCtrlAttributes.c
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2009-12-22 17:16:00 -0800
committerAaron Plattner <aplattner@nvidia.com>2009-12-22 17:16:00 -0800
commit8787f02b434a05b0986499dcff0fb434e9360927 (patch)
tree4b0583bfc2bc61e728e7888ca643a81627be124e /src/libXNVCtrlAttributes/NvCtrlAttributes.c
parent25d9a353334be8c75255f61cff354c11163b0d08 (diff)
195.30195.30
Diffstat (limited to 'src/libXNVCtrlAttributes/NvCtrlAttributes.c')
-rw-r--r--src/libXNVCtrlAttributes/NvCtrlAttributes.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libXNVCtrlAttributes/NvCtrlAttributes.c b/src/libXNVCtrlAttributes/NvCtrlAttributes.c
index 4154807..682ad8f 100644
--- a/src/libXNVCtrlAttributes/NvCtrlAttributes.c
+++ b/src/libXNVCtrlAttributes/NvCtrlAttributes.c
@@ -708,15 +708,15 @@ NvCtrlGetValidStringDisplayAttributeValues(NvCtrlAttributeHandle *handle,
NvCtrlAttributePrivateHandle *h;
h = (NvCtrlAttributePrivateHandle *) handle;
- if (val) {
- memset(val, 0, sizeof(NVCTRLAttributeValidValuesRec));
- val->type = ATTRIBUTE_TYPE_UNKNOWN;
- val->permissions = ATTRIBUTE_TYPE_READ | ATTRIBUTE_TYPE_X_SCREEN;
- return NvCtrlSuccess;
- } else {
- return NvCtrlBadArgument;
+ if ((attr >= 0) && (attr <= NV_CTRL_STRING_LAST_ATTRIBUTE)) {
+ if (!h->nv) return NvCtrlMissingExtension;
+ return NvCtrlNvControlGetValidStringDisplayAttributeValues(h,
+ display_mask,
+ attr, val);
}
+ return NvCtrlBadArgument;
+
} /* NvCtrlGetValidStringDisplayAttributeValues() */