svn commit: r284413 - stable/10/share/examples/bhyve
Author: avg Date: Mon Jun 15 13:01:42 2015 New Revision: 284413 URL: https://svnweb.freebsd.org/changeset/base/284413 Log: MFC r284023: bhyve/vmrun.sh: support passing disk options same as for bhyve(8) Modified: stable/10/share/examples/bhyve/vmrun.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/bhyve/vmrun.sh == --- stable/10/share/examples/bhyve/vmrun.sh Mon Jun 15 12:50:43 2015 (r284412) +++ stable/10/share/examples/bhyve/vmrun.sh Mon Jun 15 13:01:42 2015 (r284413) @@ -96,7 +96,10 @@ while getopts ac:C:d:e:g:hH:iI:m:t: c ; console=${OPTARG} ;; d) - eval disk_dev${disk_total}=\${OPTARG}\ + disk_dev=${OPTARG%%,*} + disk_opts=${OPTARG#${disk_dev}} + eval disk_dev${disk_total}=\${disk_dev}\ + eval disk_opts${disk_total}=\${disk_opts}\ disk_total=$(($disk_total + 1)) ;; e) @@ -225,8 +228,9 @@ while [ 1 ]; do i=0 while [ $i -lt $disk_total ] ; do eval disk=\$disk_dev${i} + eval opts=\$disk_opts${i} make_and_check_diskdev ${disk} - devargs=$devargs -s $nextslot:0,virtio-blk,${disk} + devargs=$devargs -s $nextslot:0,virtio-blk,${disk}${opts} nextslot=$(($nextslot + 1)) i=$(($i + 1)) done ___ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org
svn commit: r284414 - stable/10/share/examples/bhyve
Author: avg Date: Mon Jun 15 13:18:30 2015 New Revision: 284414 URL: https://svnweb.freebsd.org/changeset/base/284414 Log: MFC r284024: bhyve/vmrun.sh: pass all existing readable disks to bhyveload(8) Modified: stable/10/share/examples/bhyve/vmrun.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/share/examples/bhyve/vmrun.sh == --- stable/10/share/examples/bhyve/vmrun.sh Mon Jun 15 13:01:42 2015 (r284413) +++ stable/10/share/examples/bhyve/vmrun.sh Mon Jun 15 13:18:30 2015 (r284414) @@ -174,16 +174,16 @@ make_and_check_diskdev() echo Launching virtual machine \$vmname\ ... -virtio_diskdev=$disk_dev0 +first_diskdev=$disk_dev0 ${BHYVECTL} --vm=${vmname} --destroy /dev/null 21 while [ 1 ]; do - file -s ${virtio_diskdev} | grep boot sector /dev/null + file -s ${first_diskdev} | grep boot sector /dev/null rc=$? if [ $rc -ne 0 ]; then - file -s ${virtio_diskdev} | grep : Unix Fast File sys /dev/null + file -s ${first_diskdev} | grep : Unix Fast File sys /dev/null rc=$? fi if [ $rc -ne 0 ]; then @@ -198,14 +198,22 @@ while [ 1 ]; do echois not readable exit 1 fi - BOOTDISK=${isofile} - installer_opt=-s 31:0,ahci-cd,${BOOTDISK} + BOOTDISKS=-d ${isofile} + installer_opt=-s 31:0,ahci-cd,${isofile} else - BOOTDISK=${virtio_diskdev} + BOOTDISKS= + i=0 + while [ $i -lt $disk_total ] ; do + eval disk=\$disk_dev${i} + if [ -r ${disk} ] ; then + BOOTDISKS=$BOOTDISKS -d ${disk} + fi + i=$(($i + 1)) + done installer_opt= fi - ${LOADER} -c ${console} -m ${memsize} -d ${BOOTDISK} ${loader_opt} \ + ${LOADER} -c ${console} -m ${memsize} ${BOOTDISKS} ${loader_opt} \ ${vmname} bhyve_exit=$? if [ $bhyve_exit -ne 0 ]; then ___ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org
svn commit: r284435 - in stable/10: lib/libsbuf lib/libutil sbin/camcontrol share/man/man9 sys/cam sys/cam/scsi sys/kern sys/sys
Author: ken Date: Tue Jun 16 02:31:11 2015 New Revision: 284435 URL: https://svnweb.freebsd.org/changeset/base/284435 Log: MFC, r284192: r284192 | ken | 2015-06-09 15:39:38 -0600 (Tue, 09 Jun 2015) | 102 lines Add support for reading MAM attributes to camcontrol(8) and libcam(3). MAM is Medium Auxiliary Memory and is most commonly found as flash chips on tapes. This includes support for reading attributes and decoding most known attributes, but does not yet include support for writing attributes or reporting attributes in XML format. libsbuf/Makefile: Add subr_prf.c for the new sbuf_hexdump() function. This function is essentially the same function. libsbuf/Symbol.map: Add a new shared library minor version, and include the sbuf_hexdump() function. libsbuf/Version.def: Add version 1.4 of the libsbuf library. libutil/hexdump.3: Document sbuf_hexdump() alongside hexdump(3), since it is essentially the same function. camcontrol/Makefile: Add attrib.c. camcontrol/attrib.c: Implementation of READ ATTRIBUTE support for camcontrol(8). camcontrol/camcontrol.8: Document the new 'camcontrol attrib' subcommand. camcontrol/camcontrol.c: Add the new 'camcontrol attrib' subcommand. camcontrol/camcontrol.h: Add a function prototype for scsiattrib(). share/man/man9/sbuf.9: Document the existence of sbuf_hexdump() and point users to the hexdump(3) man page for more details. sys/cam/scsi/scsi_all.c: Add a table of known attributes, text descriptions and handler functions. Add a new scsi_attrib_sbuf() function along with a number of other related functions that help decode attributes. scsi_attrib_ascii_sbuf() decodes ASCII format attributes. scsi_attrib_int_sbuf() decodes binary format attributes, and will pass them off to scsi_attrib_hexdump_sbuf() if they're bigger than 8 bytes. scsi_attrib_vendser_sbuf() decodes the vendor and drive serial number attribute. scsi_attrib_volcoh_sbuf() decodes the Volume Coherency Information attribute that LTFS writes out. sys/cam/scsi/scsi_all.h: Add a number of attribute-related structure definitions and other defines. Add function prototypes for all of the functions added in scsi_all.c. sys/kern/subr_prf.c: Add a new function, sbuf_hexdump(). This is the same as the existing hexdump(9) function, except that it puts the result in an sbuf. This also changes subr_prf.c so that it can be compiled in userland for includsion in libsbuf. We should work to change this so that the kernel hexdump implementation is a wrapper around sbuf_hexdump() with a statically allocated sbuf with a drain. That will require a drain function that goes to the kernel printf() buffer that can take a non-NUL terminated string as input. That is because an sbuf isn't NUL-terminated until it is finished, and we don't want to finish it while we're still using it. We should also work to consolidate the userland hexdump and kernel hexdump implemenatations, which are currently separate. This would also mean making applications that currently link in libutil link in libsbuf. sys/sys/sbuf.h: Add the prototype for sbuf_hexdump(), and add another copy of the hexdump flag values if they aren't already defined. Ideally the flags should be defined in one place but the implemenation makes it difficult to do properly. (See above.) Sponsored by: Spectra Logic Corporation Added: stable/10/sbin/camcontrol/attrib.c - copied unchanged from r284192, head/sbin/camcontrol/attrib.c Modified: stable/10/lib/libsbuf/Makefile stable/10/lib/libsbuf/Symbol.map stable/10/lib/libsbuf/Version.def stable/10/lib/libutil/hexdump.3 stable/10/sbin/camcontrol/Makefile stable/10/sbin/camcontrol/camcontrol.8 stable/10/sbin/camcontrol/camcontrol.c stable/10/sbin/camcontrol/camcontrol.h stable/10/share/man/man9/sbuf.9 stable/10/sys/cam/cam.c stable/10/sys/cam/cam.h stable/10/sys/cam/scsi/scsi_all.c stable/10/sys/cam/scsi/scsi_all.h stable/10/sys/kern/subr_prf.c stable/10/sys/sys/sbuf.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libsbuf/Makefile == --- stable/10/lib/libsbuf/Makefile Mon Jun 15 23:30:54 2015 (r284434) +++ stable/10/lib/libsbuf/Makefile
svn commit: r284418 - in stable/10/sys: fs/procfs kern
Author: delphij Date: Mon Jun 15 18:16:23 2015 New Revision: 284418 URL: https://svnweb.freebsd.org/changeset/base/284418 Log: MFC r283889,r283891: Clear p_stops when doing PT_DETACH and PROCFS_CTL_DETACH. Without this, if a process was being traced by truss(1), which uses different p_stops bits than gdb(1), the latter would misbehave because of the unexpected bits. Reported by: jceel Submitted by: sef Sponsored by: iXsystems, Inc. Modified: stable/10/sys/fs/procfs/procfs_ctl.c stable/10/sys/kern/sys_process.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/procfs/procfs_ctl.c == --- stable/10/sys/fs/procfs/procfs_ctl.cMon Jun 15 15:34:20 2015 (r284417) +++ stable/10/sys/fs/procfs/procfs_ctl.cMon Jun 15 18:16:23 2015 (r284418) @@ -235,6 +235,7 @@ out: } else PROC_LOCK(p); p-p_oppid = 0; + p-p_stops = 0; p-p_flag = ~P_WAITED; /* XXX ? */ sx_xunlock(proctree_lock); Modified: stable/10/sys/kern/sys_process.c == --- stable/10/sys/kern/sys_process.cMon Jun 15 15:34:20 2015 (r284417) +++ stable/10/sys/kern/sys_process.cMon Jun 15 18:16:23 2015 (r284418) @@ -963,6 +963,7 @@ kern_ptrace(struct thread *td, int req, CTR1(KTR_PTRACE, PT_DETACH: pid %d, p-p_pid); p-p_oppid = 0; p-p_flag = ~(P_TRACED | P_WAITED | P_FOLLOWFORK); + p-p_stops = 0; /* should we send SIGCHLD? */ /* childproc_continued(p); */ ___ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org
svn commit: r284429 - stable/10/sys/dev/mfi
Author: ambrisko Date: Mon Jun 15 21:08:08 2015 New Revision: 284429 URL: https://svnweb.freebsd.org/changeset/base/284429 Log: MFC r284180: Switch from make_dev_alias to make_dev_alias_p since make_dev_alias_p can gracefully fail if the /dev/megaraid_sas_ioctl_node symlink already exists. Modified: stable/10/sys/dev/mfi/mfi.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/mfi/mfi.c == --- stable/10/sys/dev/mfi/mfi.c Mon Jun 15 20:47:26 2015(r284428) +++ stable/10/sys/dev/mfi/mfi.c Mon Jun 15 21:08:08 2015(r284429) @@ -375,6 +375,7 @@ mfi_attach(struct mfi_softc *sc) int error, commsz, framessz, sensesz; int frames, unit, max_fw_sge, max_fw_cmds; uint32_t tb_mem_size = 0; + struct cdev *dev_t; if (sc == NULL) return EINVAL; @@ -769,7 +770,8 @@ mfi_attach(struct mfi_softc *sc) sc-mfi_cdev = make_dev(mfi_cdevsw, unit, UID_ROOT, GID_OPERATOR, 0640, mfi%d, unit); if (unit == 0) - make_dev_alias(sc-mfi_cdev, megaraid_sas_ioctl_node); + make_dev_alias_p(MAKEDEV_CHECKNAME | MAKEDEV_WAITOK, dev_t, + sc-mfi_cdev, %s, megaraid_sas_ioctl_node); if (sc-mfi_cdev != NULL) sc-mfi_cdev-si_drv1 = sc; SYSCTL_ADD_INT(device_get_sysctl_ctx(sc-mfi_dev), ___ svn-src-stable-10@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-10 To unsubscribe, send any mail to svn-src-stable-10-unsubscr...@freebsd.org