From 234c2e16e5686d1a49fe84e534d4edb2db8d3719 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 1 Sep 2022 12:38:53 +0200 Subject: dissect: drop partition removal code This reverts a major chunk of 75d7e04eb4662a814c26010d447eed8a862f5ec1 Now that the loopback device code already destroys the partitions we don't have to do this here anymore. I am sure the right place to delete the partitions is in the loopback code, since we really only should do that for loopback devices, see bug #24431, and not on "real" block devices. I am also not convinced dropping partitions the dissection logic doesn't care about is a good idea, after all. The dissection stuff should probably not consider itself the "owner" of the block devices it analyzes, but take a more passive role: figure out what is what, but not modify it. Fixes: #24431 --- src/gpt-auto-generator/gpt-auto-generator.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/gpt-auto-generator') diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c index a95f384ecb..bd16ae333c 100644 --- a/src/gpt-auto-generator/gpt-auto-generator.c +++ b/src/gpt-auto-generator/gpt-auto-generator.c @@ -772,8 +772,6 @@ static int enumerate_partitions(dev_t devnum) { r = k; } - dissected_image_relinquish(m); - return r; } -- cgit v1.2.1