summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/VirtioFsDxe/FuseInit.c
Commit message (Collapse)AuthorAgeFilesLines
* OvmfPkg/VirtioFsDxe: implement the wrapper function for FUSE_WRITELaszlo Ersek2020-12-211-2/+10
| | | | | | | | | | | | | | | | Add the VirtioFsFuseWrite() function, for sending the FUSE_WRITE command to the Virtio Filesystem device. (For avoiding oversized FUSE_WRITE commands, save the maximum write buffer size that is advertized by the FUSE server, in the session init code.) Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3097 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20201216211125.19496-39-lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
* OvmfPkg/VirtioFsDxe: add a shared wrapper for FUSE_READ / FUSE_READDIRPLUSLaszlo Ersek2020-12-211-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Add the VirtioFsFuseReadFileOrDir() function, for sending the FUSE_READ or FUSE_READDIRPLUS command to the Virtio Filesystem device. Parsing the structured FUSE_READDIRPLUS output is complex, and cannot be integrated into the wrapper function. Given that fact, FUSE_READ and FUSE_READDIRPLUS turn out to need identical low-level handling, except for the opcode. Hence the shared wrapper function. (It's prudent to verify whether the FUSE server supports FUSE_READDIRPLUS, so update the session init code accordingly.) This is the first FUSE request wrapper function that deals with a variable size tail buffer. Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3097 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20201216211125.19496-33-lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
* OvmfPkg/VirtioFsDxe: submit the FUSE_INIT request to the deviceLaszlo Ersek2020-12-211-0/+132
Submit the FUSE_INIT request to the Virtio Filesystem device, for starting the FUSE session. The FUSE_INIT request is logged by the virtio-fs daemon, with this patch applied, when (for example) using the "CONNECT" UEFI shell command. Cc: Ard Biesheuvel <ard.biesheuvel@arm.com> Cc: Jordan Justen <jordan.l.justen@intel.com> Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3097 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Message-Id: <20201216211125.19496-9-lersek@redhat.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>