summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/userpref.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/common/userpref.c b/common/userpref.c
index 8076287..fd7022c 100644
--- a/common/userpref.c
+++ b/common/userpref.c
@@ -173,18 +173,21 @@ const char *userpref_get_config_dir()
173} 173}
174 174
175/** 175/**
176 * Reads the BUID from a previously generated configuration file. 176 * Reads the SystemBUID from a previously generated configuration file.
177 * 177 *
178 * @note It is the responsibility of the calling function to free the returned system_buid 178 * @note It is the responsibility of the calling function to free the returned system_buid.
179 * @param system_buid A null terminated string containing a valid SystemBUID. 179 * @param system_buid A pointer that will be set to a newly allocated string containing the
180 * @return 1 if the system buid could be retrieved or 0 otherwise. 180 * SystemBUID upon successful return.
181 * @return 0 if the SystemBUID has been successfully retrieved or < 0 otherwise.
181 */ 182 */
182int userpref_read_system_buid(char **system_buid) 183int userpref_read_system_buid(char **system_buid)
183{ 184{
184 int res = usbmuxd_read_buid(system_buid); 185 int res = usbmuxd_read_buid(system_buid);
185 186 if (res == 0) {
186 debug_info("using %s as %s", *system_buid, USERPREF_SYSTEM_BUID_KEY); 187 debug_info("using %s as %s", *system_buid, USERPREF_SYSTEM_BUID_KEY);
187 188 } else {
189 debug_info("could not read system buid, error %d", res);
190 }
188 return res; 191 return res;
189} 192}
190 193