From c840ab43323f351043e7f74502f933ae46d3ea9e Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 20 Jun 2016 21:07:36 -0700 Subject: Fill in divecomputer serial number and firmware version on loading We have the serial number and firmware version fields in "struct divecomputer", but we don't actually fill them in when loading the data from git or xml, because we save all that information in the separate device table instead. But in order to always have the serial number associated with a device, let's make sure to fill those fields in. It won't hurt, and this way we have the information available whether we just loaded the dive from a file, or imported it from the dive computer. One less semantic difference to worry about. Signed-off-by: Linus Torvalds Signed-off-by: Dirk Hohndel --- core/device.h | 1 + 1 file changed, 1 insertion(+) (limited to 'core/device.h') diff --git a/core/device.h b/core/device.h index 8a00b96d3..264ea8db5 100644 --- a/core/device.h +++ b/core/device.h @@ -7,6 +7,7 @@ extern "C" { #endif extern struct divecomputer *fake_dc(struct divecomputer *dc, bool alloc); +extern void set_dc_deviceid(struct divecomputer *dc, unsigned int deviceid); extern void create_device_node(const char *model, uint32_t deviceid, const char *serial, const char *firmware, const char *nickname); extern void call_for_each_dc(void *f, void (*callback)(void *, const char *, uint32_t, const char *, const char *, const char *), bool select_only); -- cgit v1.2.3-70-g09d2