core: add make_manually_added_dc() function

For reasons of symmetry (there is a is_manually_added_dc()
function), create a make_manually_added_dc() function.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-10-21 18:12:11 +02:00 committed by Dirk Hohndel
parent f687e51d4b
commit 261f07dfa4
5 changed files with 12 additions and 4 deletions

View file

@ -868,7 +868,7 @@ static int prepare_data(int data_model, char *serial, dc_family_t dc_fam, device
{
dev_data->device = NULL;
dev_data->context = NULL;
if (!data_model){
if (!data_model) {
dev_data->model = copy_string("manually added dive");
dev_data->descriptor = NULL;
return DC_STATUS_NODEVICE;