Re: [chrony-dev] [PATCH v2] main: add -X to fall back if time is not adjustable

2018-03-13 Thread Christian Ehrhardt
On Tue, Mar 13, 2018 at 5:53 AM, Bryan Christianson 
wrote:

>
>
> > On 13/03/2018, at 5:46 PM, Christian Ehrhardt <
> christian.ehrha...@canonical.com> wrote:
> >
> > diff --git a/sys_macosx.c b/sys_macosx.c
> > index 00ce302..01a054a 100644
> > --- a/sys_macosx.c
> > +++ b/sys_macosx.c
> > @@ -479,7 +479,7 @@ test_adjtime()
> >
> > /* == */
> >
> > -void
> > +int
> > SYS_MacOSX_Initialise(void)
> > {
> > #ifdef HAVE_MACOS_SYS_TIMEX
> > @@ -492,10 +492,11 @@ SYS_MacOSX_Initialise(void)
> > } else {
> >   SYS_NetBSD_Initialise();
>
> maybe it would be better to have:
> return SYS_NetBSD_Initialise();
>

I didn't want to affect osx initially, but I agree that we should carry the
values of SYS_Timex_Initialise and SYS_NetBSD_Initialise to the callers.
Quick V3 incoming.

> }
> > -return;
> > +return 1;
> >   }
> > #endif
> >   legacy_MacOSX_Initialise();
> > +  return 1;
> > }
> >
> > /* == */
> > diff --git a/sys_macosx.h b/sys_macosx.h
> > index 616..748df8a 100644
> > --- a/sys_macosx.h
> > +++ b/sys_macosx.h
> > @@ -32,7 +32,7 @@
> >
> > void SYS_MacOSX_SetScheduler(int SchedPriority);
> > void SYS_MacOSX_DropRoot(uid_t uid, gid_t gid);
> > -void SYS_MacOSX_Initialise(void);
> > +int SYS_MacOSX_Initialise(void);
> > void SYS_MacOSX_Finalise(void);
> >
> > #endif
> > --
> > To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with
> "unsubscribe" in the subject.
> > For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in
> the subject.
> > Trouble?  Email listmas...@chrony.tuxfamily.org.
> >
>
>
>
> Bryan Christianson
> br...@whatroute.net
>
>
>
>
> --
> To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with
> "unsubscribe" in the subject.
> For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the
> subject.
> Trouble?  Email listmas...@chrony.tuxfamily.org.
>
>


-- 
Christian Ehrhardt
Software Engineer, Ubuntu Server
Canonical Ltd


Re: [chrony-dev] [PATCH v2] main: add -X to fall back if time is not adjustable

2018-03-12 Thread Bryan Christianson


> On 13/03/2018, at 5:46 PM, Christian Ehrhardt 
>  wrote:
> 
> diff --git a/sys_macosx.c b/sys_macosx.c
> index 00ce302..01a054a 100644
> --- a/sys_macosx.c
> +++ b/sys_macosx.c
> @@ -479,7 +479,7 @@ test_adjtime()
> 
> /* == */
> 
> -void
> +int
> SYS_MacOSX_Initialise(void)
> {
> #ifdef HAVE_MACOS_SYS_TIMEX
> @@ -492,10 +492,11 @@ SYS_MacOSX_Initialise(void)
> } else {
>   SYS_NetBSD_Initialise();

maybe it would be better to have:
return SYS_NetBSD_Initialise();


> }
> -return;
> +return 1;
>   }
> #endif
>   legacy_MacOSX_Initialise();
> +  return 1;
> }
> 
> /* == */
> diff --git a/sys_macosx.h b/sys_macosx.h
> index 616..748df8a 100644
> --- a/sys_macosx.h
> +++ b/sys_macosx.h
> @@ -32,7 +32,7 @@
> 
> void SYS_MacOSX_SetScheduler(int SchedPriority);
> void SYS_MacOSX_DropRoot(uid_t uid, gid_t gid);
> -void SYS_MacOSX_Initialise(void);
> +int SYS_MacOSX_Initialise(void);
> void SYS_MacOSX_Finalise(void);
> 
> #endif
> -- 
> To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with 
> "unsubscribe" in the subject.
> For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the 
> subject.
> Trouble?  Email listmas...@chrony.tuxfamily.org.
> 



Bryan Christianson
br...@whatroute.net




--
To unsubscribe email chrony-dev-requ...@chrony.tuxfamily.org with "unsubscribe" 
in the subject.
For help email chrony-dev-requ...@chrony.tuxfamily.org with "help" in the 
subject.
Trouble?  Email listmas...@chrony.tuxfamily.org.