efi_capsule_write(9)
efi_capsule_write(9) πβ¨
Okay so bestie, welcome to the Kernel API Manual corner where todayβs main character is efi_capsule_write. Sheβs here to store the capsule binary and hand it off to the efi_capsule_update() API. Slay.
β¨ NAME β¨
efi_capsule_write β store the capsule binary and pass it to efi_capsule_update() API
πΈ SYNOPSIS πΈ
ssize_t efi_capsule_write (struct file *file , const char __user *buff ,
size_t count , loff_t *offp );
π ARGUMENTS π
fileβ file pointer. literally the file pointer, bestie.buffβ buffer pointer. the buffer in question.countβ number of bytes inbuff.offpβ not used. iconic βnot invited to the functionβ energy π
π DESCRIPTION π
Expectation:
- A user space tool should start at the beginning of capsule binary and pass data in sequentially.
- Users should close and re-open this file note in order to upload more capsules.
- After an error returned, user should close the file and restart the operation for the next try otherwise
-EIOwill be returned until the file is closed. - An EFI capsule header must be located at the beginning of capsule binary file and passed in as first block data of write operation.
lowkey important: that -EIO situation stays until the file is closed, so donβt just keep retrying into the void, okay? π«Ά
π¦ SEE ALSO π¦
- Kernel file
./drivers/firmware/efi/capsule-loader.c efi_free_all_buff_pages(9),efi_capsule_setup_info(9),efi_capsule_submit_update(9),efi_capsule_release(9),efi_capsule_open(9)
Source/version vibes: ./drivers/firmware/efi Β· date: October 2026. bye bestie, go write that capsule correctly ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms