NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: lib/39215: getdevmajor()/major() types don't match

On Aug 7,  9:54pm, (Matthias Drochner) wrote:
-- Subject: Re: lib/39215: getdevmajor()/major() types don't match

| said:
| > You fixed some printfs but not all of them, why?
| Perhaps I forgot some, but mostly it was for the reasons
| mentioned - mostly where the result of minor() is interpreted
| as device unit number or pty index.
| I've changed some more of the userland tools affected and run
| a full build. Well, it works, but I don't like it. At least
| for the userland tools where others might look at or want to
| adopt... it is just unreadable and non-portable. Everywhere
| else major()/minor() return an "int". Signed or unsigned,
| at least something which can be printed by "%d", "%u" and "%x".
| I don't see enough justification yet to change this.
| Changing the return value of getdevmajor() to be the same
| as major() is needed and correct, and introducing devmajor_t
| is fine too - as long as it is a signed or unsigned int.
| At least before 5.0 we should neither add casts everywhere
| nor introduce the format macros.
| best regards
| Matthias

I agree. Let's bring it up for discussion on tech-userlevel and ask for
opinions, so we can make a decision. Perhaps someon has a smarter idea.


Home | Main Index | Thread Index | Old Index