X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fblkid-util.h;h=33d18cb394ea95be8696138dbd01fd61b35fa64b;hb=f06d8d073378b8ad349a537c639668bead5c1a07;hp=c689310324f02ddf53bb745b84b367a57ba6f34e;hpb=dd982f5f259ddb480a9cc13dc56c2ea52c61f5b2;p=elogind.git diff --git a/src/shared/blkid-util.h b/src/shared/blkid-util.h index c68931032..33d18cb39 100644 --- a/src/shared/blkid-util.h +++ b/src/shared/blkid-util.h @@ -1,7 +1,5 @@ /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -#pragma once - /*** This file is part of systemd. @@ -21,13 +19,19 @@ along with systemd; If not, see . ***/ -#ifdef HAVE_BLKID -#include -#endif +#pragma once +#include "sd-event.h" #include "util.h" -#ifdef HAVE_BLKID -DEFINE_TRIVIAL_CLEANUP_FUNC(blkid_probe, blkid_free_probe); -#define _cleanup_blkid_free_probe_ _cleanup_(blkid_free_probep) -#endif +typedef enum { DKR_PULL_V1, DKR_PULL_V2 } DkrPullVersion; +typedef struct DkrPull DkrPull; + +typedef void (*DkrPullFinished)(DkrPull *pull, int error, void *userdata); + +int dkr_pull_new(DkrPull **pull, sd_event *event, const char *index_url, const char *image_root, DkrPullFinished on_finished, void *userdata); +DkrPull* dkr_pull_unref(DkrPull *pull); + +DEFINE_TRIVIAL_CLEANUP_FUNC(DkrPull*, dkr_pull_unref); + +int dkr_pull_start(DkrPull *pull, const char *name, const char *tag, const char *local, bool force_local, DkrPullVersion version);