Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\compat_ioctl.c Create Date:2022-07-28 18:00:59
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:compat_hdio_getgeo

Proto:static int compat_hdio_getgeo(struct gendisk *disk, struct block_device *bdev, struct compat_hd_geometry __user *ugeo)

Type:int

Parameter:

TypeParameterName
struct gendisk *disk
struct block_device *bdev
struct compat_hd_geometry __user *ugeo
58  If Not ugeo Then Return -EINVAL
60  If Not getgeo Then Return -ENOTTY
63  memset( & geo, 0, size of geo )
68  start = get_start_sect(bdev)
69  ret = getgeo(bdev, & geo)
70  If ret Then Return ret
73  ret = copy_to_user(ugeo, & geo, 4)
74  ret |= Write a simple value into user space(start, & start)
75  If ret Then ret = -EFAULT
78  Return ret
Caller
NameDescribe
compat_blkdev_ioctlMost of the generic ioctls are handled in the normal fallback path.This assumes the blkdev's low level compat_ioctl always returnsENOIOCTLCMD for unknown ioctls.