ARGSUSED */
| 5150 | |
| 5151 | /* ARGSUSED */ |
| 5152 | static int |
| 5153 | fdopen(struct cdev *dev, int mode, int type, struct thread *td) |
| 5154 | { |
| 5155 | |
| 5156 | /* |
| 5157 | * XXX Kludge: set curthread->td_dupfd to contain the value of the |
| 5158 | * the file descriptor being sought for duplication. The error |
| 5159 | * return ensures that the vnode for this device will be released |
| 5160 | * by vn_open. Open will detect this special error and take the |
| 5161 | * actions in dupfdopen below. Other callers of vn_open or VOP_OPEN |
| 5162 | * will simply report the error. |
| 5163 | */ |
| 5164 | td->td_dupfd = dev2unit(dev); |
| 5165 | return (ENODEV); |
| 5166 | } |
| 5167 | |
| 5168 | static struct cdevsw fildesc_cdevsw = { |
| 5169 | .d_version = D_VERSION, |
no outgoing calls