Re: [Qemu-devel] [PATCH v16 6/9] module: implement module loading

2014-01-15 Thread Fam Zheng
On Wed, 01/15 13:30, Paolo Bonzini wrote: > Il 15/01/2014 13:18, Alex Bligh ha scritto: > > I phrased that badly. I meant same output for the same calling convention, > > so > > surely just replacing 'sha256sum' with 'shasum -a 256' is going to work > > fine on > > all systems? > > I don't think

Re: [Qemu-devel] [PATCH v16 6/9] module: implement module loading

2014-01-15 Thread Paolo Bonzini
Il 15/01/2014 13:34, Fam Zheng ha scritto: >>> > > +echo "CONFIG_STAMP=`(echo $qemu_version; echo $pkgversion; cat $0) | >>> > > sha256sum - | cut -f1 -d\ `" >> $config_host_mak >> > >> > This fails to configure under MacOSX, I'm afraid -- there is >> > no sha256sum there. > Can we assume shasum

Re: [Qemu-devel] [PATCH v16 6/9] module: implement module loading

2014-01-15 Thread Fam Zheng
On Wed, 01/15 11:53, Peter Maydell wrote: > On 15 January 2014 08:48, Fam Zheng wrote: > > This patch adds loading, stamp checking and initialization of modules. > > > +echo "CONFIG_STAMP=`(echo $qemu_version; echo $pkgversion; cat $0) | > > sha256sum - | cut -f1 -d\ `" >> $config_host_mak > >

Re: [Qemu-devel] [PATCH v16 6/9] module: implement module loading

2014-01-15 Thread Paolo Bonzini
Il 15/01/2014 13:18, Alex Bligh ha scritto: > I phrased that badly. I meant same output for the same calling convention, so > surely just replacing 'sha256sum' with 'shasum -a 256' is going to work fine > on > all systems? I don't think all systems are guaranteed to have shasum. If we use SHA-1,

Re: [Qemu-devel] [PATCH v16 6/9] module: implement module loading

2014-01-15 Thread Alex Bligh
On 15 Jan 2014, at 12:10, Paolo Bonzini wrote: > Il 15/01/2014 13:09, Alex Bligh ha scritto: Nope. There is shasum (because perl provides it) and md5 (not md5sum). >> shasum -a 256 should produce the same output as sha256sum >> >> From the manpage: >> >> Since shasum uses the sa

Re: [Qemu-devel] [PATCH v16 6/9] module: implement module loading

2014-01-15 Thread Paolo Bonzini
Il 15/01/2014 13:11, Peter Maydell ha scritto: >> > >> > Then we need a test that tries both sha1sum and shasum > Which systems do you expect to have sha1sum but not > shasum ? Windows (mingw/Cygwin) mainly, but on my Fedora machine only three programs require perl-Digest-SHA (which provides shasu

Re: [Qemu-devel] [PATCH v16 6/9] module: implement module loading

2014-01-15 Thread Peter Maydell
On 15 January 2014 12:05, Paolo Bonzini wrote: > Il 15/01/2014 13:03, Peter Maydell ha scritto: >> >>> > This patch adds loading, stamp checking and initialization of >> >>> > modules. >> >>> > +echo "CONFIG_STAMP=`(echo $qemu_version; echo $pkgversion; cat >> >>> > $0) | sha256s

Re: [Qemu-devel] [PATCH v16 6/9] module: implement module loading

2014-01-15 Thread Paolo Bonzini
Il 15/01/2014 13:09, Alex Bligh ha scritto: >> > Nope. There is shasum (because perl provides it) and md5 >> > (not md5sum). > shasum -a 256 should produce the same output as sha256sum > > From the manpage: > >Since shasum uses the same interface employed by the familiar sha1sum >

Re: [Qemu-devel] [PATCH v16 6/9] module: implement module loading

2014-01-15 Thread Alex Bligh
On 15 Jan 2014, at 12:03, Peter Maydell wrote: > Nope. There is shasum (because perl provides it) and md5 > (not md5sum). shasum -a 256 should produce the same output as sha256sum From the manpage: Since shasum uses the same interface employed by the familiar sha1sum program (and

Re: [Qemu-devel] [PATCH v16 6/9] module: implement module loading

2014-01-15 Thread Paolo Bonzini
Il 15/01/2014 13:03, Peter Maydell ha scritto: > >>> > This patch adds loading, stamp checking and initialization of > >>> > modules. > >>> > +echo "CONFIG_STAMP=`(echo $qemu_version; echo $pkgversion; cat $0) > >>> > | sha256sum - | cut -f1 -d\ `" >> $config_host_mak >>> >> This

Re: [Qemu-devel] [PATCH v16 6/9] module: implement module loading

2014-01-15 Thread Peter Maydell
On 15 January 2014 11:56, Paolo Bonzini wrote: > Il 15/01/2014 12:53, Peter Maydell ha scritto: >>> > This patch adds loading, stamp checking and initialization of modules. >>> > +echo "CONFIG_STAMP=`(echo $qemu_version; echo $pkgversion; cat $0) | >>> > sha256sum - | cut -f1 -d\ `" >> $config_ho

Re: [Qemu-devel] [PATCH v16 6/9] module: implement module loading

2014-01-15 Thread Paolo Bonzini
Il 15/01/2014 12:53, Peter Maydell ha scritto: >> > This patch adds loading, stamp checking and initialization of modules. >> > +echo "CONFIG_STAMP=`(echo $qemu_version; echo $pkgversion; cat $0) | >> > sha256sum - | cut -f1 -d\ `" >> $config_host_mak > This fails to configure under MacOSX, I'm af

Re: [Qemu-devel] [PATCH v16 6/9] module: implement module loading

2014-01-15 Thread Peter Maydell
On 15 January 2014 08:48, Fam Zheng wrote: > This patch adds loading, stamp checking and initialization of modules. > +echo "CONFIG_STAMP=`(echo $qemu_version; echo $pkgversion; cat $0) | > sha256sum - | cut -f1 -d\ `" >> $config_host_mak This fails to configure under MacOSX, I'm afraid -- ther

[Qemu-devel] [PATCH v16 6/9] module: implement module loading

2014-01-15 Thread Fam Zheng
This patch adds loading, stamp checking and initialization of modules. The init function of dynamic module is no longer directly called as __attribute__((constructor)) in static linked version, it is called only after passed the checking of presense of stamp symbol: qemu_stamp_$RELEASEHASH w