Thread (7 messages) 7 messages, 2 authors, 4d ago

Why is caddr_t used in quotactl(2)?

From: Alejandro Colomar <alx@kernel.org>
Date: 2026-05-18 15:17:53

[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:
quoted
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>

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help