On Fri, 2013-04-19 at 14:39 +0800, Mike Qiu wrote: > 于 2013/4/19 14:06, Feng Yang 写道: > > On 04/19/2013 09:55 AM, Mike Qiu wrote: > >> 于 2013/4/18 13:33, Feng Yang 写道: > >>> On 04/17/2013 07:38 PM, Mike Qiu wrote: > >>>> From: Mike Qiu <[email protected]> > >>>> > >>>> The name of the clock on Power guest is "timebase" which is > >>>> different from it counterpart in x86 "kvm-clock" > >>>> > >>>> To makes it can work in both Power and x86 guest, add the > >>>> platform check. > >>>> > >>>> Signed-off-by: Mike Qiu <[email protected]> > >>>> --- > >>>> shared/deps/test_clock_getres/test_clock_getres.c | 7 ++++++- > >>>> 1 files changed, 6 insertions(+), 1 deletions(-) > >>>> > >>>> diff --git a/shared/deps/test_clock_getres/test_clock_getres.c > >>>> b/shared/deps/test_clock_getres/test_clock_getres.c > >>>> index 81d3b9c..986276a 100644 > >>>> --- a/shared/deps/test_clock_getres/test_clock_getres.c > >>>> +++ b/shared/deps/test_clock_getres/test_clock_getres.c > >>>> @@ -1,5 +1,6 @@ > >>>> /* > >>>> - * Test clock resolution for KVM guests that have kvm-clock as > >>>> clock source > >>>> + * Test clock resolution for KVM guests that have kvm-clock or > >>>> timebase > >>>> + * as clock source > >>>> * > >>>> * Copyright (c) 2010 Red Hat, Inc > >>>> * Author: Lucas Meneghel Rodrigues <[email protected]> > >>>> @@ -38,7 +39,11 @@ int main(void) { > >>>> sscanf(line, "%s", &clocksource); > >>>> } > >>>> fclose(fr); > >>>> +#if defined(__powerpc64__) > >>>> + if (!strncmp(clocksource, "timebase", strlen("timebase"))) { > >>>> +#else > >>>> if (!strncmp(clocksource, "kvm-clock", strlen("kvm-clock"))) { > >>>> +#endif > >>> This patch works. > >>> But both "Tab" and four space are used in this patch. > >> OK, I should use tab only.... and then shall I resend for V2 for you > >> convert it? > > Actually I do not know why tab used in that file. > Use tap in C code is very normal
No doubt it is normal, but better to decide (or the file uses all spaces, or all tabs). Given that I wrote the original file using all spaces, better to keep the convention. _______________________________________________ Virt-test-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/virt-test-devel
