- /* create a virtual device */
- in->vdevice = device_new(NULL, 0, num_probes);
+ /* Create a virtual device. */
+ in->vdevice = sr_device_new(NULL, 0);
+
+ for (i = 0; i < num_probes; i++) {
+ snprintf(name, SR_MAX_PROBENAME_LEN, "%d", i);
+ /* TODO: Check return value. */
+ sr_device_probe_add(in->vdevice, name);
+ }