Lines Matching +full:rtas +full:- +full:set +full:- +full:time +full:- +full:of +full:- +full:day
2 * Test the RTAS interface
7 #include <asm/rtas.h>
9 #define DAYS(y,m,d) (365UL * (y) + ((y) / 4) - ((y) / 100) + ((y) / 400) + \
13 static unsigned long mktime(int year, int month, int day, in mktime() argument
18 /* Put February at end of the year to avoid leap day this year */ in mktime()
20 month -= 2; in mktime()
23 year -= 1; in mktime()
26 /* compute epoch: substract DAYS(since_March(1-1-1970)) */ in mktime()
28 epoch = DAYS(year, month, day) - DAYS(1969, 11, 1); in mktime()
47 ret = rtas_token("get-time-of-day", &token); in check_get_time_of_day()
58 report(now[2] >= 1 && now[2] <= 31, "day"); in check_get_time_of_day()
61 report(mktime(now[0], now[1], now[2], now[3], now[4], now[5]) - start < 3, in check_get_time_of_day()
82 ret = rtas_token("set-time-of-day", &stod_token); in check_set_time_of_day()
93 ret = rtas_token("get-time-of-day", >od_token); in check_set_time_of_day()
96 report(ret == 0, "re-read"); in check_set_time_of_day()
100 report(t2 - t1 < 2, "result"); in check_set_time_of_day()
118 report_prefix_push("rtas"); in main()
125 if (strcmp(argv[1], "get-time-of-day") == 0) { in main()
128 if (len == -1) { in main()
136 } else if (strcmp(argv[1], "set-time-of-day") == 0) { in main()