drivers/xen/xenfs/xenstored.c

Source file repositories/reference/linux-study-clean/drivers/xen/xenfs/xenstored.c

File Facts

System
Linux kernel
Corpus path
drivers/xen/xenfs/xenstored.c
Extension
.c
Size
1555 bytes
Lines
70
Domain
Driver Families
Bucket
drivers/xen
Inferred role
Driver Families: operation-table or driver-model contract
Status
pattern 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.

Dependency Surface

Detected Declarations

Annotated Snippet

const struct file_operations xsd_kva_file_ops = {
	.open = xsd_kva_open,
	.mmap = xsd_kva_mmap,
	.read = xsd_read,
	.release = xsd_release,
};

static int xsd_port_open(struct inode *inode, struct file *file)
{
	file->private_data = (void *)kasprintf(GFP_KERNEL, "%d",
					       xen_store_evtchn);
	if (!file->private_data)
		return -ENOMEM;
	return 0;
}

const struct file_operations xsd_port_file_ops = {
	.open = xsd_port_open,
	.read = xsd_read,
	.release = xsd_release,
};

Annotation

Implementation Notes