> > + if (full_read(vmar->fd, vmar->head_data, sizeof(VmaHeader)) != > > + sizeof(VmaHeader)) { > > + error_setg(errp, "can't read vma header - %s", > > + errno ? strerror(errno) : "got EOF"); > > You're not the first user, but strerror() isn't thread-safe. strerror_r is > not > necessarily portable (glibc vs. POSIX), and strerror_l isn't yet widely > implemented. Should qemu be providing a better interface > qemu_strerror() that guarantees thread-safety when converting errno to a > string?
I thought I can use g_strerror?