diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-03-09 17:55:07 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-03-09 18:02:23 +0100 |
commit | 587fec427c80b6c34dcf1d7570f891fcb652a7c5 (patch) | |
tree | 0b8f6e748ac8ecc34cbe6d03327532fb52a0e85b /src/import/export-raw.h | |
parent | ea79e73b8a8fa72fb959a0604f642f97e200a803 (diff) | |
download | systemd-587fec427c80b6c34dcf1d7570f891fcb652a7c5.tar.gz |
importd: add API for exporting container/VM images
Also, expose it in machinectl.
Diffstat (limited to 'src/import/export-raw.h')
-rw-r--r-- | src/import/export-raw.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/import/export-raw.h b/src/import/export-raw.h new file mode 100644 index 0000000000..b71de6cb82 --- /dev/null +++ b/src/import/export-raw.h @@ -0,0 +1,37 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +#pragma once + +/*** + This file is part of systemd. + + Copyright 2015 Lennart Poettering + + systemd is free software; you can redistribute it and/or modify it + under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + systemd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with systemd; If not, see <http://www.gnu.org/licenses/>. +***/ + +#include "sd-event.h" +#include "macro.h" +#include "import-compress.h" + +typedef struct RawExport RawExport; + +typedef void (*RawExportFinished)(RawExport *export, int error, void *userdata); + +int raw_export_new(RawExport **export, sd_event *event, RawExportFinished on_finished, void *userdata); +RawExport* raw_export_unref(RawExport *export); + +DEFINE_TRIVIAL_CLEANUP_FUNC(RawExport*, raw_export_unref); + +int raw_export_start(RawExport *export, const char *path, int fd, ImportCompressType compress); |