--- input/manager.c 9 May 2007 14:53:34 -0000 1.25 +++ input/manager.c 8 Jun 2007 21:16:25 -0000 @@ -959,6 +959,23 @@ static void stored_input(char *key, char device_paths = g_slist_append(device_paths, g_strdup(path)); } +/* hidd to input transition function */ +static void stored_hidd(char *key, char *value, void *data) +{ + const char *path; + struct hidp_connadd_req hidp; + bdaddr_t dst, *src = data; + + str2ba(key, &dst); + + memset(&hidp, 0, sizeof(struct hidp_connadd_req)); + + if (parse_stored_device_info(value, &hidp) < 0) + return; + + store_device_info(src, &dst, &hidp); +} + static void register_stored_inputs(void) { char dirname[PATH_MAX + 1]; @@ -977,10 +994,16 @@ static void register_stored_inputs(void) if (!isdigit(de->d_name[0])) continue; + str2ba(de->d_name, &src); + + /* move the hidd entries to the input storage */ create_name(filename, PATH_MAX, STORAGEDIR, - de->d_name, "input"); + de->d_name, "hidd"); + textfile_foreach(filename, stored_hidd, &src); - str2ba(de->d_name, &src); + /* load the input stored devices */ + create_name(filename, PATH_MAX, STORAGEDIR, + de->d_name, "input"); textfile_foreach(filename, stored_input, &src); }