Function report |
Source Code:fs\char_dev.c |
Create Date:2022-07-28 20:02:46 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Called every time a character special file is opened
Proto:static int chrdev_open(struct inode *inode, struct file *filp)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct inode * | inode | |
| struct file * | filp |
| 378 | ret = 0 |
| 382 | If Not p Then |
| 385 | spin_unlock( & cdev_lock) |
| 386 | kobj = kobj_lookup(cdev_map, i_rdev, & idx) |
| 394 | If Not p Then |
| 397 | new = NULL |
| 402 | spin_unlock( & cdev_lock) |
| 409 | If Not fops Then Go to out_cdev_put |
| 412 | This one is to be used *ONLY* from ->open() instances.* fops must be non-NULL, pinned down *and* module dependencies* should be sufficient to pin the caller down as well.(filp, fops) |
| 413 | If open Then |
| 419 | Return 0 |
| 421 | out_cdev_put : |
| 423 | Return ret |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |