Re: svn commit: r334656 - head/stand/libsa
(Should be) Fixed in r334665, sorry for the breakage. -- Ian On Tue, 2018-06-05 at 10:24 -0600, Warner Losh wrote: > There is no real reason for these to be different. Especially if it > causes > problems... > > Warner > > On Tue, Jun 5, 2018, 10:18 AM O. Hartmann > wrote: > > > > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA512 > > > > Am Tue, 5 Jun 2018 14:47:13 + (UTC) > > Ian Lepore schrieb: > > > > > > > > Author: ian > > > Date: Tue Jun 5 14:47:13 2018 > > > New Revision: 334656 > > > URL: https://svnweb.freebsd.org/changeset/base/334656 > > > > > > Log: > > > Add vsnprintf() to libsa. Alpha-sort the printf prototypes in > > > stand.h. > > > > > > I'm not sure why the v*printf() functions in libsa return void > > > instead > > of > > > > > > int, but this maintains that convention for the new function. > > > > > > Modified: > > > head/stand/libsa/printf.c > > > head/stand/libsa/stand.h > > > > > > Modified: head/stand/libsa/printf.c > > > > > === > > === > > > > > > --- head/stand/libsa/printf.c Tue Jun 5 13:53:37 > > > 2018(r334655) > > > +++ head/stand/libsa/printf.c Tue Jun 5 14:47:13 > > > 2018(r334656) > > > @@ -141,6 +141,20 @@ snprintf(char *buf, size_t size, const char > > > *cfmt, > > ... > > > > > > } > > > > > > void > > > +vsnprintf(char *buf, size_t size, const char *cfmt, va_list ap) > > > +{ > > > + struct print_buf arg; > > > + > > > + arg.buf = buf; > > > + arg.size = size; > > > + > > > + kvprintf(cfmt, &snprint_func, &arg, 10, ap); > > > + > > > + if (arg.size >= 1) > > > + *(arg.buf)++ = 0; > > > +} > > > + > > > +void > > > vsprintf(char *buf, const char *cfmt, va_list ap) > > > { > > > int retval; > > > > > > Modified: head/stand/libsa/stand.h > > > > > === > > === > > > > > > --- head/stand/libsa/stand.h Tue Jun 5 13:53:37 > > > 2018(r334655) > > > +++ head/stand/libsa/stand.h Tue Jun 5 14:47:13 > > > 2018(r334656) > > > @@ -268,10 +268,11 @@ extern void *reallocf(void *ptr, size_t > > > size); > > > extern void mallocstats(void); > > > > > > extern int printf(const char *fmt, ...) __printflike(1, 2); > > > -extern void vprintf(const char *fmt, __va_list); > > > extern int sprintf(char *buf, const char *cfmt, ...) > > > __printflike(2, > > 3); > > > > > > extern int snprintf(char *buf, size_t size, const char *cfmt, > > > ...) > > > __printflike(3, 4); +extern void vprintf(const char *fmt, > > __va_list); > > > > > > extern void vsprintf(char *buf, const char *cfmt, __va_list); > > > +extern void vsnprintf(char *buf, size_t size, const char *cfmt, > > __va_list); > > > > > > > > > extern void twiddle(u_int callerdiv); > > > extern void twiddle_divisor(u_int globaldiv); > > > ___ > > > svn-src-h...@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebs > > > d.org" > > > > Building world/kernel fails now with the error shown below: > > > > > > [...] > > In file included from /usr/src/stand/efi/boot1/boot1.c:34: > > - --- all_subdir_share --- > > - --- all_subdir_share/i18n/esdb/KAZAKH --- > > ===> share/i18n/esdb/KAZAKH (all) > > - --- all_subdir_stand --- > > /usr/src/stand/efi/boot1/boot_module.h:109:12: error: conflicting > > types > > for 'vsnprintf' > > extern int vsnprintf(char *str, size_t sz, const char *fmt, va_list > > ap); > > ^ > > /usr/src/stand/libsa/stand.h:275:13: note: previous declaration is > > here > > extern void vsnprintf(char *buf, size_t size, const char *cfmt, > > __va_list); > > ^ > > 1 error generated. > > - --- all_subdir_rescue --- > > - --- depend_subdir_rescue/rescue/routed/rtquery --- > > ===> rescue/rescue/routed/rtquery (depend) > > - --- all_subdir_stand --- > > *** [boot1.o] Error code 1 > > > > make[5]: stopped in /usr/src/stand/efi/boot1 > > .ERROR_TARGET='boot1.o' > > > > .ERROR_META_FILE='/usr/obj/usr/src/amd64.amd64/stand/efi/boot1/boot > > 1.o.meta' > > .MAKE.LEVEL='5' > > MAKEFILE='' > > .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes > > verbose' > > _ERROR_CMD='cc -target x86_64-unknown-freebsd12.0 > > - --sysroot=/usr/obj/usr/src/amd64.amd64/tmp > > -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin > > - -O2 -pipe -O3 -march=native -Wformat -fshort-wchar -mno-red-zone > > -nostdinc > > - -I/usr/obj/usr/src/amd64.amd64/stand/libsa -I/usr/src/stand/libsa > > -D_STANDALONE > > - -I/usr/src/sys -Ddouble=jagged-little-pill -Dfloat=floaty- > > mcfloatface > > - -DLOADER_DISK_SUPPORT -ffreestanding -mno-mmx -mno-sse -mno-avx > > -mno-avx2 -msoft-float > > - -fPIC -mno-red-zone -I. -DEFI_ZFS_BOOT > > -I/usr/src/stand/efi/include > > - -I/usr/src/stand
Re: svn commit: r334656 - head/stand/libsa
On Tue, 2018-06-05 at 10:24 -0600, Warner Losh wrote: > There is no real reason for these to be different. Especially if it > causes > problems... > > Warner > I'm working on a fix. -- Ian > On Tue, Jun 5, 2018, 10:18 AM O. Hartmann > wrote: > > > > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA512 > > > > Am Tue, 5 Jun 2018 14:47:13 + (UTC) > > Ian Lepore schrieb: > > > > > > > > Author: ian > > > Date: Tue Jun 5 14:47:13 2018 > > > New Revision: 334656 > > > URL: https://svnweb.freebsd.org/changeset/base/334656 > > > > > > Log: > > > Add vsnprintf() to libsa. Alpha-sort the printf prototypes in > > > stand.h. > > > > > > I'm not sure why the v*printf() functions in libsa return void > > > instead > > of > > > > > > int, but this maintains that convention for the new function. > > > > > > Modified: > > > head/stand/libsa/printf.c > > > head/stand/libsa/stand.h > > > > > > Modified: head/stand/libsa/printf.c > > > > > === > > === > > > > > > --- head/stand/libsa/printf.c Tue Jun 5 13:53:37 > > > 2018(r334655) > > > +++ head/stand/libsa/printf.c Tue Jun 5 14:47:13 > > > 2018(r334656) > > > @@ -141,6 +141,20 @@ snprintf(char *buf, size_t size, const char > > > *cfmt, > > ... > > > > > > } > > > > > > void > > > +vsnprintf(char *buf, size_t size, const char *cfmt, va_list ap) > > > +{ > > > + struct print_buf arg; > > > + > > > + arg.buf = buf; > > > + arg.size = size; > > > + > > > + kvprintf(cfmt, &snprint_func, &arg, 10, ap); > > > + > > > + if (arg.size >= 1) > > > + *(arg.buf)++ = 0; > > > +} > > > + > > > +void > > > vsprintf(char *buf, const char *cfmt, va_list ap) > > > { > > > int retval; > > > > > > Modified: head/stand/libsa/stand.h > > > > > === > > === > > > > > > --- head/stand/libsa/stand.h Tue Jun 5 13:53:37 > > > 2018(r334655) > > > +++ head/stand/libsa/stand.h Tue Jun 5 14:47:13 > > > 2018(r334656) > > > @@ -268,10 +268,11 @@ extern void *reallocf(void *ptr, size_t > > > size); > > > extern void mallocstats(void); > > > > > > extern int printf(const char *fmt, ...) __printflike(1, 2); > > > -extern void vprintf(const char *fmt, __va_list); > > > extern int sprintf(char *buf, const char *cfmt, ...) > > > __printflike(2, > > 3); > > > > > > extern int snprintf(char *buf, size_t size, const char *cfmt, > > > ...) > > > __printflike(3, 4); +extern void vprintf(const char *fmt, > > __va_list); > > > > > > extern void vsprintf(char *buf, const char *cfmt, __va_list); > > > +extern void vsnprintf(char *buf, size_t size, const char *cfmt, > > __va_list); > > > > > > > > > extern void twiddle(u_int callerdiv); > > > extern void twiddle_divisor(u_int globaldiv); > > > ___ > > > svn-src-h...@freebsd.org mailing list > > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebs > > > d.org" > > > > Building world/kernel fails now with the error shown below: > > > > > > [...] > > In file included from /usr/src/stand/efi/boot1/boot1.c:34: > > - --- all_subdir_share --- > > - --- all_subdir_share/i18n/esdb/KAZAKH --- > > ===> share/i18n/esdb/KAZAKH (all) > > - --- all_subdir_stand --- > > /usr/src/stand/efi/boot1/boot_module.h:109:12: error: conflicting > > types > > for 'vsnprintf' > > extern int vsnprintf(char *str, size_t sz, const char *fmt, va_list > > ap); > > ^ > > /usr/src/stand/libsa/stand.h:275:13: note: previous declaration is > > here > > extern void vsnprintf(char *buf, size_t size, const char *cfmt, > > __va_list); > > ^ > > 1 error generated. > > - --- all_subdir_rescue --- > > - --- depend_subdir_rescue/rescue/routed/rtquery --- > > ===> rescue/rescue/routed/rtquery (depend) > > - --- all_subdir_stand --- > > *** [boot1.o] Error code 1 > > > > make[5]: stopped in /usr/src/stand/efi/boot1 > > .ERROR_TARGET='boot1.o' > > > > .ERROR_META_FILE='/usr/obj/usr/src/amd64.amd64/stand/efi/boot1/boot > > 1.o.meta' > > .MAKE.LEVEL='5' > > MAKEFILE='' > > .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes > > verbose' > > _ERROR_CMD='cc -target x86_64-unknown-freebsd12.0 > > - --sysroot=/usr/obj/usr/src/amd64.amd64/tmp > > -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin > > - -O2 -pipe -O3 -march=native -Wformat -fshort-wchar -mno-red-zone > > -nostdinc > > - -I/usr/obj/usr/src/amd64.amd64/stand/libsa -I/usr/src/stand/libsa > > -D_STANDALONE > > - -I/usr/src/sys -Ddouble=jagged-little-pill -Dfloat=floaty- > > mcfloatface > > - -DLOADER_DISK_SUPPORT -ffreestanding -mno-mmx -mno-sse -mno-avx > > -mno-avx2 -msoft-float > > - -fPIC -mno-red-zone -I. -DEFI_ZFS_BOOT > > -I/usr/src/stand/efi/include > > - -I/usr/src/stand/efi/include/amd64 > > -I/usr/s
Re: svn commit: r334656 - head/stand/libsa
There is no real reason for these to be different. Especially if it causes problems... Warner On Tue, Jun 5, 2018, 10:18 AM O. Hartmann wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > Am Tue, 5 Jun 2018 14:47:13 + (UTC) > Ian Lepore schrieb: > > > Author: ian > > Date: Tue Jun 5 14:47:13 2018 > > New Revision: 334656 > > URL: https://svnweb.freebsd.org/changeset/base/334656 > > > > Log: > > Add vsnprintf() to libsa. Alpha-sort the printf prototypes in stand.h. > > > > I'm not sure why the v*printf() functions in libsa return void instead > of > > int, but this maintains that convention for the new function. > > > > Modified: > > head/stand/libsa/printf.c > > head/stand/libsa/stand.h > > > > Modified: head/stand/libsa/printf.c > > > == > > --- head/stand/libsa/printf.c Tue Jun 5 13:53:37 2018(r334655) > > +++ head/stand/libsa/printf.c Tue Jun 5 14:47:13 2018(r334656) > > @@ -141,6 +141,20 @@ snprintf(char *buf, size_t size, const char *cfmt, > ... > > } > > > > void > > +vsnprintf(char *buf, size_t size, const char *cfmt, va_list ap) > > +{ > > + struct print_buf arg; > > + > > + arg.buf = buf; > > + arg.size = size; > > + > > + kvprintf(cfmt, &snprint_func, &arg, 10, ap); > > + > > + if (arg.size >= 1) > > + *(arg.buf)++ = 0; > > +} > > + > > +void > > vsprintf(char *buf, const char *cfmt, va_list ap) > > { > > int retval; > > > > Modified: head/stand/libsa/stand.h > > > == > > --- head/stand/libsa/stand.h Tue Jun 5 13:53:37 2018(r334655) > > +++ head/stand/libsa/stand.h Tue Jun 5 14:47:13 2018(r334656) > > @@ -268,10 +268,11 @@ extern void *reallocf(void *ptr, size_t size); > > extern void mallocstats(void); > > > > extern int printf(const char *fmt, ...) __printflike(1, 2); > > -extern void vprintf(const char *fmt, __va_list); > > extern int sprintf(char *buf, const char *cfmt, ...) __printflike(2, > 3); > > extern int snprintf(char *buf, size_t size, const char *cfmt, ...) > > __printflike(3, 4); +extern void vprintf(const char *fmt, > __va_list); > > extern void vsprintf(char *buf, const char *cfmt, __va_list); > > +extern void vsnprintf(char *buf, size_t size, const char *cfmt, > __va_list); > > > > extern void twiddle(u_int callerdiv); > > extern void twiddle_divisor(u_int globaldiv); > > ___ > > svn-src-h...@freebsd.org mailing list > > https://lists.freebsd.org/mailman/listinfo/svn-src-head > > To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" > > > Building world/kernel fails now with the error shown below: > > > [...] > In file included from /usr/src/stand/efi/boot1/boot1.c:34: > - --- all_subdir_share --- > - --- all_subdir_share/i18n/esdb/KAZAKH --- > ===> share/i18n/esdb/KAZAKH (all) > - --- all_subdir_stand --- > /usr/src/stand/efi/boot1/boot_module.h:109:12: error: conflicting types > for 'vsnprintf' > extern int vsnprintf(char *str, size_t sz, const char *fmt, va_list ap); >^ > /usr/src/stand/libsa/stand.h:275:13: note: previous declaration is here > extern void vsnprintf(char *buf, size_t size, const char *cfmt, > __va_list); > ^ > 1 error generated. > - --- all_subdir_rescue --- > - --- depend_subdir_rescue/rescue/routed/rtquery --- > ===> rescue/rescue/routed/rtquery (depend) > - --- all_subdir_stand --- > *** [boot1.o] Error code 1 > > make[5]: stopped in /usr/src/stand/efi/boot1 > .ERROR_TARGET='boot1.o' > > .ERROR_META_FILE='/usr/obj/usr/src/amd64.amd64/stand/efi/boot1/boot1.o.meta' > .MAKE.LEVEL='5' > MAKEFILE='' > .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose' > _ERROR_CMD='cc -target x86_64-unknown-freebsd12.0 > - --sysroot=/usr/obj/usr/src/amd64.amd64/tmp > -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin > - -O2 -pipe -O3 -march=native -Wformat -fshort-wchar -mno-red-zone > -nostdinc > - -I/usr/obj/usr/src/amd64.amd64/stand/libsa -I/usr/src/stand/libsa > -D_STANDALONE > - -I/usr/src/sys -Ddouble=jagged-little-pill -Dfloat=floaty-mcfloatface > - -DLOADER_DISK_SUPPORT -ffreestanding -mno-mmx -mno-sse -mno-avx > -mno-avx2 -msoft-float > - -fPIC -mno-red-zone -I. -DEFI_ZFS_BOOT -I/usr/src/stand/efi/include > - -I/usr/src/stand/efi/include/amd64 > -I/usr/src/sys/contrib/dev/acpica/include > - -DEFI_UFS_BOOT -I/usr/src/stand/common -fPIC -DNDEBUG -std=gnu99 > -Wsystem-headers > - -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int > -Wno-unused-const-variable > - -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality > - -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef > - -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum > -Wno-knr-promoted-parameter > - -Wno-parentheses -Wno-format -Qunused-arguments -c > /usr/src/stand/efi/b
Re: svn commit: r334656 - head/stand/libsa
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Am Tue, 5 Jun 2018 14:47:13 + (UTC) Ian Lepore schrieb: > Author: ian > Date: Tue Jun 5 14:47:13 2018 > New Revision: 334656 > URL: https://svnweb.freebsd.org/changeset/base/334656 > > Log: > Add vsnprintf() to libsa. Alpha-sort the printf prototypes in stand.h. > > I'm not sure why the v*printf() functions in libsa return void instead of > int, but this maintains that convention for the new function. > > Modified: > head/stand/libsa/printf.c > head/stand/libsa/stand.h > > Modified: head/stand/libsa/printf.c > == > --- head/stand/libsa/printf.c Tue Jun 5 13:53:37 2018(r334655) > +++ head/stand/libsa/printf.c Tue Jun 5 14:47:13 2018(r334656) > @@ -141,6 +141,20 @@ snprintf(char *buf, size_t size, const char *cfmt, ... > } > > void > +vsnprintf(char *buf, size_t size, const char *cfmt, va_list ap) > +{ > + struct print_buf arg; > + > + arg.buf = buf; > + arg.size = size; > + > + kvprintf(cfmt, &snprint_func, &arg, 10, ap); > + > + if (arg.size >= 1) > + *(arg.buf)++ = 0; > +} > + > +void > vsprintf(char *buf, const char *cfmt, va_list ap) > { > int retval; > > Modified: head/stand/libsa/stand.h > == > --- head/stand/libsa/stand.h Tue Jun 5 13:53:37 2018(r334655) > +++ head/stand/libsa/stand.h Tue Jun 5 14:47:13 2018(r334656) > @@ -268,10 +268,11 @@ extern void *reallocf(void *ptr, size_t size); > extern void mallocstats(void); > > extern int printf(const char *fmt, ...) __printflike(1, 2); > -extern void vprintf(const char *fmt, __va_list); > extern int sprintf(char *buf, const char *cfmt, ...) __printflike(2, 3); > extern int snprintf(char *buf, size_t size, const char *cfmt, ...) > __printflike(3, 4); +extern void vprintf(const char *fmt, __va_list); > extern void vsprintf(char *buf, const char *cfmt, __va_list); > +extern void vsnprintf(char *buf, size_t size, const char *cfmt, __va_list); > > extern void twiddle(u_int callerdiv); > extern void twiddle_divisor(u_int globaldiv); > ___ > svn-src-h...@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org" Building world/kernel fails now with the error shown below: [...] In file included from /usr/src/stand/efi/boot1/boot1.c:34: - --- all_subdir_share --- - --- all_subdir_share/i18n/esdb/KAZAKH --- ===> share/i18n/esdb/KAZAKH (all) - --- all_subdir_stand --- /usr/src/stand/efi/boot1/boot_module.h:109:12: error: conflicting types for 'vsnprintf' extern int vsnprintf(char *str, size_t sz, const char *fmt, va_list ap); ^ /usr/src/stand/libsa/stand.h:275:13: note: previous declaration is here extern void vsnprintf(char *buf, size_t size, const char *cfmt, __va_list); ^ 1 error generated. - --- all_subdir_rescue --- - --- depend_subdir_rescue/rescue/routed/rtquery --- ===> rescue/rescue/routed/rtquery (depend) - --- all_subdir_stand --- *** [boot1.o] Error code 1 make[5]: stopped in /usr/src/stand/efi/boot1 .ERROR_TARGET='boot1.o' .ERROR_META_FILE='/usr/obj/usr/src/amd64.amd64/stand/efi/boot1/boot1.o.meta' .MAKE.LEVEL='5' MAKEFILE='' .MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose' _ERROR_CMD='cc -target x86_64-unknown-freebsd12.0 - --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin - -O2 -pipe -O3 -march=native -Wformat -fshort-wchar -mno-red-zone -nostdinc - -I/usr/obj/usr/src/amd64.amd64/stand/libsa -I/usr/src/stand/libsa -D_STANDALONE - -I/usr/src/sys -Ddouble=jagged-little-pill -Dfloat=floaty-mcfloatface - -DLOADER_DISK_SUPPORT -ffreestanding -mno-mmx -mno-sse -mno-avx -mno-avx2 -msoft-float - -fPIC -mno-red-zone -I. -DEFI_ZFS_BOOT -I/usr/src/stand/efi/include - -I/usr/src/stand/efi/include/amd64 -I/usr/src/sys/contrib/dev/acpica/include - -DEFI_UFS_BOOT -I/usr/src/stand/common -fPIC -DNDEBUG -std=gnu99 -Wsystem-headers - -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable - -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality - -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef - -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter - -Wno-parentheses -Wno-format -Qunused-arguments -c /usr/src/stand/efi/boot1/boot1.c -o boot1.o; ;' ... Sources are at revision 334664. Kind regards, oh - -- O. Hartmann Ich widerspreche der Nutzung oder Übermittlung meiner Daten für Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG). -BEGIN PGP SIGNATURE- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWxa3zgAKCRDS528fyFhY lHBLAgCP69VupKSyww77gfghKUBS6eoR6jf6OmvMG