FreeBSD/sys/dev/drm2/drm_drv.c
/**
 * Get version information
 *
 * \param inode device inode.
 * \param filp file pointer.
 * \param cmd command.
 * \param arg user argument, pointing to a drm_version structure.
 * \return zero on success or negative number on failure.
 *
 * Fills in the version information in \p arg.
 */
Get version information
\param inode device inode.
\param filp file pointer.
\param cmd command.
\param arg user argument, pointing to a drm_version structure.
\return zero on success or negative number on failure.

Fills in the version information in \p arg.
Get version information \ param inode device inode . \ param filp file pointer . \ param cmd command . \ param arg user argument pointing to a drm_version structure . \ return zero on success or negative number on failure . Fills in the version information in \ p arg .
int drm_version(struct drm_device *dev, void *data,
		       struct drm_file *file_priv)
{
	struct drm_version *version = data;
	int err;
	version->version_major = dev->driver->major;
	version->version_minor = dev->driver->minor;
	version->version_patchlevel = dev->driver->patchlevel;
	err = drm_copy_field(version->name, &version->name_len,
			dev->driver->name);
	if (!err)
		err = drm_copy_field(version->date, &version->date_len,
				dev->driver->date);
	if (!err)
		err = drm_copy_field(version->desc, &version->desc_len,
				dev->driver->desc);
	return err;
}
int drm_version ( struct drm_device * dev , void * data , struct drm_file * file_priv ) { struct drm_version * version = data ; int err ; version -> version_major = dev -> driver -> major ; version -> version_minor = dev -> driver -> minor ; version -> version_patchlevel = dev -> driver -> patchlevel ; err = drm_copy_field ( version -> name , & version -> name_len , dev -> driver -> name ) ; if ( ! err ) err = drm_copy_field ( version -> date , & version -> date_len , dev -> driver -> date ) ; if ( ! err ) err = drm_copy_field ( version -> desc , & version -> desc_len , dev -> driver -> desc ) ; return err ; }
Get version information
 \param inode device inode.
Get version information \ param inode device inode .