]> granicus.if.org Git - strace/commitdiff
rtc.c: decode RTC_PLL_GET and RTC_PLL_SET
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 25 May 2016 07:43:15 +0000 (07:43 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 25 May 2016 08:38:52 +0000 (08:38 +0000)
* rtc.c (rtc_ioctl): Decode RTC_PLL_GET and RTC_PLL_SET

rtc.c

diff --git a/rtc.c b/rtc.c
index 1978ff0b7d1755c68fc371bfffc236aa8b35ef74..c54b9a8d0c9e60fba9dbbae5495056b5773d7e38 100644 (file)
--- a/rtc.c
+++ b/rtc.c
@@ -65,6 +65,18 @@ decode_rtc_wkalrm(struct tcb *tcp, const long addr)
        }
 }
 
+static void
+decode_rtc_pll_info(struct tcb *tcp, const long addr)
+{
+       struct rtc_pll_info pll;
+
+       if (!umove_or_printaddr(tcp, addr, &pll))
+               tprintf("{pll_ctrl=%d, pll_value=%d, pll_max=%d, pll_min=%d"
+                       ", pll_posmult=%d, pll_negmult=%d, pll_clock=%ld}",
+                       pll.pll_ctrl, pll.pll_value, pll.pll_max, pll.pll_min,
+                       pll.pll_posmult, pll.pll_negmult, pll.pll_clock);
+}
+
 int
 rtc_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
 {
@@ -98,6 +110,14 @@ rtc_ioctl(struct tcb *tcp, const unsigned int code, const long arg)
                tprints(", ");
                decode_rtc_wkalrm(tcp, arg);
                break;
+       case RTC_PLL_GET:
+               if (entering(tcp))
+                       return 0;
+               /* fall through */
+       case RTC_PLL_SET:
+               tprints(", ");
+               decode_rtc_pll_info(tcp, arg);
+               break;
 #ifdef RTC_VL_READ
        case RTC_VL_READ:
                if (entering(tcp))