RTEMS | nvdisk fails to create multiple block devices (#5402)
Janosch Reinking (@jreinking)
gitlab at rtems.org
Thu Dec 4 10:26:06 UTC 2025
Janosch Reinking created an issue: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5402
## Summary
When initializing a single block device with `rtems_nvdisk_initialize()`, the device is mounted at `/dev/nvda`. For any further device, the base name (`/dev/nvda`) should have its last letter incremented by the device index (i.e. `/dev/nvdb`, ...). However, instead of incrementing the last letter, the function increments the null-terminator. This results in corrupted device names.
```cpp
char name[] = RTEMS_NVDISK_DEVICE_BASE_NAME "a";
uint32_t device;
uint32_t blocks = 0;
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += i;
```
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5402
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20251204/b005b160/attachment.htm>
More information about the bugs
mailing list