| | |
| | | |
| | | if (identifiers == NULL || *num_identifiers == 0) { |
| | | result_adapterInfos = getAdapterInfos(NULL, &adapter_num); |
| | | if (result_adapterInfos != FUNC_RET_OK) { |
| | | if ((result_adapterInfos != FUNC_RET_OK) || (adapter_num == 0)) { |
| | | return generate_disk_pc_id(identifiers, num_identifiers, false); |
| | | } |
| | | result_diskinfos = getDiskInfos(NULL, &disk_num); |
| | | if (result_diskinfos != FUNC_RET_OK) { |
| | | if ((result_diskinfos != FUNC_RET_OK) || (disk_num == 0)) { |
| | | return generate_ethernet_pc_id(identifiers, num_identifiers, true); |
| | | } |
| | | *num_identifiers = disk_num * adapter_num; |
| | |
| | | if (use_label) { |
| | | if (diskInfos[i].label[0] != 0) { |
| | | memset(identifiers[j], 0, sizeof(PcIdentifier)); //!!!!!!! |
| | | strncpy(identifiers[j], diskInfos[i].label, |
| | | strncpy((char*)identifiers[j], diskInfos[i].label, |
| | | sizeof(PcIdentifier)); |
| | | j++; |
| | | } |