Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Pierre Couderc <pierre@couderc.eu>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Is there some doc or some example of libbtrfs ?
Date: Mon, 10 Aug 2020 17:13:27 +0200	[thread overview]
Message-ID: <20200810151327.GC2026@twin.jikos.cz> (raw)
In-Reply-To: <4bf44e81-0b4f-9c99-3010-410e110aec2d@couderc.eu>

On Fri, Aug 07, 2020 at 11:36:10AM +0200, Pierre Couderc wrote:
> Ho do I get programmatically the list of the snapshots of a volume in C/C++?
> 
> I can analyse the output of "btrfs li sh", but is there an easier way ?
> 
> I have found no doc or example...

Please don't use libbtrfs, that's going to be removed in the future.
There's a proper library libbtrfsutil. See
btrfs_util_create_subvolume_iterator.

  parent reply	other threads:[~2020-08-10 15:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-07  9:36 Is there some doc or some example of libbtrfs ? Pierre Couderc
2020-08-07 10:17 ` Nikolay Borisov
2020-08-07 10:38   ` Pierre Couderc
2020-08-07 15:20   ` Pierre Couderc
2020-08-10 15:13 ` David Sterba [this message]
2020-08-10 16:02   ` Pierre Couderc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200810151327.GC2026@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=pierre@couderc.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox