517N/A# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
517N/A# Use subject to license terms.
517N/A# Permission is hereby granted, free of charge, to any person obtaining a
517N/A# copy of this software and associated documentation files (the
517N/A# "Software"), to deal in the Software without restriction, including
517N/A# without limitation the rights to use, copy, modify, merge, publish,
517N/A# distribute,
and/or sell copies of the Software, and to permit persons
517N/A# to whom the Software is furnished to do so, provided that the above
517N/A# copyright notice(s) and this permission notice appear in all copies of
517N/A# the Software and that both the above copyright notice(s) and this
517N/A# permission notice appear in supporting documentation.
517N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
517N/A# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
517N/A# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
517N/A# OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
517N/A# HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
517N/A# INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
517N/A# FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
517N/A# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
517N/A# WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
517N/A# Except as contained in this notice, the name of a copyright holder
517N/A# shall not be used in advertising or otherwise to promote the sale, use
517N/A# or other dealings in this Software without prior written authorization
517N/A# of the copyright holder.
517N/A "\tIdentifier\t" BUILTIN_DEVICE_NAME "\n" \
517N/A+ * Allow setting an arbitrary number of options.
517N/A+ * Each option should be indented with a tab and newline terminated.
517N/A+#define BUILTIN_DEVICE_SECTION_PRE_OPT \
517N/A+ "Section \"Device\"\n" \
517N/A+ "\tIdentifier\t" BUILTIN_DEVICE_NAME "\n" \
517N/A+ "\tDriver\t\"%s\"\n" \
517N/A #define BUILTIN_DEVICE_SECTION_POST \
517N/A BUILTIN_DEVICE_SECTION_PRE \
517N/A BUILTIN_DEVICE_SECTION_POST
517N/A+/* Device section with options */
517N/A+#define BUILTIN_DEVICE_SECTION_OPT \
517N/A+ BUILTIN_DEVICE_SECTION_PRE_OPT \
517N/A+ BUILTIN_DEVICE_SECTION_POST
517N/A #define BUILTIN_MONITOR_NAME \
517N/A "\"Builtin Default Monitor\""
517N/A = { detectedDeviceList, fallbackDeviceList, NULL };
517N/A const char **p = detectedDeviceList;
517N/A+ const char *nvidia_string = "nvidia";
517N/A+ const char *nvidia_opt_no_logo = "\tOption \"NoLogo\" \"True\"\n";
517N/A pciVideoPtr *pciptr, info = NULL;
517N/A /* Special case from before the general case was set */
517N/A- detectedDeviceList[ddi++] = "nvidia";
517N/A+ detectedDeviceList[ddi++] = nvidia_string;
517N/A /* General case - split into vendor name & driver name */
517N/A for (d = deviceLists; *d ; d++) {
517N/A for (p = *d; *p; p++) {
517N/A+ if (!strncmp(*p, nvidia_string, sizeof(nvidia_string)))
517N/A+ snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION_OPT,
517N/A+ *p, 0, *p, nvidia_opt_no_logo);
517N/A snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION, *p, 0, *p);
517N/A snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION, *p, 0, *p, 0);