diff options
author | Armin Rigo <arigo@tunes.org> | 2016-01-07 16:47:24 +0100 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2016-01-07 16:47:24 +0100 |
commit | 0a6c5cdfb6c6d1988938e25d74548e43a29400d8 (patch) | |
tree | d5e1e7a78167f21aff849446fa29ceda0b715389 /demo | |
parent | a0c3bad4db26239c0d1be8e918336ba071d2318f (diff) | |
download | cffi-0a6c5cdfb6c6d1988938e25d74548e43a29400d8.tar.gz |
just killing the verify() line is not enough
Diffstat (limited to 'demo')
-rw-r--r-- | demo/btrfs-snap.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/demo/btrfs-snap.py b/demo/btrfs-snap.py index f8e711f..fceeaa1 100644 --- a/demo/btrfs-snap.py +++ b/demo/btrfs-snap.py @@ -22,6 +22,13 @@ ffi.cdef(""" }; """) +ffi.set_source("_btrfs_cffi", "#include <btrfs/ioctl.h>") +ffi.compile() + +# ____________________________________________________________ + + +from _btrfs_cffi import ffi, lib parser = argparse.ArgumentParser(usage=__doc__.strip()) parser.add_argument('source', help='source subvolume') @@ -38,7 +45,7 @@ args.name = opts.newname args.fd = source args_buffer = ffi.buffer(args) try: - fcntl.ioctl(target, v.BTRFS_IOC_SNAP_CREATE_V2, args_buffer) + fcntl.ioctl(target, lib.BTRFS_IOC_SNAP_CREATE_V2, args_buffer) except IOError as e: print e sys.exit(1) |