mirror of
https://github.com/systemd/systemd.git
synced 2025-03-11 20:58:27 +03:00
dissect-image: introduce dissected_image_relinquish()
This commit is contained in:
parent
c72aed4c20
commit
f906075a15
@ -2239,6 +2239,23 @@ int decrypted_image_relinquish(DecryptedImage *d) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int dissected_image_relinquish(DissectedImage *m) {
|
||||
int r;
|
||||
|
||||
assert(m);
|
||||
|
||||
if (m->decrypted_image) {
|
||||
r = decrypted_image_relinquish(m->decrypted_image);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
if (m->loop)
|
||||
loop_device_relinquish(m->loop);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static char *build_auxiliary_path(const char *image, const char *suffix) {
|
||||
const char *e;
|
||||
char *n;
|
||||
|
@ -285,7 +285,9 @@ int dissected_image_acquire_metadata(DissectedImage *m, DissectImageFlags extra_
|
||||
DecryptedImage* decrypted_image_ref(DecryptedImage *p);
|
||||
DecryptedImage* decrypted_image_unref(DecryptedImage *p);
|
||||
DEFINE_TRIVIAL_CLEANUP_FUNC(DecryptedImage*, decrypted_image_unref);
|
||||
|
||||
int decrypted_image_relinquish(DecryptedImage *d);
|
||||
int dissected_image_relinquish(DissectedImage *m);
|
||||
|
||||
const char* partition_designator_to_string(PartitionDesignator d) _const_;
|
||||
PartitionDesignator partition_designator_from_string(const char *name) _pure_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user