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: Matthias Drochner <>
To: (Christos Zoulas)
Subject: Re: lib/39215: getdevmajor()/major() types don't match 
Date: Thu, 07 Aug 2008 21:54:26 +0200 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
 Forschungszentrum Juelich GmbH
 52425 Juelich
 Sitz der Gesellschaft: Juelich
 Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
 Vorsitzende des Aufsichtsrats: MinDir'in Baerbel Brumme-Bothe
 Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender),
 Dr. Ulrich Krafft (stellv. Vorsitzender), Prof. Dr. Harald Bolt,
 Dr. Sebastian M. Schmidt

Home | Main Index | Thread Index | Old Index