chiark / gitweb /
import/pull-dkr: V2 image specification and manifest support
authorPavel Odvody <podvody@redhat.com>
Tue, 19 May 2015 14:30:33 +0000 (16:30 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 08:57:22 +0000 (09:57 +0100)
The maximum number of layers changed to 127, as in Dkr.

src/shared/blkid-util.h

index c689310324f02ddf53bb745b84b367a57ba6f34e..33d18cb394ea95be8696138dbd01fd61b35fa64b 100644 (file)
@@ -1,7 +1,5 @@
 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 
-#pragma once
-
 /***
   This file is part of systemd.
 
   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);