Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sbin/mount_tmpfs

Martin Husemann <> wrote:
> On Wed, Dec 04, 2013 at 01:45:51PM +0000, Mindaugas Rasiukevicius wrote:
> > I think you confused err() with errx().  Also, why bother with the
> > fraction and the floating point?
> The err vs. errx may be debatable, but since this is usual called via
> other programs the name of the program (and thus the man page to look
> up details) may be usefull.

I mean you have them other way round:

+       len = sizeof(ram);
+       if (sysctlbyname("hw.physmem64", &ram, &len, NULL, 0))
+               err(EXIT_FAILURE, "can't get \"hw.physmem64\": %s", 

err() already appends the error string for you, while in in ram_fract()
and ram_percent() you want errx().


Home | Main Index | Thread Index | Old Index