human-readable swap partition sizes with pstat -sh

Pawel Jakub Dawidek pjd at FreeBSD.org
Thu Jan 6 16:36:57 PST 2005


On Thu, Jan 06, 2005 at 11:58:57PM +0100, Pawel Jakub Dawidek wrote:
+> On Thu, Jan 06, 2005 at 11:57:19AM -0800, Brooks Davis wrote:
+> +> I'd argue that we might want to replace the int64_t in humanize_number
+> +> with intmax_t since that wouldn't change the ABI (or API due to implicit
+> +> casts), but would mean we wouldn't have to add a humanize_number128
+> +> later if some architecture grows 128-bit ints for some reason or
+> +> another.
+> 
+> I like intmax_t also much better than int64_t, but I took it from NetBSD
+> and they got int64_t there. Anyway, I think we don't have to be 100%
+> compatible here and I'll look what can be done.

Here is proposed patch:

	http://people.freebsd.org/~pjd/patches/humanize_number.patch

There is one issue... I had to add '#include <stdint.h>' to libutil.h.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20050107/b7b1c281/attachment.bin


More information about the freebsd-current mailing list