/* kern/cmos_datetime.c - CMOS datetime function.
*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2008,2009 Free Software Foundation, Inc.
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* GRUB is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#include <grub/datetime.h>
#if defined (__powerpc__) || defined (__sparc__)
#endif
GRUB_MOD_LICENSE ("GPLv3+");
static char *rtc = 0;
static int no_ieee1275_rtc = 0;
static void
find_rtc (void)
{
{
{
return 1;
}
return 0;
}
if (!rtc)
no_ieee1275_rtc = 1;
}
{
struct get_time_args
{
}
args;
int status;
if (no_ieee1275_rtc)
return grub_get_datetime_cmos (datetime);
if (!rtc)
find_rtc ();
if (!rtc)
return grub_get_datetime_cmos (datetime);
if (status == -1)
if (status == -1)
return GRUB_ERR_NONE;
}
{
struct set_time_args
{
}
args;
int status;
if (no_ieee1275_rtc)
return grub_set_datetime_cmos (datetime);
if (!rtc)
find_rtc ();
if (!rtc)
return grub_set_datetime_cmos (datetime);
if (status == -1)
if (status == -1)
return GRUB_ERR_NONE;
}