Re: svn commit: r322893 - head/bin/dd

2017-08-25 Thread Bruce Evans
On Fri, 25 Aug 2017, Conrad Meyer wrote: On Fri, Aug 25, 2017 at 3:49 PM, Bruce Evans wrote: get_off_t() but not the higher level is fixed in my version. Would you mind incorporating your version of dd into FreeBSD, or publishing it so someone else can? I guess it is

Re: svn commit: r322893 - head/bin/dd

2017-08-25 Thread Conrad Meyer
On Fri, Aug 25, 2017 at 3:49 PM, Bruce Evans wrote: > get_off_t() but not the higher level is fixed in my version. Would you mind incorporating your version of dd into FreeBSD, or publishing it so someone else can? Thanks, Conrad

Re: svn commit: r322893 - head/bin/dd

2017-08-25 Thread Bruce Evans
On Fri, 25 Aug 2017, Matt Joras wrote: On 08/25/2017 10:17, Conrad Meyer wrote: This change seems to break buildworld on MIPS: /home/cem/head.svn/bin/dd/args.c: In function 'f_bs': /home/cem/head.svn/bin/dd/args.c:188: warning: format '%zd' expects type 'signed size_t', but argument 3 has

Re: svn commit: r322893 - head/bin/dd

2017-08-25 Thread Bruce Evans
On Fri, 25 Aug 2017, Conrad Meyer wrote: Well, not negative, just large uint64_t numbers that would be negative as off_t (int64_t). E.g., dd if=/dev/kmem bs=1 iseek=0xf...foo count=8. I think we would like that to work. I don't recall whether it does or not before this change. This is

Re: svn commit: r322893 - head/bin/dd

2017-08-25 Thread Bruce Evans
On Fri, 25 Aug 2017, Alan Somers wrote: Log: dd(1): Incorrect casting of arguments It is indeed now incorrect. dd(1) casts many of its numeric arguments from uintmax_t to intmax_t and back again to detect whether or not the original arguments were negative. This is not correct, and

Re: svn commit: r322893 - head/bin/dd

2017-08-25 Thread Ian Lepore
On Fri, 2017-08-25 at 12:09 -0600, Warner Losh wrote: > On Fri, Aug 25, 2017 at 12:02 PM, Matt Joras > wrote: > > > > > On 08/25/2017 10:17, Conrad Meyer wrote: > > > > > > This change seems to break buildworld on MIPS: > > > > > > /home/cem/head.svn/bin/dd/args.c: In

Re: svn commit: r322893 - head/bin/dd

2017-08-25 Thread Alan Somers
That doesn't work either before or after this change. -Alan On Fri, Aug 25, 2017 at 11:20 AM, Conrad Meyer wrote: > Well, not negative, just large uint64_t numbers that would be negative > as off_t (int64_t). > > E.g., dd if=/dev/kmem bs=1 iseek=0xf...foo count=8. I think

Re: svn commit: r322893 - head/bin/dd

2017-08-25 Thread Warner Losh
On Fri, Aug 25, 2017 at 12:02 PM, Matt Joras wrote: > On 08/25/2017 10:17, Conrad Meyer wrote: > > This change seems to break buildworld on MIPS: > > > > /home/cem/head.svn/bin/dd/args.c: In function 'f_bs': > > /home/cem/head.svn/bin/dd/args.c:188: warning: format '%zd'

Re: svn commit: r322893 - head/bin/dd

2017-08-25 Thread Matt Joras
On 08/25/2017 10:17, Conrad Meyer wrote: > This change seems to break buildworld on MIPS: > > /home/cem/head.svn/bin/dd/args.c: In function 'f_bs': > /home/cem/head.svn/bin/dd/args.c:188: warning: format '%zd' expects > type 'signed size_t', but argument 3 has type 'long int' >

Re: svn commit: r322893 - head/bin/dd

2017-08-25 Thread Conrad Meyer
Well, not negative, just large uint64_t numbers that would be negative as off_t (int64_t). E.g., dd if=/dev/kmem bs=1 iseek=0xf...foo count=8. I think we would like that to work. I don't recall whether it does or not before this change. Best, Conrad On Fri, Aug 25, 2017 at 10:08 AM, Alan

Re: svn commit: r322893 - head/bin/dd

2017-08-25 Thread Conrad Meyer
This change seems to break buildworld on MIPS: /home/cem/head.svn/bin/dd/args.c: In function 'f_bs': /home/cem/head.svn/bin/dd/args.c:188: warning: format '%zd' expects type 'signed size_t', but argument 3 has type 'long int' /home/cem/head.svn/bin/dd/args.c: In function 'f_cbs':

Re: svn commit: r322893 - head/bin/dd

2017-08-25 Thread Alan Somers
Nope. Do you mean negative offsets for the iseek argument? I didn't know you could do that. On Fri, Aug 25, 2017 at 10:59 AM, Conrad Meyer wrote: > Hi Alan, > > By any chance did you test this change with /dev/kmem and kernel > addresses ("negative" off_t values)? > > Thanks,

Re: svn commit: r322893 - head/bin/dd

2017-08-25 Thread Conrad Meyer
Hi Alan, By any chance did you test this change with /dev/kmem and kernel addresses ("negative" off_t values)? Thanks, Conrad On Fri, Aug 25, 2017 at 8:31 AM, Alan Somers wrote: > Author: asomers > Date: Fri Aug 25 15:31:55 2017 > New Revision: 322893 > URL:

svn commit: r322893 - head/bin/dd

2017-08-25 Thread Alan Somers
Author: asomers Date: Fri Aug 25 15:31:55 2017 New Revision: 322893 URL: https://svnweb.freebsd.org/changeset/base/322893 Log: dd(1): Incorrect casting of arguments dd(1) casts many of its numeric arguments from uintmax_t to intmax_t and back again to detect whether or not the original