Source-Changes archive

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

CVS commit: src/usr.sbin/autofs



Module Name:    src
Committed By:   tkusumi
Date:           Thu Nov 21 16:45:05 UTC 2019

Modified Files:
        src/usr.sbin/autofs: autounmountd.c

Log Message:
autofs: Change autounmountd(8) to use time_t for duration instead of double

The commit log from FreeBSD.
--
autounmountd(8) uses doubles to handle mount time durations.  However,
it must convert to integer types, time_t in particular, to do anything
meaningful.  Additionally, even though it's a floating-point value in
seconds, the sub-seconds component is never used, so it's unnecessary.

Switching type to time_t fixes an assertion on powerpc64, which checks
that a sleep value that's not -1.0 is greater than 0.  On powerpc64, it
happens that the value of -1.0 gets loaded as a float (perhaps a bug in
gcc), but gets compared to a double.  This compares as false, so follows
through the 'sleep != -1.0' path, and fails the assert.  Since the
sub-second component isn't used in the double, just drop it and deal
with whole-integer seconds.
--

Taken-from: FreeBSD and DragonFlyBSD


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/autofs/autounmountd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index