/*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/*
* fbc_get_properties - Get fbconf_xorg(1M) program properties
*/
#include <dlfcn.h> /* Dynamic linking: dlopen(), etc. */
#include <errno.h> /* errno */
#include <link.h>
#include <stdio.h> /* snprintf() */
#include <stdlib.h> /* exit() */
#include <string.h> /* strerror() */
#include "fbc.h" /* Common fbconf_xorg(1M) definitions */
#include "fbc_dev.h" /* Identify the graphics device (-dev opt) */
#include "fbc_error.h" /* Error reporting */
#include "fbc_get_properties.h" /* Get fbconf_xorg(1M) program properties */
/*
* fbc_get_properties()
*
* Return the fbconf_xorg(1M) properties for the specified frame
* buffer device type.
*/
int
{
int (*fb_get_properties)(
/* Device-specific properties functn */
/*
* Construct the pathname of the device-specific shared library
*/
fbc_errormsg("Unable to construct device library pathname, "
FBC_LIB_NAME_FMT "\n",
}
/*
* Open the shared library for this frame buffer device type
*/
if (lib_handle == NULL) {
/*
* Decide whether to inflict a great ugly informative message
*/
} else {
}
}
/*
* Make sure fbconf_xorg(1M) and this libSUNW*_conf.so use the same API
*/
fbc_errormsg("Unable to construct API version symbol name, "
FBC_API_VERSION_FMT "\n",
}
}
if (*fb_api_version != FBC_API_VERSION) {
fbc_errormsg("API version mismatch (expected %d, found %d), "
FBC_LIB_NAME_FMT " \n",
FBC_API_VERSION, /* fbconf_xorg(1M) */
*fb_api_version, /* libSUNW*_conf.so */
}
/*
* Construct the name of the device-specific properties function
*/
fbc_errormsg("Unable to construct function name, "
FBC_FUNC_NAME_FMT "\n",
}
/*
* Get the address of the device-specific properties function
*/
}
/*
* Gather up and return with the device-specific properties
*/
} /* fbc_get_properties() */
/* End of fbc_properties.c */