summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Odvody <podvody@redhat.com>2015-05-19 16:30:33 +0200
committerSven Eden <yamakuzure@gmx.net>2017-03-14 09:57:22 +0100
commitf06d8d073378b8ad349a537c639668bead5c1a07 (patch)
tree67a70da44a48c5e4b5c688125446efbc48403fb0
parentdd982f5f259ddb480a9cc13dc56c2ea52c61f5b2 (diff)
import/pull-dkr: V2 image specification and manifest support
The maximum number of layers changed to 127, as in Dkr.
-rw-r--r--src/shared/blkid-util.h22
1 files changed, 13 insertions, 9 deletions
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 <http://www.gnu.org/licenses/>.
***/
-#ifdef HAVE_BLKID
-#include <blkid/blkid.h>
-#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);