mirror of
https://github.com/morgan9e/systemd
synced 2026-04-15 17:06:39 +09:00
This does what the previous commit did for systemd-import the same way for systemd-pull. It also adds one more thing: the checksum validation is extended, in addition of doing SHA256SUMS/gpg verification it is now possible to immediately specify a hash value on the command line that the download needs to match. This is particularly useful in --direct mode as we can download/decompress/unpack arbitrary files and check the hash of the downloaded file on-the-fly.
20 lines
649 B
C
20 lines
649 B
C
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
#pragma once
|
|
|
|
#include "sd-event.h"
|
|
|
|
#include "import-util.h"
|
|
#include "macro.h"
|
|
#include "pull-common.h"
|
|
|
|
typedef struct RawPull RawPull;
|
|
|
|
typedef void (*RawPullFinished)(RawPull *pull, int error, void *userdata);
|
|
|
|
int raw_pull_new(RawPull **pull, sd_event *event, const char *image_root, RawPullFinished on_finished, void *userdata);
|
|
RawPull* raw_pull_unref(RawPull *pull);
|
|
|
|
DEFINE_TRIVIAL_CLEANUP_FUNC(RawPull*, raw_pull_unref);
|
|
|
|
int raw_pull_start(RawPull *pull, const char *url, const char *local, uint64_t offset, uint64_t size_max, PullFlags flags, ImportVerify verify, const char *checksum);
|