From owner-freebsd-arch@FreeBSD.ORG Sun Mar 17 00:34:33 2013 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 33BA6F87 for ; Sun, 17 Mar 2013 00:34:33 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id EF4F59E2 for ; Sun, 17 Mar 2013 00:34:32 +0000 (UTC) Received: from localhost (89-73-195-149.dynamic.chello.pl [89.73.195.149]) by mail.dawidek.net (Postfix) with ESMTPSA id ACCB7120 for ; Sun, 17 Mar 2013 01:31:10 +0100 (CET) Date: Sun, 17 Mar 2013 01:35:59 +0100 From: Pawel Jakub Dawidek To: freebsd-arch@FreeBSD.org Subject: chflags(2)'s flags argument. Message-ID: <20130317003559.GA1364@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="SLDf9lqlvOQaIe6s" Content-Disposition: inline X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Mar 2013 00:34:33 -0000 --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi. Currently this is a bit messy: chflags(2) and fchflags(2) take 'flags' argument of type unsigned long and lchflags(2) takes the same argument of type int. At least this is what you can see in manual page and in prototypes of those functions in sys/stat.h. However all of those syscalls are defined in syscalls.master to take the 'flags' argument of type int and this is what they use in kernel. I'd like to proposed the following patch: http://people.freebsd.org/~pjd/patches/chflags_int.patch It changes type of the 'flags' argument from unsigned long to int where possible. I believe this change won't break ABI, as the syscalls (apart from the prototypes) already expect int and I hope in doesn't break API in any really visible and destructive way. If you think otherwise, let me know. Note that the patch doesn't touch the strtofflags(3) function, as I believe it would break ABI and it doesn't touch the fflagstostr(3) function to stay consistent with strtofflags(3). PS. Manual page text provided by jilles. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --SLDf9lqlvOQaIe6s Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlFFD+8ACgkQForvXbEpPzTKWgCeIJol+6BESq0STfoPPrnEZ/Ls WfYAoMNwytFHvNwQ+K6uI/oH6ZGmYnm8 =CzyV -----END PGP SIGNATURE----- --SLDf9lqlvOQaIe6s--