changelog shortlog graph tags branches changeset files revisions annotate raw help

Mercurial > core / lisp/ffi/btrfs/pkg.lisp

changeset 698: 96958d3eb5b0
parent: f57e2bbee438
author: Richard Westhaver <ellis@rwest.io>
date: Fri, 04 Oct 2024 22:04:59 -0400
permissions: -rw-r--r--
description: fixes
1 ;;; src/fs/btrfs/btrfs.lisp --- BTRFS common-lisp API
2 
3 ;; This package contains FFI bindings to the BTRFS C libraries libbtrfs and
4 ;; libbtrfsutil as well as some additional core routines from Rust.
5 
6 ;;; Commentary:
7 
8 ;; BTRFS is a core component of the NAS-T stack. We might even consider NAS-T as a
9 ;; wrapper around BTRFS APIs in the same we we could say that TrueNAS is a wrapper
10 ;; around ZFS.
11 
12 ;; NOTE 2023-09-03: currently the app has no concrete use-cases for accessing BTRFS APIs
13 ;; directly from lisp. This will inevitably change, and we want the bindings for
14 ;; debugging and experimentation.
15 
16 ;;; Code:
17 (defpackage btrfs/pkg
18  (:use :cl :std :sb-alien)
19  (:nicknames :btrfs)
20  (:export
21  :define-btrfs-ioctl
22  :btrfs-util-error :btrfs-util-error*
23  :btrfs-util-strerror
24  :btrfs-util-subvolume-iter-destroy
25  :btrfs-util-subvolume-iterator-get-fd
26  :btrfs-util-qgroup-inherit-destroy))
27 
28 (in-package :btrfs/pkg)
29 
30 (define-alien-loader "btrfs" t "/usr/lib/")
31 
32 (define-alien-loader "btrfsutil" t "/usr/lib/")
33 
34 (defmacro define-btrfs-ioctl () "Define a wrapper for IOCTLs exposed by BTRFS.")