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



The following reply was made to PR lib/39215; it has been noted by GNATS.

From: christos%zoulas.com@localhost (Christos Zoulas)
To: M.Drochner%fz-juelich.de@localhost
Cc: gnats-bugs%NetBSD.org@localhost, lib-bug-people%NetBSD.org@localhost, 
        gnats-admin%NetBSD.org@localhost, netbsd-bugs%NetBSD.org@localhost, 
        dholland%eecs.harvard.edu@localhost
Subject: Re: lib/39215: getdevmajor()/major() types don't match
Date: Fri, 8 Aug 2008 04:35:29 -0400

 On Aug 7,  9:54pm, M.Drochner%fz-juelich.de@localhost (Matthias Drochner) 
wrote:
 -- Subject: Re: lib/39215: getdevmajor()/major() types don't match
 
 | 
 | christos%zoulas.com@localhost 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.
 
 christos
 


Home | Main Index | Thread Index | Old Index