summaryrefslogtreecommitdiff
path: root/src/sysupdate
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-09-12 00:07:17 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-09-18 23:47:20 +0900
commite330f97a89607d0e0fd9e42dd151b6245d067987 (patch)
tree18b49d945d97184bdab73eb2359a95a6116300c5 /src/sysupdate
parent3044d343ddcd090214ac0fdfa2cc1a5b4da93dc1 (diff)
downloadsystemd-e330f97a89607d0e0fd9e42dd151b6245d067987.tar.gz
tree-wide: drop unused reference to DecryptedImage
Diffstat (limited to 'src/sysupdate')
-rw-r--r--src/sysupdate/sysupdate.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/sysupdate/sysupdate.c b/src/sysupdate/sysupdate.c
index 7dcfac1261..c24ae532dd 100644
--- a/src/sysupdate/sysupdate.c
+++ b/src/sysupdate/sysupdate.c
@@ -855,17 +855,14 @@ static int reboot_now(void) {
static int process_image(
bool ro,
char **ret_mounted_dir,
- LoopDevice **ret_loop_device,
- DecryptedImage **ret_decrypted_image) {
+ LoopDevice **ret_loop_device) {
_cleanup_(loop_device_unrefp) LoopDevice *loop_device = NULL;
- _cleanup_(decrypted_image_unrefp) DecryptedImage *decrypted_image = NULL;
_cleanup_(umount_and_rmdir_and_freep) char *mounted_dir = NULL;
int r;
assert(ret_mounted_dir);
assert(ret_loop_device);
- assert(ret_decrypted_image);
if (!arg_image)
return 0;
@@ -883,8 +880,7 @@ static int process_image(
DISSECT_IMAGE_GENERIC_ROOT |
DISSECT_IMAGE_REQUIRE_ROOT,
&mounted_dir,
- &loop_device,
- &decrypted_image);
+ &loop_device);
if (r < 0)
return r;
@@ -894,14 +890,12 @@ static int process_image(
*ret_mounted_dir = TAKE_PTR(mounted_dir);
*ret_loop_device = TAKE_PTR(loop_device);
- *ret_decrypted_image = TAKE_PTR(decrypted_image);
return 0;
}
static int verb_list(int argc, char **argv, void *userdata) {
_cleanup_(loop_device_unrefp) LoopDevice *loop_device = NULL;
- _cleanup_(decrypted_image_unrefp) DecryptedImage *decrypted_image = NULL;
_cleanup_(umount_and_rmdir_and_freep) char *mounted_dir = NULL;
_cleanup_(context_freep) Context* context = NULL;
const char *version;
@@ -910,7 +904,7 @@ static int verb_list(int argc, char **argv, void *userdata) {
assert(argc <= 2);
version = argc >= 2 ? argv[1] : NULL;
- r = process_image(/* ro= */ true, &mounted_dir, &loop_device, &decrypted_image);
+ r = process_image(/* ro= */ true, &mounted_dir, &loop_device);
if (r < 0)
return r;
@@ -926,14 +920,13 @@ static int verb_list(int argc, char **argv, void *userdata) {
static int verb_check_new(int argc, char **argv, void *userdata) {
_cleanup_(loop_device_unrefp) LoopDevice *loop_device = NULL;
- _cleanup_(decrypted_image_unrefp) DecryptedImage *decrypted_image = NULL;
_cleanup_(umount_and_rmdir_and_freep) char *mounted_dir = NULL;
_cleanup_(context_freep) Context* context = NULL;
int r;
assert(argc <= 1);
- r = process_image(/* ro= */ true, &mounted_dir, &loop_device, &decrypted_image);
+ r = process_image(/* ro= */ true, &mounted_dir, &loop_device);
if (r < 0)
return r;
@@ -952,14 +945,13 @@ static int verb_check_new(int argc, char **argv, void *userdata) {
static int verb_vacuum(int argc, char **argv, void *userdata) {
_cleanup_(loop_device_unrefp) LoopDevice *loop_device = NULL;
- _cleanup_(decrypted_image_unrefp) DecryptedImage *decrypted_image = NULL;
_cleanup_(umount_and_rmdir_and_freep) char *mounted_dir = NULL;
_cleanup_(context_freep) Context* context = NULL;
int r;
assert(argc <= 1);
- r = process_image(/* ro= */ false, &mounted_dir, &loop_device, &decrypted_image);
+ r = process_image(/* ro= */ false, &mounted_dir, &loop_device);
if (r < 0)
return r;
@@ -972,7 +964,6 @@ static int verb_vacuum(int argc, char **argv, void *userdata) {
static int verb_update(int argc, char **argv, void *userdata) {
_cleanup_(loop_device_unrefp) LoopDevice *loop_device = NULL;
- _cleanup_(decrypted_image_unrefp) DecryptedImage *decrypted_image = NULL;
_cleanup_(umount_and_rmdir_and_freep) char *mounted_dir = NULL;
_cleanup_(context_freep) Context* context = NULL;
_cleanup_free_ char *booted_version = NULL;
@@ -993,7 +984,7 @@ static int verb_update(int argc, char **argv, void *userdata) {
return log_error_errno(SYNTHETIC_ERRNO(ENODATA), "/etc/os-release lacks IMAGE_VERSION field.");
}
- r = process_image(/* ro= */ false, &mounted_dir, &loop_device, &decrypted_image);
+ r = process_image(/* ro= */ false, &mounted_dir, &loop_device);
if (r < 0)
return r;
@@ -1096,7 +1087,6 @@ static int component_name_valid(const char *c) {
static int verb_components(int argc, char **argv, void *userdata) {
_cleanup_(loop_device_unrefp) LoopDevice *loop_device = NULL;
- _cleanup_(decrypted_image_unrefp) DecryptedImage *decrypted_image = NULL;
_cleanup_(umount_and_rmdir_and_freep) char *mounted_dir = NULL;
_cleanup_(set_freep) Set *names = NULL;
_cleanup_free_ char **z = NULL; /* We use simple free() rather than strv_free() here, since set_free() will free the strings for us */
@@ -1106,7 +1096,7 @@ static int verb_components(int argc, char **argv, void *userdata) {
assert(argc <= 1);
- r = process_image(/* ro= */ false, &mounted_dir, &loop_device, &decrypted_image);
+ r = process_image(/* ro= */ false, &mounted_dir, &loop_device);
if (r < 0)
return r;