From f06d8d073378b8ad349a537c639668bead5c1a07 Mon Sep 17 00:00:00 2001 From: Pavel Odvody Date: Tue, 19 May 2015 16:30:33 +0200 Subject: [PATCH 1/1] import/pull-dkr: V2 image specification and manifest support The maximum number of layers changed to 127, as in Dkr. --- src/shared/blkid-util.h | 22 +++++++++++++--------- 1 file 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 . ***/ -#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); -- 2.30.2