map.handle = r_list->map->handle; 
map.handle = (void *)(unsigned long) r_list->user_token; 
int drm_getmap( struct inode *inode, struct file *filp,		 unsigned int cmd, unsigned long arg ){	drm_file_t   *priv = filp->private_data;	drm_device_t *dev  = priv->head->dev;	drm_map_t    __user *argp = (void __user *)arg;	drm_map_t    map;	drm_map_list_t *r_list = NULL;	struct list_head *list;	int          idx;	int	     i;	if (copy_from_user(&map, argp, sizeof(map)))		return -EFAULT;	idx = map.offset;	down(&dev->struct_sem);	if (idx < 0) {		up(&dev->struct_sem);		return -EINVAL;	}	i = 0;	list_for_each(list, &dev->maplist->head) {		if(i == idx) {			r_list = list_entry(list, drm_map_list_t, head);			break;		}		i++;	}	if(!r_list || !r_list->map) {		up(&dev->struct_sem);		return -EINVAL;	}	map.offset = r_list->map->offset;	map.size   = r_list->map->size;	map.type   = r_list->map->type;	map.flags  = r_list->map->flags;	map.handle = r_list->map->handle;	map.mtrr   = r_list->map->mtrr;	up(&dev->struct_sem);	if (copy_to_user(argp, &map, sizeof(map))) return -EFAULT;	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/d1f2b55ad2c11f46e30547a9f7754e99b478348e/drm_ioctl.c/clean/drivers/char/drm/drm_ioctl.c