Skip to contentSkip to conversation

device: Fix cache update on device remove

PATCH Applied Frédéric Danis 3 participants 3 messages Jun 8 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 device: Fix cache update on device remove

If there's no other group than the one explicitly removed the length returned by g_key_file_to_data() will be 0 and currently nothing will be changed in the device cache file.

If there's nothing to write, remove the device cache file.

---
 src/device.c | 2 ++
 1 file changed, 2 insertions(+)
src/device.c +2 -0
index bea893301..046c8017e 100644
@@ -5469,6 +5469,8 @@ static void device_remove_stored(struct btd_device *device)
 								gerr->message);
 			g_error_free(gerr);
 		}
+	} else {
+		unlink(filename);
 	}
 
 	g_free(data);
Signature · 1 line
2.43.0
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1107813

---Test result---

Test Summary:

CheckPatch                    PASS      0.31 seconds
GitLint                       PASS      0.22 seconds
BuildEll                      PASS      17.71 seconds
BluezMake                     PASS      653.12 seconds
CheckSmatch                   PASS      313.99 seconds
bluezmakeextell               PASS      166.43 seconds
IncrementalBuild              PASS      616.69 seconds
ScanBuild                     PASS      909.63 seconds

https://github.com/bluez/bluez/pull/2194

---
Regards,
Linux Bluetooth

#2 lore raw
In reply to Frédéric Danis
This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluez.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 8 lines · On Mon, 8 Jun 2026 14:27:13 +0200 you wrote:

If there's no other group than the one explicitly removed the length returned by g_key_file_to_data() will be 0 and currently nothing will be changed in the device cache file.

If there's nothing to write, remove the device cache file.

---
 src/device.c | 2 ++
 1 file changed, 2 insertions(+)

Here is the summary with links:
- [BlueZ] device: Fix cache update on device remove

    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=279c4ac70c77

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html