| 534 | } |
| 535 | |
| 536 | int dfs_devfs_update(void) |
| 537 | { |
| 538 | int count = rt_object_get_length(RT_Object_Class_Device); |
| 539 | if (count > 0) |
| 540 | { |
| 541 | rt_device_t *devices = rt_malloc(count * sizeof(rt_device_t)); |
| 542 | if (devices) |
| 543 | { |
| 544 | rt_object_get_pointers(RT_Object_Class_Device, (rt_object_t *)devices, count); |
| 545 | |
| 546 | for (int index = 0; index < count; index ++) |
| 547 | { |
| 548 | dfs_devfs_device_add(devices[index]); |
| 549 | } |
| 550 | rt_free(devices); |
| 551 | } |
| 552 | } |
| 553 | |
| 554 | return count; |
| 555 | } |
no test coverage detected