summaryrefslogtreecommitdiffstats
path: root/src/shared/loop-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-12-02 19:32:09 +0100
committerLennart Poettering <lennart@poettering.net>2016-12-07 18:38:41 +0100
commita2ea3b2fc82bdd92cf782de61365113bb6ed9ca7 (patch)
treeefdba2410dff966d2f39158ca36de0c8a622fc7b /src/shared/loop-util.h
parentutil-lib: drop unnecessary NULL check (diff)
downloadsystemd-a2ea3b2fc82bdd92cf782de61365113bb6ed9ca7.tar.xz
systemd-a2ea3b2fc82bdd92cf782de61365113bb6ed9ca7.zip
dissect: add small "systemd-dissect" tool as wrapper around dissect-image.c
This adds a small tool that may be used to look into OS images, and mount them to any place. This is mostly a friendlier version of test-dissect-image.c. I am not sure this should really become a proper command of systemd, hence for now do not install it into bindir, but simply libexecdir. This tool is already pretty useful since you can mount image files with it, honouring the various partitions correctly. I figure this is going to become more interesting if the dissctor learns luks and verity support.
Diffstat (limited to '')
-rw-r--r--src/shared/loop-util.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/shared/loop-util.h b/src/shared/loop-util.h
index 5c847c4ac3..45fead5f18 100644
--- a/src/shared/loop-util.h
+++ b/src/shared/loop-util.h
@@ -29,11 +29,13 @@ struct LoopDevice {
int fd;
int nr;
char *node;
+ bool relinquished;
};
int loop_device_make(int fd, int open_flags, LoopDevice **ret);
int loop_device_make_by_path(const char *path, int open_flags, LoopDevice **ret);
LoopDevice* loop_device_unref(LoopDevice *d);
-
DEFINE_TRIVIAL_CLEANUP_FUNC(LoopDevice*, loop_device_unref);
+
+void loop_device_relinquish(LoopDevice *d);