uuid: don't terminate app on an error
This commit is contained in:
parent
4ce05e56a7
commit
2746998859
1 changed files with 2 additions and 2 deletions
|
@ -109,12 +109,12 @@ uuid_init_bin ( tvh_uuid_t *u, const char *str )
|
|||
if (str) {
|
||||
if (strlen(str) != UUID_HEX_SIZE - 1) {
|
||||
tvherror("uuid", "wrong uuid size");
|
||||
exit(1);
|
||||
return -EINVAL;
|
||||
}
|
||||
return hex2bin(u->bin, sizeof(u->bin), str);
|
||||
} else if (read(fd, u->bin, sizeof(u->bin)) != sizeof(u->bin)) {
|
||||
tvherror("uuid", "failed to read from %s", RANDOM_PATH);
|
||||
exit(1);
|
||||
return -EINVAL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue