From owner-freebsd-current Mon Jan 1 21:35:10 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id VAA00226 for current-outgoing; Mon, 1 Jan 1996 21:35:10 -0800 (PST) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id VAA00220 for ; Mon, 1 Jan 1996 21:35:01 -0800 (PST) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id QAA00370; Tue, 2 Jan 1996 16:32:47 +1100 Date: Tue, 2 Jan 1996 16:32:47 +1100 From: Bruce Evans Message-Id: <199601020532.QAA00370@godzilla.zeta.org.au> To: joerg_wunsch@uriah.heep.sax.de, wollman@lcs.mit.edu Subject: Re: minor change to ls -l Cc: freebsd-current@FreeBSD.org Sender: owner-current@FreeBSD.org Precedence: bulk >The question for me is: will mknod(8) accept a minor number in hex? No. mknod uses atoi() to (mis)interpret its numeric args. It can't even handle an arg of 2^31 = 2147483648, since atoi() returns LONG_MAX = 2147483648 for too-large args and no attempt is made to check for errors. (It's not possible to check for errors in a standard way because the behaviour of atoi() when the result can't be represented is undefined, but FreeBSD's atoi() is equivalent to (int)strtol(), so checking errno works iff sizeof(int) == sizeof(long).) >If not, and you plan to stick with this change, then you need to >change mknod as well. It's not necessary, just useful. atoi should accept numbers in all bases. Bruce