Date: Fri, 11 Nov 2016 10:24:12 -0700 From: Warner Losh <imp@bsdimp.com> To: Toomas Soome <tsoome@me.com> Cc: Kamil Czekirda <kczekirda@gmail.com>, Toomas Soome <tsoome@freebsd.org>, src-committers <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r308434 - in head: lib/libstand sys/boot/common sys/boot/efi/libefi sys/boot/efi/loader sys/boot/i386/libfirewire sys/boot/i386/libi386 sys/boot/mips/beri/loader sys/boot/ofw/libofw sys... Message-ID: <CANCZdfo3KA64KZiMd-z-oa=1wsY=CwPNSHCYDgZpG4tv1M9odw@mail.gmail.com> In-Reply-To: <0B89F169-9FAB-4FEA-BBBE-0000DE54F09A@me.com> References: <201611080650.uA86oJ7W056026@repo.freebsd.org> <CADSgWNG=xoi7PApur5s-UkbWVB=xZo0AK2xWapo3FwCZQ=vUOg@mail.gmail.com> <8E0E5C94-EFD7-4008-B563-FF080A98F23D@me.com> <CADSgWNFwjLTmp-iW=MGCX3Q0dWW3fC=_0-ZZrd=0Yd%2B870y1%2BA@mail.gmail.com> <CANCZdfqwpHk3656Gc0T3LHTnjoGpNsBcaTQ5Q2CmdvtQ=C78BA@mail.gmail.com> <0B89F169-9FAB-4FEA-BBBE-0000DE54F09A@me.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Nov 11, 2016 at 10:20 AM, Toomas Soome <tsoome@me.com> wrote: > >> On 11. nov 2016, at 19:08, Warner Losh <imp@bsdimp.com> wrote: >> >> This suggests we've created an update / upgrade problem. Do we? >> >> Warner > > > Not if the normal build suggestion (make buildworld buildkernel) is follo= wed, as then the headers from the source tree are put in proper place as pa= rt of the build procedure - in this case the source was fetched by svn upda= te and attempt was made to build part of the fetched tree. > > In that sense, I don=E2=80=99t see the problem, as direct build without s= cene setup is not really supported. Or am I wrong? The same issue will happ= en with any header change, as you can not really build new source with usin= g old headers. OK. Nah, this is cool. libstand's API is somewhat unstable and not needed in the upgrade path. Warner > rgds, > toomas > >> >> On Thu, Nov 10, 2016 at 11:52 PM, Kamil Czekirda <kczekirda@gmail.com> w= rote: >>> cp /usr/src/lib/libstand/libstand.h /usr/include/stand.h fixed that >>> >>> thanks >>> >>> 2016-11-10 23:28 GMT+01:00 Toomas Soome <tsoome@me.com>: >>>> >>>> the patch does update the lib/libstand/stand.h to have: >>>> >>>> struct devsw { >>>> . . . >>>> int (*dv_print)(int verbose); >>>> >>>> it was void before; from your svnlite log I can see the >>>> lib/libstand/stand.h is updated, could you confirm if it is int now? i= f it >>>> is, I suspect the build is getting the old stand.h from somewhere in t= he >>>> tree and not your <source>/lib/libstand. >>>> >>>> if so, does the build has target to copy headers in place? I=E2=80=99m= sorry, I >>>> don't know all the tricks the build system does as part of the buildwo= rld.. >>>> >>>> rgds, >>>> toomas >>>> >>>> >>>> On 11. nov 2016, at 0:21, Kamil Czekirda <kczekirda@gmail.com> wrote: >>>> >>>> Hi, >>>> >>>> I got the following: >>>> >>>> root@current:/usr/src # svnlite up -r r308434 >>>> Updating '.': >>>> U lib/libstand/stand.h >>>> U sys/boot/common/dev_net.c >>>> U sys/boot/common/module.c >>>> U sys/boot/common/part.c >>>> U sys/boot/common/util.c >>>> U sys/boot/common/util.h >>>> U sys/boot/efi/libefi/efinet.c >>>> U sys/boot/efi/libefi/efipart.c >>>> U sys/boot/efi/loader/main.c >>>> U sys/boot/i386/libfirewire/firewire.c >>>> U sys/boot/i386/libi386/bioscd.c >>>> U sys/boot/i386/libi386/biosdisk.c >>>> U sys/boot/mips/beri/loader/beri_disk_cfi.c >>>> U sys/boot/mips/beri/loader/beri_disk_sdcard.c >>>> U sys/boot/ofw/libofw/ofw_disk.c >>>> U sys/boot/pc98/libpc98/bioscd.c >>>> U sys/boot/pc98/libpc98/biosdisk.c >>>> U sys/boot/powerpc/kboot/hostdisk.c >>>> U sys/boot/powerpc/ps3/ps3cdrom.c >>>> U sys/boot/powerpc/ps3/ps3disk.c >>>> U sys/boot/uboot/lib/disk.c >>>> U sys/boot/usb/storage/umass_loader.c >>>> U sys/boot/userboot/userboot/host.c >>>> U sys/boot/userboot/userboot/userboot_disk.c >>>> U sys/boot/zfs/zfs.c >>>> U sys/boot/zfs/zfsimpl.c >>>> U sys/boot/i386/libi386/pxe.c >>>> Updated to revision 308434. >>>> root@current:/usr/src # cd sys/boot/ >>>> root@current:/usr/src/sys/boot # make clean >>>> (...) >>>> root@current:/usr/src/sys/boot # make obj >>>> (...) >>>> root@current:/usr/src/sys/boot # make >>>> (...) >>>> cc -O2 -pipe -DSKEIN_LOOP=3D111 -fPIC -I/usr/src/sys/boot/efi/loade= r >>>> -I/usr/src/sys/boot/efi/loader/arch/amd64 >>>> -I/usr/src/sys/boot/efi/loader/../include >>>> -I/usr/src/sys/boot/efi/loader/../include/amd64 >>>> -I/usr/src/sys/boot/efi/loader/../../../contrib/dev/acpica/include >>>> -I/usr/src/sys/boot/efi/loader/../../.. >>>> -I/usr/src/sys/boot/efi/loader/../../i386/libi386 >>>> -I/usr/src/sys/boot/efi/loader/../../zfs >>>> -I/usr/src/sys/boot/efi/loader/../../../cddl/boot/zfs >>>> -I/usr/src/sys/boot/efi/loader/../../../crypto/skein -DEFI_ZFS_BOOT -D= NO_PCI >>>> -DEFI -DSMBIOS_SERIAL_NUMBERS -DBOOT_FORTH >>>> -I/usr/src/sys/boot/efi/loader/../../ficl >>>> -I/usr/src/sys/boot/efi/loader/../../ficl/amd64 -DLOADER_DISK_SUPPORT >>>> -DLOADER_GPT_SUPPORT -DLOADER_MBR_SUPPORT -fPIC -I/usr/src/sys/boot/fi= cl >>>> -I/usr/src/sys/boot/ficl/amd64 -I/usr/src/sys/boot/ficl/../common >>>> -I/usr/src/sys/boot/efi/loader/../../common -ffreestanding -Wformat >>>> -msoft-float -mno-mmx -mno-sse -mno-avx -fshort-wchar -mno-red-zone -m= no-aes >>>> -g -MD -MF.depend.vers.o -MTvers.o -std=3Dgnu99 -Wsystem-headers -Wer= ror >>>> -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes >>>> -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-s= ign >>>> -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 >>>> -Qunused-arguments -c vers.c -o vers.o >>>> cc -O2 -pipe -DSKEIN_LOOP=3D111 -fPIC -I/usr/src/sys/boot/efi/loade= r >>>> -I/usr/src/sys/boot/efi/loader/arch/amd64 >>>> -I/usr/src/sys/boot/efi/loader/../include >>>> -I/usr/src/sys/boot/efi/loader/../include/amd64 >>>> -I/usr/src/sys/boot/efi/loader/../../../contrib/dev/acpica/include >>>> -I/usr/src/sys/boot/efi/loader/../../.. >>>> -I/usr/src/sys/boot/efi/loader/../../i386/libi386 >>>> -I/usr/src/sys/boot/efi/loader/../../zfs >>>> -I/usr/src/sys/boot/efi/loader/../../../cddl/boot/zfs >>>> -I/usr/src/sys/boot/efi/loader/../../../crypto/skein -DEFI_ZFS_BOOT -D= NO_PCI >>>> -DEFI -DSMBIOS_SERIAL_NUMBERS -DBOOT_FORTH >>>> -I/usr/src/sys/boot/efi/loader/../../ficl >>>> -I/usr/src/sys/boot/efi/loader/../../ficl/amd64 -DLOADER_DISK_SUPPORT >>>> -DLOADER_GPT_SUPPORT -DLOADER_MBR_SUPPORT -fPIC -I/usr/src/sys/boot/fi= cl >>>> -I/usr/src/sys/boot/ficl/amd64 -I/usr/src/sys/boot/ficl/../common >>>> -I/usr/src/sys/boot/efi/loader/../../common -ffreestanding -Wformat >>>> -msoft-float -mno-mmx -mno-sse -mno-avx -fshort-wchar -mno-red-zone -m= no-aes >>>> -g -MD -MF.depend.zfs.o -MTzfs.o -std=3Dgnu99 -Wsystem-headers -Werro= r -Wall >>>> -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes >>>> -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-s= ign >>>> -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-sign-compare -Wno-array-bounds -Wno-missing-prototypes >>>> -Qunused-arguments -c /usr/src/sys/boot/efi/loader/../../zfs/zfs.c -o= zfs.o >>>> /usr/src/sys/boot/efi/loader/../../zfs/zfs.c:599:14: error: incompatib= le >>>> pointer types initializing 'void (*)(int)' with an expression of type = 'int >>>> (int)' [-Werror,-Wincompatible-pointer-types] >>>> .dv_print =3D zfs_dev_print, >>>> ^~~~~~~~~~~~~ >>>> 1 error generated. >>>> *** Error code 1 >>>> >>>> Stop. >>>> make[2]: stopped in /usr/src/sys/boot/efi/loader >>>> *** Error code 1 >>>> >>>> Stop. >>>> make[1]: stopped in /usr/src/sys/boot/efi >>>> *** Error code 1 >>>> >>>> Stop. >>>> make: stopped in /usr/src/sys/boot >>>> >>>> >>>> Kamil >>>> >>>> 2016-11-08 7:50 GMT+01:00 Toomas Soome <tsoome@freebsd.org>: >>>>> >>>>> Author: tsoome >>>>> Date: Tue Nov 8 06:50:18 2016 >>>>> New Revision: 308434 >>>>> URL: https://svnweb.freebsd.org/changeset/base/308434 >>>>> >>>>> Log: >>>>> Loader paged/pageable data is not always paged. >>>>> >>>>> This change does modify devsw dv_print() to return the int value, >>>>> enabling walkers to interrupt the walk on non zero value from >>>>> dv_print(). >>>>> >>>>> This will allow the pager_print actually to stop displaying data on >>>>> user input, and additionally pager is used in various *dev_print >>>>> callbacks, >>>>> where it was missing. >>>>> >>>>> For test, lsdev [-v] command should display data by screenfuls and >>>>> should >>>>> stop when the key 'q' is pressed on pager prompt. >>>>> >>>>> Reviewed by: allanjude >>>>> Approved by: allanjude (mentor) >>>>> Differential Revision: https://reviews.freebsd.org/D5461 >>>>> >>>>> Modified: >>>>> head/lib/libstand/stand.h >>>>> head/sys/boot/common/dev_net.c >>>>> head/sys/boot/common/module.c >>>>> head/sys/boot/common/part.c >>>>> head/sys/boot/common/util.c >>>>> head/sys/boot/common/util.h >>>>> head/sys/boot/efi/libefi/efinet.c >>>>> head/sys/boot/efi/libefi/efipart.c >>>>> head/sys/boot/efi/loader/main.c >>>>> head/sys/boot/i386/libfirewire/firewire.c >>>>> head/sys/boot/i386/libi386/bioscd.c >>>>> head/sys/boot/i386/libi386/biosdisk.c >>>>> head/sys/boot/i386/libi386/pxe.c >>>>> head/sys/boot/mips/beri/loader/beri_disk_cfi.c >>>>> head/sys/boot/mips/beri/loader/beri_disk_sdcard.c >>>>> head/sys/boot/ofw/libofw/ofw_disk.c >>>>> head/sys/boot/pc98/libpc98/bioscd.c >>>>> head/sys/boot/pc98/libpc98/biosdisk.c >>>>> head/sys/boot/powerpc/kboot/hostdisk.c >>>>> head/sys/boot/powerpc/ps3/ps3cdrom.c >>>>> head/sys/boot/powerpc/ps3/ps3disk.c >>>>> head/sys/boot/uboot/lib/disk.c >>>>> head/sys/boot/usb/storage/umass_loader.c >>>>> head/sys/boot/userboot/userboot/host.c >>>>> head/sys/boot/userboot/userboot/userboot_disk.c >>>>> head/sys/boot/zfs/zfs.c >>>>> head/sys/boot/zfs/zfsimpl.c >>>>> >>>>> Modified: head/lib/libstand/stand.h >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/lib/libstand/stand.h Tue Nov 8 06:13:22 2016 (r308= 433) >>>>> +++ head/lib/libstand/stand.h Tue Nov 8 06:50:18 2016 (r308= 434) >>>>> @@ -143,7 +143,7 @@ struct devsw { >>>>> int (*dv_open)(struct open_file *f, ...); >>>>> int (*dv_close)(struct open_file *f); >>>>> int (*dv_ioctl)(struct open_file *f, u_long cmd, v= oid >>>>> *data); >>>>> - void (*dv_print)(int verbose); /* print device >>>>> information */ >>>>> + int (*dv_print)(int verbose); /* print devi= ce >>>>> information */ >>>>> void (*dv_cleanup)(void); >>>>> }; >>>>> >>>>> >>>>> Modified: head/sys/boot/common/dev_net.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/common/dev_net.c Tue Nov 8 06:13:22 2016 >>>>> (r308433) >>>>> +++ head/sys/boot/common/dev_net.c Tue Nov 8 06:50:18 2016 >>>>> (r308434) >>>>> @@ -80,7 +80,7 @@ static int net_open(struct open_file *, >>>>> static int net_close(struct open_file *); >>>>> static void net_cleanup(void); >>>>> static int net_strategy(); >>>>> -static void net_print(int); >>>>> +static int net_print(int); >>>>> >>>>> static int net_getparams(int sock); >>>>> >>>>> @@ -325,23 +325,27 @@ exit: >>>>> return (0); >>>>> } >>>>> >>>>> -static void >>>>> +static int >>>>> net_print(int verbose) >>>>> { >>>>> struct netif_driver *drv; >>>>> int i, d, cnt; >>>>> + int ret =3D 0; >>>>> >>>>> cnt =3D 0; >>>>> for (d =3D 0; netif_drivers[d]; d++) { >>>>> drv =3D netif_drivers[d]; >>>>> for (i =3D 0; i < drv->netif_nifs; i++) { >>>>> printf("\t%s%d:", "net", cnt++); >>>>> - if (verbose) >>>>> + if (verbose) { >>>>> printf(" (%s%d)", drv->netif_bname, >>>>> drv->netif_ifs[i].dif_unit); >>>>> + } >>>>> + if ((ret =3D pager_output("\n")) !=3D 0) >>>>> + return (ret); >>>>> } >>>>> } >>>>> - printf("\n"); >>>>> + return (ret); >>>>> } >>>>> >>>>> /* >>>>> >>>>> Modified: head/sys/boot/common/module.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/common/module.c Tue Nov 8 06:13:22 2016 >>>>> (r308433) >>>>> +++ head/sys/boot/common/module.c Tue Nov 8 06:50:18 2016 >>>>> (r308434) >>>>> @@ -254,7 +254,7 @@ command_lsmod(int argc, char *argv[]) >>>>> struct kernel_module *mp; >>>>> struct file_metadata *md; >>>>> char lbuf[80]; >>>>> - int ch, verbose; >>>>> + int ch, verbose, ret =3D 0; >>>>> >>>>> verbose =3D 0; >>>>> optind =3D 1; >>>>> @@ -273,11 +273,13 @@ command_lsmod(int argc, char *argv[]) >>>>> >>>>> pager_open(); >>>>> for (fp =3D preloaded_files; fp; fp =3D fp->f_next) { >>>>> - sprintf(lbuf, " %p: ", (void *) fp->f_addr); >>>>> + snprintf(lbuf, sizeof(lbuf), " %p: ", (void *) fp->f_addr); >>>>> pager_output(lbuf); >>>>> pager_output(fp->f_name); >>>>> - sprintf(lbuf, " (%s, 0x%lx)\n", fp->f_type, (long)fp->f_size)= ; >>>>> - pager_output(lbuf); >>>>> + snprintf(lbuf, sizeof(lbuf), " (%s, 0x%lx)\n", fp->f_type, >>>>> + (long)fp->f_size); >>>>> + if (pager_output(lbuf)) >>>>> + break; >>>>> if (fp->f_args !=3D NULL) { >>>>> pager_output(" args: "); >>>>> pager_output(fp->f_args); >>>>> @@ -287,7 +289,8 @@ command_lsmod(int argc, char *argv[]) >>>>> if (fp->f_modules) { >>>>> pager_output(" modules: "); >>>>> for (mp =3D fp->f_modules; mp; mp =3D mp->m_next) { >>>>> - sprintf(lbuf, "%s.%d ", mp->m_name, mp->m_version); >>>>> + snprintf(lbuf, sizeof(lbuf), "%s.%d ", mp->m_name, >>>>> + mp->m_version); >>>>> pager_output(lbuf); >>>>> } >>>>> if (pager_output("\n")) >>>>> @@ -296,11 +299,14 @@ command_lsmod(int argc, char *argv[]) >>>>> if (verbose) { >>>>> /* XXX could add some formatting smarts here to display so= me >>>>> better */ >>>>> for (md =3D fp->f_metadata; md !=3D NULL; md =3D md->md_ne= xt) { >>>>> - sprintf(lbuf, " 0x%04x, 0x%lx\n", md->md_type, >>>>> (long) md->md_size); >>>>> + snprintf(lbuf, sizeof(lbuf), " 0x%04x, 0x%lx\n", >>>>> + md->md_type, (long) md->md_size); >>>>> if (pager_output(lbuf)) >>>>> break; >>>>> } >>>>> } >>>>> + if (ret) >>>>> + break; >>>>> } >>>>> pager_close(); >>>>> return(CMD_OK); >>>>> >>>>> Modified: head/sys/boot/common/part.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/common/part.c Tue Nov 8 06:13:22 2016 (r308= 433) >>>>> +++ head/sys/boot/common/part.c Tue Nov 8 06:50:18 2016 (r308= 434) >>>>> @@ -834,6 +834,7 @@ ptable_iterate(const struct ptable *tabl >>>>> { >>>>> struct pentry *entry; >>>>> char name[32]; >>>>> + int ret =3D 0; >>>>> >>>>> name[0] =3D '\0'; >>>>> STAILQ_FOREACH(entry, &table->entries, entry) { >>>>> @@ -856,9 +857,8 @@ ptable_iterate(const struct ptable *tabl >>>>> if (table->type =3D=3D PTABLE_BSD) >>>>> sprintf(name, "%c", (u_char) 'a' + >>>>> entry->part.index); >>>>> - if (iter(arg, name, &entry->part)) >>>>> - return 1; >>>>> + if ((ret =3D iter(arg, name, &entry->part)) !=3D 0) >>>>> + return (ret); >>>>> } >>>>> - return 0; >>>>> + return (ret); >>>>> } >>>>> - >>>>> >>>>> Modified: head/sys/boot/common/util.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/common/util.c Tue Nov 8 06:13:22 2016 (r308= 433) >>>>> +++ head/sys/boot/common/util.c Tue Nov 8 06:50:18 2016 (r308= 434) >>>>> @@ -114,7 +114,7 @@ strlen(const char *s) >>>>> return (len); >>>>> } >>>>> >>>>> -void >>>>> +int >>>>> printf(const char *fmt, ...) >>>>> { >>>>> va_list ap; >>>>> @@ -178,4 +178,5 @@ nextfmt: >>>>> } >>>>> } >>>>> va_end(ap); >>>>> + return (0); >>>>> } >>>>> >>>>> Modified: head/sys/boot/common/util.h >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/common/util.h Tue Nov 8 06:13:22 2016 (r308= 433) >>>>> +++ head/sys/boot/common/util.h Tue Nov 8 06:50:18 2016 (r308= 434) >>>>> @@ -48,6 +48,6 @@ void strcat(char *dst, const char *src); >>>>> char *strchr(const char *s, char ch); >>>>> size_t strlen(const char *s); >>>>> >>>>> -void printf(const char *fmt, ...); >>>>> +int printf(const char *fmt, ...); >>>>> >>>>> #endif /* !_UTIL_H_ */ >>>>> >>>>> Modified: head/sys/boot/efi/libefi/efinet.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/efi/libefi/efinet.c Tue Nov 8 06:13:22 2016 >>>>> (r308433) >>>>> +++ head/sys/boot/efi/libefi/efinet.c Tue Nov 8 06:50:18 2016 >>>>> (r308434) >>>>> @@ -252,7 +252,7 @@ efinet_end(struct netif *nif) >>>>> } >>>>> >>>>> static int efinet_dev_init(void); >>>>> -static void efinet_dev_print(int); >>>>> +static int efinet_dev_print(int); >>>>> >>>>> struct devsw efinet_dev =3D { >>>>> .dv_name =3D "net", >>>>> @@ -346,14 +346,13 @@ efinet_dev_init() >>>>> return (0); >>>>> } >>>>> >>>>> -static void >>>>> +static int >>>>> efinet_dev_print(int verbose) >>>>> { >>>>> CHAR16 *text; >>>>> EFI_HANDLE h; >>>>> - int unit; >>>>> + int unit, ret =3D 0; >>>>> >>>>> - pager_open(); >>>>> for (unit =3D 0, h =3D efi_find_handle(&efinet_dev, 0); >>>>> h !=3D NULL; h =3D efi_find_handle(&efinet_dev, ++unit)) { >>>>> printf(" %s%d:", efinet_dev.dv_name, unit); >>>>> @@ -364,8 +363,8 @@ efinet_dev_print(int verbose) >>>>> efi_free_devpath_name(text); >>>>> } >>>>> } >>>>> - if (pager_output("\n")) >>>>> + if ((ret =3D pager_output("\n")) !=3D 0) >>>>> break; >>>>> } >>>>> - pager_close(); >>>>> + return (ret); >>>>> } >>>>> >>>>> Modified: head/sys/boot/efi/libefi/efipart.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/efi/libefi/efipart.c Tue Nov 8 06:13:22 2016 >>>>> (r308433) >>>>> +++ head/sys/boot/efi/libefi/efipart.c Tue Nov 8 06:50:18 2016 >>>>> (r308434) >>>>> @@ -47,7 +47,7 @@ static int efipart_realstrategy(void *, >>>>> size_t *); >>>>> static int efipart_open(struct open_file *, ...); >>>>> static int efipart_close(struct open_file *); >>>>> -static void efipart_print(int); >>>>> +static int efipart_print(int); >>>>> >>>>> struct devsw efipart_dev =3D { >>>>> .dv_name =3D "part", >>>>> @@ -162,7 +162,7 @@ efipart_init(void) >>>>> return (err); >>>>> } >>>>> >>>>> -static void >>>>> +static int >>>>> efipart_print(int verbose) >>>>> { >>>>> char line[80]; >>>>> @@ -170,28 +170,29 @@ efipart_print(int verbose) >>>>> EFI_HANDLE h; >>>>> EFI_STATUS status; >>>>> u_int unit; >>>>> + int ret =3D 0; >>>>> >>>>> - pager_open(); >>>>> for (unit =3D 0, h =3D efi_find_handle(&efipart_dev, 0); >>>>> h !=3D NULL; h =3D efi_find_handle(&efipart_dev, ++unit)) = { >>>>> - sprintf(line, " %s%d:", efipart_dev.dv_name, unit)= ; >>>>> - if (pager_output(line)) >>>>> + snprintf(line, sizeof(line), " %s%d:", >>>>> + efipart_dev.dv_name, unit); >>>>> + if ((ret =3D pager_output(line)) !=3D 0) >>>>> break; >>>>> >>>>> status =3D BS->HandleProtocol(h, &blkio_guid, (void >>>>> **)&blkio); >>>>> if (!EFI_ERROR(status)) { >>>>> - sprintf(line, " %llu blocks", >>>>> + snprintf(line, sizeof(line), " %llu blocks= ", >>>>> (unsigned long long)(blkio->Media->LastBlo= ck >>>>> + 1)); >>>>> - if (pager_output(line)) >>>>> + if ((ret =3D pager_output(line)) !=3D 0) >>>>> break; >>>>> if (blkio->Media->RemovableMedia) >>>>> - if (pager_output(" (removable)")) >>>>> + if ((ret =3D pager_output(" (removabl= e)")) >>>>> !=3D 0) >>>>> break; >>>>> } >>>>> - if (pager_output("\n")) >>>>> + if ((ret =3D pager_output("\n")) !=3D 0) >>>>> break; >>>>> } >>>>> - pager_close(); >>>>> + return (ret); >>>>> } >>>>> >>>>> static int >>>>> >>>>> Modified: head/sys/boot/efi/loader/main.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/efi/loader/main.c Tue Nov 8 06:13:22 2016 >>>>> (r308433) >>>>> +++ head/sys/boot/efi/loader/main.c Tue Nov 8 06:50:18 2016 >>>>> (r308434) >>>>> @@ -533,6 +533,7 @@ command_memmap(int argc, char *argv[]) >>>>> UINT32 dver; >>>>> EFI_STATUS status; >>>>> int i, ndesc; >>>>> + char line[80]; >>>>> static char *types[] =3D { >>>>> "Reserved", >>>>> "LoaderCode", >>>>> @@ -564,14 +565,19 @@ command_memmap(int argc, char *argv[]) >>>>> } >>>>> >>>>> ndesc =3D sz / dsz; >>>>> - printf("%23s %12s %12s %8s %4s\n", >>>>> + snprintf(line, sizeof(line), "%23s %12s %12s %8s %4s\n", >>>>> "Type", "Physical", "Virtual", "#Pages", "Attr"); >>>>> + pager_open(); >>>>> + if (pager_output(line)) { >>>>> + pager_close(); >>>>> + return (CMD_OK); >>>>> + } >>>>> >>>>> for (i =3D 0, p =3D map; i < ndesc; >>>>> i++, p =3D NextMemoryDescriptor(p, dsz)) { >>>>> printf("%23s %012jx %012jx %08jx ", types[p->Type], >>>>> - (uintmax_t)p->PhysicalStart, >>>>> (uintmax_t)p->VirtualStart, >>>>> - (uintmax_t)p->NumberOfPages); >>>>> + (uintmax_t)p->PhysicalStart, >>>>> (uintmax_t)p->VirtualStart, >>>>> + (uintmax_t)p->NumberOfPages); >>>>> if (p->Attribute & EFI_MEMORY_UC) >>>>> printf("UC "); >>>>> if (p->Attribute & EFI_MEMORY_WC) >>>>> @@ -588,9 +594,11 @@ command_memmap(int argc, char *argv[]) >>>>> printf("RP "); >>>>> if (p->Attribute & EFI_MEMORY_XP) >>>>> printf("XP "); >>>>> - printf("\n"); >>>>> + if (pager_output("\n")) >>>>> + break; >>>>> } >>>>> >>>>> + pager_close(); >>>>> return (CMD_OK); >>>>> } >>>>> >>>>> @@ -612,10 +620,17 @@ guid_to_string(EFI_GUID *guid) >>>>> static int >>>>> command_configuration(int argc, char *argv[]) >>>>> { >>>>> + char line[80]; >>>>> UINTN i; >>>>> >>>>> - printf("NumberOfTableEntries=3D%lu\n", >>>>> + snprintf(line, sizeof(line), "NumberOfTableEntries=3D%lu\n", >>>>> (unsigned long)ST->NumberOfTableEntries); >>>>> + pager_open(); >>>>> + if (pager_output(line)) { >>>>> + pager_close(); >>>>> + return (CMD_OK); >>>>> + } >>>>> + >>>>> for (i =3D 0; i < ST->NumberOfTableEntries; i++) { >>>>> EFI_GUID *guid; >>>>> >>>>> @@ -642,9 +657,13 @@ command_configuration(int argc, char *ar >>>>> printf("FDT Table"); >>>>> else >>>>> printf("Unknown Table (%s)", >>>>> guid_to_string(guid)); >>>>> - printf(" at %p\n", >>>>> ST->ConfigurationTable[i].VendorTable); >>>>> + snprintf(line, sizeof(line), " at %p\n", >>>>> + ST->ConfigurationTable[i].VendorTable); >>>>> + if (pager_output(line)) >>>>> + break; >>>>> } >>>>> >>>>> + pager_close(); >>>>> return (CMD_OK); >>>>> } >>>>> >>>>> >>>>> Modified: head/sys/boot/i386/libfirewire/firewire.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/i386/libfirewire/firewire.c Tue Nov 8 06:13:22 2= 016 >>>>> (r308433) >>>>> +++ head/sys/boot/i386/libfirewire/firewire.c Tue Nov 8 06:50:18 2= 016 >>>>> (r308434) >>>>> @@ -69,7 +69,7 @@ static int fw_strategy(void *devdata, in >>>>> size_t offset, size_t size, char *buf, size_t >>>>> *rsize); >>>>> static int fw_open(struct open_file *f, ...); >>>>> static int fw_close(struct open_file *f); >>>>> -static void fw_print(int verbose); >>>>> +static int fw_print(int verbose); >>>>> static void fw_cleanup(void); >>>>> >>>>> void fw_enable(void); >>>>> @@ -148,21 +148,26 @@ fw_init(void) >>>>> /* >>>>> * Print information about OHCI chips >>>>> */ >>>>> -static void >>>>> +static int >>>>> fw_print(int verbose) >>>>> { >>>>> - int i; >>>>> + char line[80]; >>>>> + int i, ret =3D 0; >>>>> struct fwohci_softc *sc; >>>>> >>>>> for (i =3D 0; i < MAX_OHCI; i ++) { >>>>> sc =3D &fwinfo[i]; >>>>> if (sc->state =3D=3D FWOHCI_STATE_DEAD) >>>>> break; >>>>> - printf("%d: locator=3D0x%04x devid=3D0x%08x" >>>>> + snprintf(line, sizeof(line), "%d: locator=3D0x%04x >>>>> devid=3D0x%08x" >>>>> " base_addr=3D0x%08x handle=3D0x%08x >>>>> bus_id=3D0x%08x\n", >>>>> i, sc->locator, sc->devid, >>>>> sc->base_addr, sc->handle, sc->bus_id); >>>>> + ret =3D pager_output(line); >>>>> + if (ret !=3D 0) >>>>> + break; >>>>> } >>>>> + return (ret); >>>>> } >>>>> >>>>> static int >>>>> >>>>> Modified: head/sys/boot/i386/libi386/bioscd.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/i386/libi386/bioscd.c Tue Nov 8 06:13:22 2016 >>>>> (r308433) >>>>> +++ head/sys/boot/i386/libi386/bioscd.c Tue Nov 8 06:50:18 2016 >>>>> (r308434) >>>>> @@ -100,7 +100,7 @@ static int bc_realstrategy(void *devdata >>>>> size_t offset, size_t size, char *buf, size_t *rsize); >>>>> static int bc_open(struct open_file *f, ...); >>>>> static int bc_close(struct open_file *f); >>>>> -static void bc_print(int verbose); >>>>> +static int bc_print(int verbose); >>>>> >>>>> struct devsw bioscd =3D { >>>>> "cd", >>>>> @@ -177,20 +177,19 @@ bc_add(int biosdev) >>>>> /* >>>>> * Print information about disks >>>>> */ >>>>> -static void >>>>> +static int >>>>> bc_print(int verbose) >>>>> { >>>>> char line[80]; >>>>> - int i; >>>>> + int i, ret =3D 0; >>>>> >>>>> - pager_open(); >>>>> for (i =3D 0; i < nbcinfo; i++) { >>>>> - sprintf(line, " cd%d: Device 0x%x\n", i, >>>>> + snprintf(line, sizeof(line), " cd%d: Device 0x%x\n= ", >>>>> i, >>>>> bcinfo[i].bc_sp.sp_devicespec); >>>>> - if (pager_output(line)) >>>>> + if ((ret =3D pager_output(line)) !=3D 0) >>>>> break; >>>>> } >>>>> - pager_close(); >>>>> + return (ret); >>>>> } >>>>> >>>>> /* >>>>> >>>>> Modified: head/sys/boot/i386/libi386/biosdisk.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/i386/libi386/biosdisk.c Tue Nov 8 06:13:22 2= 016 >>>>> (r308433) >>>>> +++ head/sys/boot/i386/libi386/biosdisk.c Tue Nov 8 06:50:18 2= 016 >>>>> (r308434) >>>>> @@ -135,7 +135,7 @@ static int bd_realstrategy(void *devdata >>>>> static int bd_open(struct open_file *f, ...); >>>>> static int bd_close(struct open_file *f); >>>>> static int bd_ioctl(struct open_file *f, u_long cmd, void *data); >>>>> -static void bd_print(int verbose); >>>>> +static int bd_print(int verbose); >>>>> static void bd_cleanup(void); >>>>> >>>>> #ifdef LOADER_GELI_SUPPORT >>>>> @@ -321,21 +321,21 @@ bd_int13probe(struct bdinfo *bd) >>>>> /* >>>>> * Print information about disks >>>>> */ >>>>> -static void >>>>> +static int >>>>> bd_print(int verbose) >>>>> { >>>>> static char line[80]; >>>>> struct disk_devdesc dev; >>>>> - int i; >>>>> + int i, ret =3D 0; >>>>> >>>>> - pager_open(); >>>>> for (i =3D 0; i < nbdinfo; i++) { >>>>> - sprintf(line, " disk%d: BIOS drive %c (%ju X >>>>> %u):\n", i, >>>>> + snprintf(line, sizeof(line), >>>>> + " disk%d: BIOS drive %c (%ju X %u):\n", i, >>>>> (bdinfo[i].bd_unit < 0x80) ? ('A' + >>>>> bdinfo[i].bd_unit): >>>>> ('C' + bdinfo[i].bd_unit - 0x80), >>>>> (uintmax_t)bdinfo[i].bd_sectors, >>>>> bdinfo[i].bd_sectorsize); >>>>> - if (pager_output(line)) >>>>> + if ((ret =3D pager_output(line)) !=3D 0) >>>>> break; >>>>> dev.d_dev =3D &biosdisk; >>>>> dev.d_unit =3D i; >>>>> @@ -346,12 +346,14 @@ bd_print(int verbose) >>>>> bdinfo[i].bd_sectorsize, >>>>> (bdinfo[i].bd_flags & BD_FLOPPY) ? >>>>> DISK_F_NOCACHE: 0) =3D=3D 0) { >>>>> - sprintf(line, " disk%d", i); >>>>> - disk_print(&dev, line, verbose); >>>>> + snprintf(line, sizeof(line), " disk%d", i)= ; >>>>> + ret =3D disk_print(&dev, line, verbose); >>>>> disk_close(&dev); >>>>> + if (ret !=3D 0) >>>>> + return (ret); >>>>> } >>>>> } >>>>> - pager_close(); >>>>> + return (ret); >>>>> } >>>>> >>>>> /* >>>>> >>>>> Modified: head/sys/boot/i386/libi386/pxe.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/i386/libi386/pxe.c Tue Nov 8 06:13:22 2016 >>>>> (r308433) >>>>> +++ head/sys/boot/i386/libi386/pxe.c Tue Nov 8 06:50:18 2016 >>>>> (r308434) >>>>> @@ -75,7 +75,7 @@ static int pxe_strategy(void *devdata, i >>>>> size_t offset, size_t size, char *buf, >>>>> size_t *rsize); >>>>> static int pxe_open(struct open_file *f, ...); >>>>> static int pxe_close(struct open_file *f); >>>>> -static void pxe_print(int verbose); >>>>> +static int pxe_print(int verbose); >>>>> static void pxe_cleanup(void); >>>>> static void pxe_setnfshandle(char *rootpath); >>>>> >>>>> @@ -381,14 +381,20 @@ pxe_close(struct open_file *f) >>>>> return (0); >>>>> } >>>>> >>>>> -static void >>>>> +static int >>>>> pxe_print(int verbose) >>>>> { >>>>> - >>>>> + char line[255]; >>>>> if (pxe_call =3D=3D NULL) >>>>> - return; >>>>> + return (0); >>>>> >>>>> - printf(" pxe0: %s:%s\n", inet_ntoa(rootip), rootpath); >>>>> + if (verbose) { >>>>> + snprintf(line, sizeof(line), " pxe0: %s:%s\n", >>>>> + inet_ntoa(rootip), rootpath); >>>>> + } else { >>>>> + snprintf(line, sizeof(line), " pxe0:\n"); >>>>> + } >>>>> + return (pager_output(line)); >>>>> } >>>>> >>>>> static void >>>>> >>>>> Modified: head/sys/boot/mips/beri/loader/beri_disk_cfi.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/mips/beri/loader/beri_disk_cfi.c Tue Nov 8 >>>>> 06:13:22 2016 (r308433) >>>>> +++ head/sys/boot/mips/beri/loader/beri_disk_cfi.c Tue Nov 8 >>>>> 06:50:18 2016 (r308434) >>>>> @@ -47,7 +47,7 @@ static int beri_cfi_disk_close(struct op >>>>> static void beri_cfi_disk_cleanup(void); >>>>> static int beri_cfi_disk_strategy(void *, int, daddr_t, size_t, >>>>> size_t, >>>>> char *, size_t *); >>>>> -static void beri_cfi_disk_print(int); >>>>> +static int beri_cfi_disk_print(int); >>>>> >>>>> struct devsw beri_cfi_disk =3D { >>>>> .dv_name =3D "cfi", >>>>> @@ -112,25 +112,29 @@ beri_cfi_disk_close(struct open_file *f) >>>>> return (disk_close(dev)); >>>>> } >>>>> >>>>> -static void >>>>> +static int >>>>> beri_cfi_disk_print(int verbose) >>>>> { >>>>> struct disk_devdesc dev; >>>>> char line[80]; >>>>> + int ret; >>>>> >>>>> - sprintf(line, " cfi%d CFI flash device\n", 0); >>>>> - pager_output(line); >>>>> + snprintf(line, sizeof(line), " cfi%d CFI flash device\n"= , >>>>> 0); >>>>> + ret =3D pager_output(line); >>>>> + if (ret !=3D 0) >>>>> + return (ret); >>>>> dev.d_dev =3D &beri_cfi_disk; >>>>> dev.d_unit =3D 0; >>>>> dev.d_slice =3D -1; >>>>> dev.d_partition =3D -1; >>>>> if (disk_open(&dev, cfi_get_mediasize(), >>>>> cfi_get_sectorsize(), 0) =3D=3D 0) { >>>>> - sprintf(line, " cfi%d", 0); >>>>> - disk_print(&dev, line, verbose); >>>>> + snprintf(line, sizeof(line), " cfi%d", 0); >>>>> + ret =3D disk_print(&dev, line, verbose); >>>>> disk_close(&dev); >>>>> } >>>>> >>>>> + return (ret); >>>>> } >>>>> >>>>> static void >>>>> >>>>> Modified: head/sys/boot/mips/beri/loader/beri_disk_sdcard.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/mips/beri/loader/beri_disk_sdcard.c Tue Nov 8 >>>>> 06:13:22 2016 (r308433) >>>>> +++ head/sys/boot/mips/beri/loader/beri_disk_sdcard.c Tue Nov 8 >>>>> 06:50:18 2016 (r308434) >>>>> @@ -47,7 +47,7 @@ static int beri_sdcard_disk_close(struct >>>>> static void beri_sdcard_disk_cleanup(void); >>>>> static int beri_sdcard_disk_strategy(void *, int, daddr_t, size_t= , >>>>> size_t, >>>>> char *, size_t *); >>>>> -static void beri_sdcard_disk_print(int); >>>>> +static int beri_sdcard_disk_print(int); >>>>> >>>>> struct devsw beri_sdcard_disk =3D { >>>>> .dv_name =3D "sdcard", >>>>> @@ -123,19 +123,23 @@ beri_sdcard_disk_print(int verbose) >>>>> { >>>>> struct disk_devdesc dev; >>>>> char line[80]; >>>>> + int ret; >>>>> >>>>> - sprintf(line, " sdcard%d Altera SD card drive\n", 0); >>>>> - pager_output(line); >>>>> + snprintf(line, sizeof(line), " sdcard%d Altera SD card >>>>> drive\n", 0); >>>>> + ret =3D pager_output(line); >>>>> + if (ret !=3D 0) >>>>> + return (ret); >>>>> dev.d_dev =3D &beri_sdcard_disk; >>>>> dev.d_unit =3D 0; >>>>> dev.d_slice =3D -1; >>>>> dev.d_partition =3D -1; >>>>> if (disk_open(&dev, altera_sdcard_get_mediasize(), >>>>> altera_sdcard_get_sectorsize(), 0) =3D=3D 0) { >>>>> - sprintf(line, " sdcard%d", 0); >>>>> - disk_print(&dev, line, verbose); >>>>> + snprintf(line, sizeof(line), " sdcard%d", 0); >>>>> + ret =3D disk_print(&dev, line, verbose); >>>>> disk_close(&dev); >>>>> } >>>>> + return (ret); >>>>> } >>>>> >>>>> static void >>>>> >>>>> Modified: head/sys/boot/ofw/libofw/ofw_disk.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/ofw/libofw/ofw_disk.c Tue Nov 8 06:13:22 2016 >>>>> (r308433) >>>>> +++ head/sys/boot/ofw/libofw/ofw_disk.c Tue Nov 8 06:50:18 2016 >>>>> (r308434) >>>>> @@ -47,7 +47,7 @@ static int ofwd_strategy(void *devdata, >>>>> static int ofwd_open(struct open_file *f, ...); >>>>> static int ofwd_close(struct open_file *f); >>>>> static int ofwd_ioctl(struct open_file *f, u_long cmd, void *data= ); >>>>> -static void ofwd_print(int verbose); >>>>> +static int ofwd_print(int verbose); >>>>> >>>>> struct devsw ofwdisk =3D { >>>>> "block", >>>>> @@ -161,8 +161,8 @@ ofwd_ioctl(struct open_file *f __unused, >>>>> return (EINVAL); >>>>> } >>>>> >>>>> -static void >>>>> +static int >>>>> ofwd_print(int verbose __unused) >>>>> { >>>>> - >>>>> + return (0); >>>>> } >>>>> >>>>> Modified: head/sys/boot/pc98/libpc98/bioscd.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/pc98/libpc98/bioscd.c Tue Nov 8 06:13:22 2016 >>>>> (r308433) >>>>> +++ head/sys/boot/pc98/libpc98/bioscd.c Tue Nov 8 06:50:18 2016 >>>>> (r308434) >>>>> @@ -99,7 +99,7 @@ static int bc_realstrategy(void *devdata >>>>> size_t offset, size_t size, char *buf, size_t >>>>> *rsize); >>>>> static int bc_open(struct open_file *f, ...); >>>>> static int bc_close(struct open_file *f); >>>>> -static void bc_print(int verbose); >>>>> +static int bc_print(int verbose); >>>>> >>>>> struct devsw bioscd =3D { >>>>> "cd", >>>>> @@ -173,20 +173,19 @@ bc_add(int biosdev) >>>>> /* >>>>> * Print information about disks >>>>> */ >>>>> -static void >>>>> +static int >>>>> bc_print(int verbose) >>>>> { >>>>> char line[80]; >>>>> - int i; >>>>> + int i, ret =3D 0; >>>>> >>>>> - pager_open(); >>>>> for (i =3D 0; i < nbcinfo; i++) { >>>>> sprintf(line, " cd%d: Device 0x%x\n", i, >>>>> bcinfo[i].bc_sp.sp_devicespec); >>>>> - if (pager_output(line)) >>>>> + if ((ret =3D pager_output(line)) !=3D 0) >>>>> break; >>>>> } >>>>> - pager_close(); >>>>> + return (ret); >>>>> } >>>>> >>>>> /* >>>>> >>>>> Modified: head/sys/boot/pc98/libpc98/biosdisk.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/pc98/libpc98/biosdisk.c Tue Nov 8 06:13:22 2= 016 >>>>> (r308433) >>>>> +++ head/sys/boot/pc98/libpc98/biosdisk.c Tue Nov 8 06:50:18 2= 016 >>>>> (r308434) >>>>> @@ -123,7 +123,7 @@ static int bd_realstrategy(void *devdata >>>>> size_t offset, size_t size, char *buf, size_t >>>>> *rsize); >>>>> static int bd_open(struct open_file *f, ...); >>>>> static int bd_close(struct open_file *f); >>>>> -static void bd_print(int verbose); >>>>> +static int bd_print(int verbose); >>>>> >>>>> struct devsw biosdisk =3D { >>>>> "disk", >>>>> @@ -249,21 +249,20 @@ bd_int13probe(struct bdinfo *bd) >>>>> /* >>>>> * Print information about disks >>>>> */ >>>>> -static void >>>>> +static int >>>>> bd_print(int verbose) >>>>> { >>>>> - int i, j, done; >>>>> + int i, j, ret =3D 0; >>>>> char line[80]; >>>>> struct i386_devdesc dev; >>>>> struct open_disk *od; >>>>> struct pc98_partition *dptr; >>>>> >>>>> - pager_open(); >>>>> - done =3D 0; >>>>> - for (i =3D 0; i < nbdinfo && !done; i++) { >>>>> - sprintf(line, " disk%d: BIOS drive %c:\n", i, 'A' + i); >>>>> - if (pager_output(line)) >>>>> - break; >>>>> + for (i =3D 0; i < nbdinfo; i++) { >>>>> + snprintf(line, sizeof(line), " disk%d: BIOS drive %c:\n"= , >>>>> + i, 'A' + i); >>>>> + if ((ret =3D pager_output(line)) !=3D 0) >>>>> + break; >>>>> >>>>> /* try to open the whole disk */ >>>>> dev.d_unit =3D i; >>>>> @@ -278,17 +277,17 @@ bd_print(int verbose) >>>>> >>>>> /* Check for a "dedicated" disk */ >>>>> for (j =3D 0; j < od->od_nslices; j++) { >>>>> - sprintf(line, " disk%ds%d", i, j + 1); >>>>> - if (bd_printslice(od, &dptr[j], line, verbose)) { >>>>> - done =3D 1; >>>>> - break; >>>>> - } >>>>> + snprintf(line, sizeof(line), " disk%ds%d", i= , j >>>>> + 1); >>>>> + if ((ret =3D bd_printslice(od, &dptr[j], line, >>>>> verbose)) !=3D 0) >>>>> + break; >>>>> } >>>>> } >>>>> bd_closedisk(od); >>>>> + if (ret !=3D 0) >>>>> + break; >>>>> } >>>>> } >>>>> - pager_close(); >>>>> + return (ret); >>>>> } >>>>> >>>>> /* Given a size in 512 byte sectors, convert it to a human-readable >>>>> number. */ >>>>> >>>>> Modified: head/sys/boot/powerpc/kboot/hostdisk.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/powerpc/kboot/hostdisk.c Tue Nov 8 06:13:22 2= 016 >>>>> (r308433) >>>>> +++ head/sys/boot/powerpc/kboot/hostdisk.c Tue Nov 8 06:50:18 2= 016 >>>>> (r308434) >>>>> @@ -37,7 +37,7 @@ static int hostdisk_strategy(void *devda >>>>> static int hostdisk_open(struct open_file *f, ...); >>>>> static int hostdisk_close(struct open_file *f); >>>>> static int hostdisk_ioctl(struct open_file *f, u_long cmd, void *data= ); >>>>> -static void hostdisk_print(int verbose); >>>>> +static int hostdisk_print(int verbose); >>>>> >>>>> struct devsw hostdisk =3D { >>>>> "/dev", >>>>> @@ -117,9 +117,9 @@ hostdisk_ioctl(struct open_file *f, u_lo >>>>> return (EINVAL); >>>>> } >>>>> >>>>> -static void >>>>> +static int >>>>> hostdisk_print(int verbose) >>>>> { >>>>> - >>>>> + return (0); >>>>> } >>>>> >>>>> >>>>> Modified: head/sys/boot/powerpc/ps3/ps3cdrom.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/powerpc/ps3/ps3cdrom.c Tue Nov 8 06:13:22 2= 016 >>>>> (r308433) >>>>> +++ head/sys/boot/powerpc/ps3/ps3cdrom.c Tue Nov 8 06:50:18 2= 016 >>>>> (r308434) >>>>> @@ -49,7 +49,7 @@ static int ps3cdrom_strategy(void *devda >>>>> size_t offset, size_t size, char *buf, size_t *rsize); >>>>> static int ps3cdrom_open(struct open_file *f, ...); >>>>> static int ps3cdrom_close(struct open_file *f); >>>>> -static void ps3cdrom_print(int verbose); >>>>> +static int ps3cdrom_print(int verbose); >>>>> >>>>> struct devsw ps3cdrom =3D { >>>>> "cd", >>>>> @@ -149,6 +149,7 @@ static int ps3cdrom_close(struct open_fi >>>>> return 0; >>>>> } >>>>> >>>>> -static void ps3cdrom_print(int verbose) >>>>> +static int ps3cdrom_print(int verbose) >>>>> { >>>>> + return (0); >>>>> } >>>>> >>>>> Modified: head/sys/boot/powerpc/ps3/ps3disk.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/powerpc/ps3/ps3disk.c Tue Nov 8 06:13:22 2016 >>>>> (r308433) >>>>> +++ head/sys/boot/powerpc/ps3/ps3disk.c Tue Nov 8 06:50:18 2016 >>>>> (r308434) >>>>> @@ -61,7 +61,7 @@ static int ps3disk_strategy(void *devdat >>>>> size_t offset, size_t size, char *buf, size_t *rsize); >>>>> static int ps3disk_open(struct open_file *f, ...); >>>>> static int ps3disk_close(struct open_file *f); >>>>> -static void ps3disk_print(int verbose); >>>>> +static int ps3disk_print(int verbose); >>>>> >>>>> struct devsw ps3disk =3D { >>>>> "disk", >>>>> @@ -186,8 +186,9 @@ static int ps3disk_close(struct open_fil >>>>> return 0; >>>>> } >>>>> >>>>> -static void ps3disk_print(int verbose) >>>>> +static int ps3disk_print(int verbose) >>>>> { >>>>> + return (0); >>>>> } >>>>> >>>>> static int ps3disk_open_gpt(struct ps3_devdesc *dev, struct open_dev >>>>> *od) >>>>> >>>>> Modified: head/sys/boot/uboot/lib/disk.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/uboot/lib/disk.c Tue Nov 8 06:13:22 2016 >>>>> (r308433) >>>>> +++ head/sys/boot/uboot/lib/disk.c Tue Nov 8 06:50:18 2016 >>>>> (r308434) >>>>> @@ -78,7 +78,7 @@ static int stor_strategy(void *, int, da >>>>> static int stor_open(struct open_file *, ...); >>>>> static int stor_close(struct open_file *); >>>>> static int stor_ioctl(struct open_file *f, u_long cmd, void *data); >>>>> -static void stor_print(int); >>>>> +static int stor_print(int); >>>>> static void stor_cleanup(void); >>>>> >>>>> struct devsw uboot_storage =3D { >>>>> @@ -238,30 +238,31 @@ stor_readdev(struct disk_devdesc *dev, d >>>>> return (err); >>>>> } >>>>> >>>>> -static void >>>>> +static int >>>>> stor_print(int verbose) >>>>> { >>>>> struct disk_devdesc dev; >>>>> static char line[80]; >>>>> - int i; >>>>> + int i, ret =3D 0; >>>>> >>>>> - pager_open(); >>>>> for (i =3D 0; i < stor_info_no; i++) { >>>>> dev.d_dev =3D &uboot_storage; >>>>> dev.d_unit =3D i; >>>>> dev.d_slice =3D -1; >>>>> dev.d_partition =3D -1; >>>>> - sprintf(line, "\tdisk%d (%s)\n", i, >>>>> + snprintf(line, sizeof(line), "\tdisk%d (%s)\n", i, >>>>> ub_stor_type(SI(&dev).type)); >>>>> - if (pager_output(line)) >>>>> + if ((ret =3D pager_output(line)) !=3D 0) >>>>> break; >>>>> if (stor_opendev(&dev) =3D=3D 0) { >>>>> sprintf(line, "\tdisk%d", i); >>>>> - disk_print(&dev, line, verbose); >>>>> + ret =3D disk_print(&dev, line, verbose); >>>>> disk_close(&dev); >>>>> + if (ret !=3D 0) >>>>> + break; >>>>> } >>>>> } >>>>> - pager_close(); >>>>> + return (ret); >>>>> } >>>>> >>>>> static int >>>>> >>>>> Modified: head/sys/boot/usb/storage/umass_loader.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/usb/storage/umass_loader.c Tue Nov 8 06:13:22 2= 016 >>>>> (r308433) >>>>> +++ head/sys/boot/usb/storage/umass_loader.c Tue Nov 8 06:50:18 2= 016 >>>>> (r308434) >>>>> @@ -50,7 +50,7 @@ static void umass_disk_cleanup(void); >>>>> static int umass_disk_ioctl(struct open_file *, u_long, void *); >>>>> static int umass_disk_strategy(void *, int, daddr_t, size_t, size_t, >>>>> char *, >>>>> size_t *); >>>>> -static void umass_disk_print(int); >>>>> +static int umass_disk_print(int); >>>>> >>>>> struct devsw umass_disk =3D { >>>>> .dv_name =3D "umass", >>>>> @@ -170,23 +170,26 @@ umass_disk_close(struct open_file *f) >>>>> return (disk_close(dev)); >>>>> } >>>>> >>>>> -static void >>>>> +static int >>>>> umass_disk_print(int verbose) >>>>> { >>>>> struct disk_devdesc dev; >>>>> >>>>> memset(&dev, 0, sizeof(dev)); >>>>> >>>>> - pager_output(" umass0 UMASS device\n"); >>>>> + ret =3D pager_output(" umass0 UMASS device\n"); >>>>> + if (ret !=3D 0) >>>>> + return (ret); >>>>> dev.d_dev =3D &umass_disk; >>>>> dev.d_unit =3D 0; >>>>> dev.d_slice =3D -1; >>>>> dev.d_partition =3D -1; >>>>> >>>>> if (umass_disk_open_sub(&dev) =3D=3D 0) { >>>>> - disk_print(&dev, " umass0", verbose); >>>>> + ret =3D disk_print(&dev, " umass0", verbose); >>>>> disk_close(&dev); >>>>> } >>>>> + return (ret); >>>>> } >>>>> >>>>> static void >>>>> >>>>> Modified: head/sys/boot/userboot/userboot/host.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/userboot/userboot/host.c Tue Nov 8 06:13:22 2= 016 >>>>> (r308433) >>>>> +++ head/sys/boot/userboot/userboot/host.c Tue Nov 8 06:50:18 2= 016 >>>>> (r308434) >>>>> @@ -134,13 +134,13 @@ host_dev_init(void) >>>>> return (0); >>>>> } >>>>> >>>>> -static void >>>>> +static int >>>>> host_dev_print(int verbose) >>>>> { >>>>> char line[80]; >>>>> >>>>> - sprintf(line, " host%d: Host filesystem\n", 0); >>>>> - pager_output(line); >>>>> + snprintf(line, sizeof(line), " host%d: Host filesystem\n= ", >>>>> 0); >>>>> + return (pager_output(line)); >>>>> } >>>>> >>>>> /* >>>>> >>>>> Modified: head/sys/boot/userboot/userboot/userboot_disk.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/userboot/userboot/userboot_disk.c Tue Nov 8 >>>>> 06:13:22 2016 (r308433) >>>>> +++ head/sys/boot/userboot/userboot/userboot_disk.c Tue Nov 8 >>>>> 06:50:18 2016 (r308434) >>>>> @@ -60,7 +60,7 @@ static int userdisk_realstrategy(void *d >>>>> static int userdisk_open(struct open_file *f, ...); >>>>> static int userdisk_close(struct open_file *f); >>>>> static int userdisk_ioctl(struct open_file *f, u_long cmd, void >>>>> *data); >>>>> -static void userdisk_print(int verbose); >>>>> +static int userdisk_print(int verbose); >>>>> >>>>> struct devsw userboot_disk =3D { >>>>> "disk", >>>>> @@ -116,27 +116,33 @@ userdisk_cleanup(void) >>>>> /* >>>>> * Print information about disks >>>>> */ >>>>> -static void >>>>> +static int >>>>> userdisk_print(int verbose) >>>>> { >>>>> struct disk_devdesc dev; >>>>> char line[80]; >>>>> - int i; >>>>> + int i, ret =3D 0; >>>>> >>>>> for (i =3D 0; i < userdisk_maxunit; i++) { >>>>> - sprintf(line, " disk%d: Guest drive image\n", i)= ; >>>>> - pager_output(line); >>>>> + snprintf(line, sizeof(line), >>>>> + " disk%d: Guest drive image\n", i); >>>>> + ret =3D pager_output(line); >>>>> + if (ret !=3D 0) >>>>> + break; >>>>> dev.d_dev =3D &userboot_disk; >>>>> dev.d_unit =3D i; >>>>> dev.d_slice =3D -1; >>>>> dev.d_partition =3D -1; >>>>> if (disk_open(&dev, ud_info[i].mediasize, >>>>> ud_info[i].sectorsize, 0) =3D=3D 0) { >>>>> - sprintf(line, " disk%d", i); >>>>> - disk_print(&dev, line, verbose); >>>>> + snprintf(line, sizeof(line), " disk%d", i)= ; >>>>> + ret =3D disk_print(&dev, line, verbose); >>>>> disk_close(&dev); >>>>> + if (ret !=3D 0) >>>>> + break; >>>>> } >>>>> } >>>>> + return (ret); >>>>> } >>>>> >>>>> /* >>>>> >>>>> Modified: head/sys/boot/zfs/zfs.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/zfs/zfs.c Tue Nov 8 06:13:22 2016 (r308= 433) >>>>> +++ head/sys/boot/zfs/zfs.c Tue Nov 8 06:50:18 2016 (r308= 434) >>>>> @@ -514,20 +514,23 @@ zfs_probe_dev(const char *devname, uint6 >>>>> /* >>>>> * Print information about ZFS pools >>>>> */ >>>>> -static void >>>>> +static int >>>>> zfs_dev_print(int verbose) >>>>> { >>>>> spa_t *spa; >>>>> char line[80]; >>>>> + int ret =3D 0; >>>>> >>>>> if (verbose) { >>>>> - spa_all_status(); >>>>> - return; >>>>> + return (spa_all_status()); >>>>> } >>>>> STAILQ_FOREACH(spa, &zfs_pools, spa_link) { >>>>> - sprintf(line, " zfs:%s\n", spa->spa_name); >>>>> - pager_output(line); >>>>> + snprintf(line, sizeof(line), " zfs:%s\n", >>>>> spa->spa_name); >>>>> + ret =3D pager_output(line); >>>>> + if (ret !=3D 0) >>>>> + break; >>>>> } >>>>> + return (ret); >>>>> } >>>>> >>>>> /* >>>>> >>>>> Modified: head/sys/boot/zfs/zfsimpl.c >>>>> >>>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D >>>>> --- head/sys/boot/zfs/zfsimpl.c Tue Nov 8 06:13:22 2016 (r308= 433) >>>>> +++ head/sys/boot/zfs/zfsimpl.c Tue Nov 8 06:50:18 2016 (r308= 434) >>>>> @@ -780,7 +780,7 @@ state_name(vdev_state_t state) >>>>> >>>>> #else >>>>> >>>>> -static void >>>>> +static int >>>>> pager_printf(const char *fmt, ...) >>>>> { >>>>> char line[80]; >>>>> @@ -789,14 +789,14 @@ pager_printf(const char *fmt, ...) >>>>> va_start(args, fmt); >>>>> vsprintf(line, fmt, args); >>>>> va_end(args); >>>>> - pager_output(line); >>>>> + return (pager_output(line)); >>>>> } >>>>> >>>>> #endif >>>>> >>>>> #define STATUS_FORMAT " %s %s\n" >>>>> >>>>> -static void >>>>> +static int >>>>> print_state(int indent, const char *name, vdev_state_t state) >>>>> { >>>>> int i; >>>>> @@ -806,40 +806,56 @@ print_state(int indent, const char *name >>>>> for (i =3D 0; i < indent; i++) >>>>> strcat(buf, " "); >>>>> strcat(buf, name); >>>>> >>>>> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >>>>> _______________________________________________ >>>>> svn-src-head@freebsd.org mailing list >>>>> https://lists.freebsd.org/mailman/listinfo/svn-src-head >>>>> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.or= g" >>>> >>>> >>>> >>> >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfo3KA64KZiMd-z-oa=1wsY=CwPNSHCYDgZpG4tv1M9odw>