drivers/video/fbdev/core/fb_cmdline.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/core/fb_cmdline.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/core/fb_cmdline.c- Extension
.c- Size
- 1398 bytes
- Lines
- 62
- Domain
- Driver Families
- Bucket
- drivers/video
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
Dependency Surface
linux/export.hlinux/fb.hlinux/string.hvideo/cmdline.h
Detected Declarations
function Copyrightexport fb_get_options
Annotated Snippet
#include <linux/export.h>
#include <linux/fb.h>
#include <linux/string.h>
#include <video/cmdline.h>
/**
* fb_get_options - get kernel boot parameters
* @name: framebuffer name as it would appear in
* the boot parameter line
* (video=<name>:<options>)
* @option: the option will be stored here
*
* The caller owns the string returned in @option and is
* responsible for releasing the memory.
*
* NOTE: Needed to maintain backwards compatibility
*/
int fb_get_options(const char *name, char **option)
{
const char *options = NULL;
bool is_of = false;
bool enabled;
if (name)
is_of = !strncmp(name, "offb", 4);
enabled = __video_get_options(name, &options, is_of);
if (options) {
if (!strncmp(options, "off", 3))
enabled = false;
}
if (option) {
if (options)
*option = kstrdup(options, GFP_KERNEL);
else
*option = NULL;
}
return enabled ? 0 : 1; // 0 on success, 1 otherwise
}
EXPORT_SYMBOL(fb_get_options);
Annotation
- Immediate include surface: `linux/export.h`, `linux/fb.h`, `linux/string.h`, `video/cmdline.h`.
- Detected declarations: `function Copyright`, `export fb_get_options`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: integration 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.