Why is caddr_t used in quotactl(2)?
Alejandro Colomar <[email protected]>
| Newsgroups | org.kernel.vger.linux-man |
|---|---|
| Message-ID | <agssqAsUt9aYBsHX@devuan> |
[looping libc-help@] Hi all, On 2026-05-18T17:05:59+0200, Jan Kara wrote: > Hi Alejandro! > > On Mon 18-05-26 14:51:45, Alejandro Colomar wrote: > > Also, I wonder why caddr_t was used at all, instead of void*. It seems > > to unnecessarily require a cast, which could have been avoided with > > void*. In quotactl_fd(), since we need to use syscall(2), which is > > variadic, I'll document the correct pointer types, instead of caddr_t*. > > For this I don't have a good answer. It was like that for ages... I guess > you can ask glibc guys - the kernel uses void * but glibc uses caddr_t. Does anyone know why glibc uses caddr_t in quotactl(2)? It seems to me that void* would be obviously better, by not needing a cast. - Why was it added in the first place, given the kernel uses void* internally? - Can we change it now to be void*? Have a lovely day! Alex -- <https://www.alejandro-colomar.es>
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEES7Jt9u9GbmlWADAi64mZXMKQwqkFAmoLLZwACgkQ64mZXMKQ wqkZ/A//Uqg+g8HPp0Ijz+3pzpfxjE0z9pX030CAJyHjXke+9qg27F5iiLjXu7sZ 6cJ+EDPqtIlKkFTO5ITvX6P2dKj0WaZ2XfMnD7/vCLEksHqyLEBJnF0a5ur7tPkD TISLEk9UhiwPPcGj82n3LcE1wn9OIyOaIqcc3jyZgDhOav5560Uevmf7O1VxQn+S FO5fYKSwEyfVZLVm+2uCghexauecf00D0jXA4zxYh5ljGDG7LZ0dLM4urHtmYnqJ k0P+3nL/1JgrQ2Oyda0tXsCupWhoIhqtmzR3c60z8OyJD92KUeGrKslYvGA8Q7DM qU9nafM+t1aKNds1trCCjnNA0oiN+uz2FMHdRYaSPI/4z7ltEDOBA5EzoS2SJDea 049EhGa+ji7ujrWB9yD+Q+0uuIkqkzySRl23qoRFv4CCny8Ww5z6khbv3lwURwM4 YQRAchZjT1NhWPemDs4vCeRKqy1UhBmaMWkd9QcUUKTrCFcoyOe3zRJAcvAzRWsh vNotrfWQvYUctIPWC7VnJI8aYYZCzpq1ofv633je9vTJ8jHO1CDdsrxf+OcavWA5 WOJ3bIvoZgcuLTp/BhvWj5kWQch1H1WOUp+4IgXDZ40Cjoc/qn1vNThSl/bhJ8pb HaRKJIwLtSi13QOo+qpQFgrbZVxgjbzr1VUfekctLFs9gJ3iXDw= =Mjqt -----END PGP SIGNATURE-----