Documentation/usb/usbdevfs-drop-permissions.c
Source file repositories/reference/linux-study-clean/Documentation/usb/usbdevfs-drop-permissions.c
File Facts
- System
- Linux kernel
- Corpus path
Documentation/usb/usbdevfs-drop-permissions.c- Extension
.c- Size
- 2385 bytes
- Lines
- 121
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
sys/ioctl.hsys/types.hsys/stat.hfcntl.hstdio.herrno.hstring.hinttypes.hunistd.hlinux/usbdevice_fs.h
Detected Declarations
function drop_privilegesfunction reset_devicefunction claim_some_intffunction main
Annotated Snippet
switch (c) {
case 0:
goto exit;
case 1:
reset_device(fd);
break;
case 2:
claim_some_intf(fd);
break;
case 3:
printf("Insert new mask: ");
scanf("%x", &mask);
drop_privileges(fd, mask);
break;
default:
printf("I don't recognize that\n");
}
printf("Which test shall I run next?: ");
}
exit:
close(fd);
return 0;
err:
close(fd);
err_fd:
return 1;
}
Annotation
- Immediate include surface: `sys/ioctl.h`, `sys/types.h`, `sys/stat.h`, `fcntl.h`, `stdio.h`, `errno.h`, `string.h`, `inttypes.h`.
- Detected declarations: `function drop_privileges`, `function reset_device`, `function claim_some_intf`, `function main`.
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.