> On Wed, Feb 11, 2015 at 11:13:42AM +0100, Volker Lendecke wrote: > > On Tue, Feb 10, 2015 at 08:59:21PM -0800, Jeremy Allison wrote: > > > Ah ok - I expected as much. snprintf seems to be > > > broken in that it's returning -1. > > > > > > Is this our snprintf or one from Solaris ? Can > > > you try and track down why it's returning -1 ? > > > > Maybe Solaris' snprintf does not know about the %j modifier? > > Crap... Probably our own libreplace snprintf version does > not do it.... > > VolkerYou guys sure work at odd hours. I should have mentioned that when I put in the DEBUG lines I had to not include the %j modifier as the DEBUG produces no output when it is there. I just tried removing the j from the snprintf line leaving %u and now the value of unique_len is comming out apparently correctly. The largest value of unique that I have seen is 4125756149 and the largest value of unique_len is 11. The Solaris man page for snprintf claims that the %j modifier should work. Tom Schulz Applied Dynamics Intl. schulz at adi.com
On Wed, Feb 11, 2015 at 10:04:03AM -0500, Thomas Schulz wrote:> > On Wed, Feb 11, 2015 at 11:13:42AM +0100, Volker Lendecke wrote: > > > On Tue, Feb 10, 2015 at 08:59:21PM -0800, Jeremy Allison wrote: > > > > Ah ok - I expected as much. snprintf seems to be > > > > broken in that it's returning -1. > > > > > > > > Is this our snprintf or one from Solaris ? Can > > > > you try and track down why it's returning -1 ? > > > > > > Maybe Solaris' snprintf does not know about the %j modifier? > > > > Crap... Probably our own libreplace snprintf version does > > not do it.... > > > > Volker > > You guys sure work at odd hours.Not so odd if you take timezones into account :-) The attached (uncompiled, I don't have access to Solaris right now) patch *might* already do it for you. Can you give it a try? Thanks, Volker -- SerNet GmbH, Bahnhofsallee 1b, 37081 G?ttingen phone: +49-551-370000-0, fax: +49-551-370000-9 AG G?ttingen, HRB 2816, GF: Dr. Johannes Loxen http://www.sernet.de, mailto:kontakt at sernet.de -------------- next part --------------
On Wed, Feb 11, 2015 at 05:18:27PM +0100, Volker Lendecke wrote:> On Wed, Feb 11, 2015 at 10:04:03AM -0500, Thomas Schulz wrote: > > > On Wed, Feb 11, 2015 at 11:13:42AM +0100, Volker Lendecke wrote: > > > > On Tue, Feb 10, 2015 at 08:59:21PM -0800, Jeremy Allison wrote: > > > > > Ah ok - I expected as much. snprintf seems to be > > > > > broken in that it's returning -1. > > > > > > > > > > Is this our snprintf or one from Solaris ? Can > > > > > you try and track down why it's returning -1 ? > > > > > > > > Maybe Solaris' snprintf does not know about the %j modifier? > > > > > > Crap... Probably our own libreplace snprintf version does > > > not do it.... > > > > > > Volker > > > > You guys sure work at odd hours. > > Not so odd if you take timezones into account :-) > > The attached (uncompiled, I don't have access to Solaris > right now) patch *might* already do it for you. Can you give > it a try?This looks good to me. Do you want to resend with your Sign-off and I'll merge ? Jeremy.> -- > SerNet GmbH, Bahnhofsallee 1b, 37081 G?ttingen > phone: +49-551-370000-0, fax: +49-551-370000-9 > AG G?ttingen, HRB 2816, GF: Dr. Johannes Loxen > http://www.sernet.de, mailto:kontakt at sernet.de> From f097f14094b36a74c9aafc63e465645e82c2b9c6 Mon Sep 17 00:00:00 2001 > From: Volker Lendecke <vl at samba.org> > Date: Wed, 11 Feb 2015 17:16:50 +0100 > Subject: [PATCH] snprintf: Try to support %j > > --- > lib/replace/snprintf.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lib/replace/snprintf.c b/lib/replace/snprintf.c > index 6b4a711..86ba74c 100644 > --- a/lib/replace/snprintf.c > +++ b/lib/replace/snprintf.c > @@ -445,6 +445,10 @@ static int dopr(char *buffer, size_t maxlen, const char *format, va_list args_in > ch = *format++; > } > break; > + case 'j': > + cnk->cflags = DP_C_LLONG; > + ch = *format++; > + break; > case 'L': > cnk->cflags = DP_C_LDOUBLE; > ch = *format++; > -- > 1.9.1 >
On Wed, Feb 11, 2015 at 05:18:27PM +0100, Volker Lendecke wrote:> On Wed, Feb 11, 2015 at 10:04:03AM -0500, Thomas Schulz wrote: > > > On Wed, Feb 11, 2015 at 11:13:42AM +0100, Volker Lendecke wrote: > > > > On Tue, Feb 10, 2015 at 08:59:21PM -0800, Jeremy Allison wrote: > > > > > Ah ok - I expected as much. snprintf seems to be > > > > > broken in that it's returning -1. > > > > > > > > > > Is this our snprintf or one from Solaris ? Can > > > > > you try and track down why it's returning -1 ? > > > > > > > > Maybe Solaris' snprintf does not know about the %j modifier? > > > > > > Crap... Probably our own libreplace snprintf version does > > > not do it.... > > > > > > Volker > > > > You guys sure work at odd hours. > > Not so odd if you take timezones into account :-) > > The attached (uncompiled, I don't have access to Solaris > right now) patch *might* already do it for you. Can you give > it a try?Ping. Can I push this with your 'Signed-off' please ? Then we can log it and get it fixed for 4.2.0.> -- > SerNet GmbH, Bahnhofsallee 1b, 37081 G?ttingen > phone: +49-551-370000-0, fax: +49-551-370000-9 > AG G?ttingen, HRB 2816, GF: Dr. Johannes Loxen > http://www.sernet.de, mailto:kontakt at sernet.de> From f097f14094b36a74c9aafc63e465645e82c2b9c6 Mon Sep 17 00:00:00 2001 > From: Volker Lendecke <vl at samba.org> > Date: Wed, 11 Feb 2015 17:16:50 +0100 > Subject: [PATCH] snprintf: Try to support %j > > --- > lib/replace/snprintf.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/lib/replace/snprintf.c b/lib/replace/snprintf.c > index 6b4a711..86ba74c 100644 > --- a/lib/replace/snprintf.c > +++ b/lib/replace/snprintf.c > @@ -445,6 +445,10 @@ static int dopr(char *buffer, size_t maxlen, const char *format, va_list args_in > ch = *format++; > } > break; > + case 'j': > + cnk->cflags = DP_C_LLONG; > + ch = *format++; > + break; > case 'L': > cnk->cflags = DP_C_LDOUBLE; > ch = *format++; > -- > 1.9.1 >