Date: Sun, 17 Mar 2013 22:10:28 +0100 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Konstantin Belousov <kostikbel@gmail.com> Cc: freebsd-arch@FreeBSD.org Subject: Re: chflags(2)'s flags argument. Message-ID: <20130317211027.GJ1364@garage.freebsd.pl> In-Reply-To: <20130317174205.GU3794@kib.kiev.ua> References: <20130317003559.GA1364@garage.freebsd.pl> <20130317064123.GM3794@kib.kiev.ua> <20130317111112.GC1364@garage.freebsd.pl> <20130317155743.GR3794@kib.kiev.ua> <20130317162021.GG1364@garage.freebsd.pl> <20130317162533.GT3794@kib.kiev.ua> <20130317164632.GI1364@garage.freebsd.pl> <20130317174205.GU3794@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
--ZG+WKzXzVby2T9Ro Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 17, 2013 at 07:42:05PM +0200, Konstantin Belousov wrote: > I would say that API and ABI stability is more important then the > consistency. I think we are in the agreement of changing the kernel > interface for the chflags/fchflags to use long for flags. >=20 > For lchflags, my opinion is that the best would be not to change it. ABI is out of question, we do preserve its stability. And as for API, I think it is really low price to pay (if any) for consistency and would also allow us to get rid of hacks like the one in chflags(1): int (*change_flags)(const char *, unsigned long); [...] /* XXX: Why don't chflags and lchflags have compatible prototypes? */ if (hflag) change_flags =3D (int (*)(const char *, unsigned long))lchflags; else change_flags =3D chflags; In common case when program just calls lchflags() directly it won't even notice API change. Maybe we could arrange ports build with lchflags(2) changed to take unsigned long to see how destructive the change really is, because my expectation is that not very. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --ZG+WKzXzVby2T9Ro Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlFGMUMACgkQForvXbEpPzRUXwCfZu3S0jvikBRJ9Yg2S9ycwyye 5fAAoPeyCDkj7M0gqozGvEZ6otN2lsCY =J9a3 -----END PGP SIGNATURE----- --ZG+WKzXzVby2T9Ro--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130317211027.GJ1364>