Author: andreasf Date: 2010-06-27 17:17:59 +0200 (Sun, 27 Jun 2010) New Revision: 37279 Changeset: http://dev.haiku-os.org/changeset/37279/haiku Ticket: http://dev.haiku-os.org/ticket/6061 Modified: haiku/trunk/src/system/kernel/platform/openfirmware/openfirmware.cpp Log: OpenFirmware: Make of_milliseconds() return error The only user of of_milliseconds(), the boot loader's system_time(), checks for an error that would never be signalled since the zero-initialized number of milliseconds would always be returned. Return OF_FAILED instead to allow explicit error handling in that case. While this is a behavioral change, it is not yet a functional change, for system_time()'s implementation translates OF_FAILED back to zero currently. Resolves part of ticket #6061. Modified: haiku/trunk/src/system/kernel/platform/openfirmware/openfirmware.cpp =================================================================== --- haiku/trunk/src/system/kernel/platform/openfirmware/openfirmware.cpp 2010-06-27 10:38:05 UTC (rev 37278) +++ haiku/trunk/src/system/kernel/platform/openfirmware/openfirmware.cpp 2010-06-27 15:17:59 UTC (rev 37279) @@ -559,7 +559,8 @@ int milliseconds; } args = {"milliseconds", 0, 1, 0}; - gCallOpenFirmware(&args); + if (gCallOpenFirmware(&args) == OF_FAILED) + return OF_FAILED; return args.milliseconds; }