summaryrefslogtreecommitdiffstats
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* Add __unused. Ansi prototypes.charnier2010-12-191-66/+34
|
* The 'ret' variable is of type ssize_t and we use proper format for it (%zd), sopjd2010-12-161-3/+2
| | | | | | no (bogus) cast is needed. MFC after: 3 days
* Revert r216473.obrien2010-12-161-1/+1
| | | | | WARNS=6 causes "warning: cast increases required alignment of target type" on arm, ia64, mips, and sparc64.
* Improve problems logging.pjd2010-12-161-7/+34
| | | | MFC after: 3 days
* Don't ignore errors from remote requests.pjd2010-12-161-1/+1
| | | | MFC after: 3 days
* Log the fact of launching and include protocol version number.pjd2010-12-161-0/+3
| | | | MFC after: 3 days
* Bump WARNS to 6.obrien2010-12-161-1/+1
|
* GEOM virstor .so does not need libmd.obrien2010-12-161-3/+0
|
* Rename the generic "CLASS" to the more specific "GEOM_CLASS".obrien2010-12-154-4/+3
| | | | | | While I'm here remove redundancy and inconsistencies. Obtained from: Juniper Networks
* Rename the generic "CLASS" to the more specific "GEOM_CLASS".obrien2010-12-1516-32/+26
| | | | | | While I'm here remove redundancy and inconsistencies. Obtained from: Juniper Networks
* Add the missed 'p' flag to getopt() optstring argument.kib2010-12-151-1/+1
| | | | MFC after: 1 week
* Remove the advertising clause from UCB copyrighted files in sbin. Thisjoel2010-12-124-16/+0
| | | | | is in accordance with the information at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
* Fix a few issues related to the XPT_GDEV_ADVINFO CCB.ken2010-12-101-12/+34
| | | | | | | | | | | | | | | | | | | | | | | | camcontrol.c: In buildbusdevlist(), don't attempt to get call getdevid() for an unconfigured device, even when the verbose flag is set. The cam_open_btl() call will almost certainly fail. Probe for the buffer size when issuing the XPT_GDEV_ADVINFO CCB. Probing for the buffer size first helps us avoid allocating the maximum buffer size when it really may not be necessary. This also helps avoid errors from cam_periph_mapmem() if we attempt to map more than MAXPHYS. cam_periph.c: In cam_periph_mapmem(), if the XPT_GDEV_ADVINFO CCB shows a bufsiz of 0, we don't have anything to map, so just return. Also, set the maximum mapping size to MAXPHYS instead of DFLTPHYS for XPT_GDEV_ADVINFO CCBs, since they don't actually go down to the hardware. scsi_pass.c: Don't bother mapping the buffer in XPT_GDEV_ADVINFO CCBs if bufsiz is 0.
* - Fix array bounds checking. [1]glebius2010-12-081-15/+44
| | | | | | | | - Add message length checking. PR: 151664 [1] Submitted by: Alexey Illarionov <littlesavage rambler.ru> [1] Reviewed by: yar
* Add RTM_IEEE80211 to array of route message descriptions.glebius2010-12-081-0/+1
| | | | | PR: 151664 Submitted by: Alexey Illarionov <littlesavage rambler.ru>
* Introduces IFF_CANTCONFIG interface flag to point that the interfaceweongyo2010-12-071-2/+2
| | | | | | | | | isn't configurable in a meaningful way. This is for ifconfig(8) or other tools not to change code whenever IFT_USB-like interfaces are registered at the interface list. Reviewed by: brooks No objections: gavin, jkim
* Move most of the remaining USD/PSD/SMM papers into share/docuqs2010-12-046-2367/+0
|
* * Recommend a overwrite of whole geli provider before use.delphij2010-12-031-2/+6
| | | | | | | * Correct a typo while I'm there. Reviewed by: pjd MFC after: 2 weeks
* Closing file descriptors when it's donekevlo2010-12-011-0/+2
|
* Don't print usbus[0-9] interfaces that it's not the interestingweongyo2010-12-011-0/+2
| | | | interface type for ifconfig(8).
* Add Serial Management Protocol (SMP) passthrough support to CAM.ken2010-11-302-12/+1538
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes support in the kernel, camcontrol(8), libcam and the mps(4) driver for SMP passthrough. The CAM SCSI probe code has been modified to fetch Inquiry VPD page 0x00 to determine supported pages, and will now fetch page 0x83 in addition to page 0x80 if supported. Add two new CAM CCBs, XPT_SMP_IO, and XPT_GDEV_ADVINFO. The SMP CCB is intended for SMP requests and responses. The ADVINFO is currently used to fetch cached VPD page 0x83 data from the transport layer, but is intended to be extensible to fetch other types of device-specific data. SMP-only devices are not currently represented in the CAM topology, and so the current semantics are that the SIM will route SMP CCBs to either the addressed device, if it contains an SMP target, or its parent, if it contains an SMP target. (This is noted in cam_ccb.h, since it will change later once we have the ability to have SMP-only devices in CAM's topology.) smp_all.c, smp_all.h: New helper routines for SMP. This includes SMP request building routines, response parsing routines, error decoding routines, and structure definitions for a number of SMP commands. libcam/Makefile: Add smp_all.c to libcam, so that SMP functionality is available to userland applications. camcontrol.8, camcontrol.c: Add smp passthrough support to camcontrol. Several new subcommands are now available: 'smpcmd' functions much like 'cmd', except that it allows the user to send generic SMP commands. 'smprg' sends the SMP report general command, and displays the decoded output. It will automatically fetch extended output if it is available. 'smppc' sends the SMP phy control command, with any number of potential options. Among other things, this allows the user to reset a phy on a SAS expander, or disable a phy on an expander. 'smpmaninfo' sends the SMP report manufacturer information and displays the decoded output. 'smpphylist' displays a list of phys on an expander, and the CAM devices attached to those phys, if any. cam.h, cam.c: Add a status value for SMP errors (CAM_SMP_STATUS_ERROR). Add a missing description for CAM_SCSI_IT_NEXUS_LOST. Add support for SMP commands to cam_error_string(). cam_ccb.h: Rename the CAM_DIR_RESV flag to CAM_DIR_BOTH. SMP commands are by nature bi-directional, and we may need to support bi-directional SCSI commands later. Add the XPT_SMP_IO CCB. Since SMP commands are bi-directional, there are pointers for both the request and response. Add a fill routine for SMP CCBs. Add the XPT_GDEV_ADVINFO CCB. This is currently used to fetch cached page 0x83 data from the transport later, but is extensible to fetch many other types of data. cam_periph.c: Add support in cam_periph_mapmem() for XPT_SMP_IO and XPT_GDEV_ADVINFO CCBs. cam_xpt.c: Add support for executing XPT_SMP_IO CCBs. cam_xpt_internal.h: Add fields for VPD pages 0x00 and 0x83 in struct cam_ed. scsi_all.c: Add scsi_get_sas_addr(), a function that parses VPD page 0x83 data and pulls out a SAS address. scsi_all.h: Add VPD page 0x00 and 0x83 structures, and a prototype for scsi_get_sas_addr(). scsi_pass.c: Add support for mapping buffers in XPT_SMP_IO and XPT_GDEV_ADVINFO CCBs. scsi_xpt.c: In the SCSI probe code, first ask the device for VPD page 0x00. If any VPD pages are supported, that page is required to be implemented. Based on the response, we may probe for the serial number (page 0x80) or device id (page 0x83). Add support for the XPT_GDEV_ADVINFO CCB. sys/conf/files: Add smp_all.c. mps.c: Add support for passing in a uio in mps_map_command(), so we can map a S/G list at once. Add support for SMP passthrough commands in mps_data_cb(). SMP is a special case, because the first buffer in the S/G list is outbound and the second buffer is inbound. Add support for warning the user if the busdma code comes back with more buffers than will work for the command. This will, for example, help the user determine why an SMP command failed if busdma comes back with three buffers. mps_pci.c: Add sys/uio.h. mps_sas.c: Add the SAS address and the parent handle to the list of fields we pull from device page 0 and cache in struct mpssas_target. These are needed for SMP passthrough. Add support for the XPT_SMP_IO CCB. For now, this CCB is routed to the addressed device if it supports SMP, or to its parent if it does not and the parent does. This is necessary because CAM does not currently support SMP-only nodes in the topology. Make SMP passthrough support conditional on __FreeBSD_version >= 900026. This will make it easier to MFC this change to the driver without MFCing the CAM changes as well. mps_user.c: Un-staticize mpi_init_sge() so we can use it for the SMP passthrough code. mpsvar.h: Add a uio and iovecs into struct mps_command for SMP passthrough commands. Add a cm_max_segs field to struct mps_command so that we can warn the user if busdma comes back with too many segments. Clear the cm_reply when a command gets freed. If it is not cleared, reply frames will eventually get freed into the pool multiple times and corrupt the pool. (This fix is from scottl.) Add a prototype for mpi_init_sge(). sys/param.h: Bump __FreeBSD_version to 900026 for the for the inclusion of the XPT_GDEV_ADVINFO and XPT_SMP_IO CAM CCBs.
* Fix some more warnings found by clang.brucec2010-11-228-12/+13
|
* Fix use of AND operator: should be bitwise instead of logical.brucec2010-11-221-2/+2
|
* Don't generate input() since it's not used.brucec2010-11-221-0/+1
|
* Don't generate input() since it's not used.brucec2010-11-221-0/+1
|
* Add SIGINT handler to `gpart restore` action.ae2010-11-221-1/+20
| | | | MFC after: 1 week
* Always dump partition labels with `gpart backup`, but `gpart restore`ae2010-11-222-29/+32
| | | | | | | | | does restore them only when -l option is specified [1]. Make number of entries field in backup format optional. Document -l and -r options of `gpart show` action. Suggested by: pjd [1] MFC after: 1 week
* Plug an fd leakkevlo2010-11-221-0/+1
|
* Fix missing closedir()kevlo2010-11-211-0/+1
| | | | Reviewed by: imp
* Delete /sys/ufs/ffs/README.snapshot as it is no longer relevant.mckusick2010-11-201-3/+0
| | | | | | Drop reference to it in mount(8). MFC: 3 days
* Add to gpart(8) an ability to backup partition table andae2010-11-202-1/+371
| | | | | | | | restore it from given backup. Discussed with: geom@ Approved by: kib (mentor) MFC after: 1 week
* When doing a camcontrol rescan all or a camcontrol reset all, use the wildcardrstone2010-11-191-0/+1
| | | | | | | | | | path id for enumerating the available busses. Previously camcontrol was implicitly passing 0 as the first path id, which meant that if bus 0 was not present camcontrol would fail with EINVAL instead of rescanning/resetting any busses that were present. Approved by: emaste (mentor) MFC after: 1 week
* Remove unused autofs userland bits.jhb2010-11-173-193/+0
| | | | Approved by: core
* Move timeout.tv_sec initialization outside the loop - sigtimedwait(2) won'tpjd2010-11-151-1/+1
| | | | | | | modify it. Submitted by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
* 1. Exit when we cannot create incoming connection.pjd2010-11-151-2/+4
| | | | | | | 2. Improve logging to inform which connection can't be created. Submitted by: [1] Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
* When setting a media with no sub-type specified also reset the typemarius2010-11-131-1/+1
| | | | | | | specific options along with the global ones so these options don't stick when f.e. switching to IFM_AUTO. MFC after: 2 weeks
* When printing media with more than one media option set aggregate thesemarius2010-11-131-2/+5
| | | | | | | | in a comma delimited list instead of repeating "mediaopt" for each one. This matches how the options of the active media are printed with print_media_word() and brings us in line what NetBSD does. MFC after: 2 weeks
* In printfile(), exit the process instead of only printing the warning.kib2010-11-131-2/+3
| | | | | | | | | | This fixes verbose mode when either -i specified non-existent kldfile id, or the file was unloaded between two kldnext(2) calls. While there, fix printfile() definition to be style(9)-compliant. Submitted by: arundel MFC after: 1 week
* Use "cylinder" instead of "cyl" for consistency.joel2010-11-132-2/+2
| | | | Reviewed by: phk
* The first customer of the SO_USER_COOKIE option:luigi2010-11-123-0/+19
| | | | | | | | | | | | the "sockarg" ipfw option matches packets associated to a local socket and with a non-zero so_user_cookie value. The value is made available as tablearg, so it can be used as a skipto target or pipe number in ipfw/dummynet rules. Code by Paul Joe, manpage by me. Submitted by: Paul Joe MFC after: 1 week
* Append to CFLAGS, don't clobber it.rpaulo2010-11-051-1/+1
| | | | Submitted by: loos
* r214781 caused the timer value to be rounded down, so that if the user askedbrucec2010-11-041-6/+4
| | | | | | | for 59 minutes 30 was sent to the drive. The timer value is now always rounded up. Reported by: mav
* Fix standby timer calculation: the timer was being set 30 minutes laterbrucec2010-11-041-1/+8
| | | | | | | | than the user requested. Also, 21 minutes is encoded as 252 and 22-29 minutes cannot be encoded so must be rounded up to 30. PR: bin/151871
* Send packets to remote node only via the send thread to avoid possiblepjd2010-11-021-40/+57
| | | | | | | | | | | races - in this case a keepalive packet was send from wrong thread which lead to connection dropping, because of corrupted packet. Fix it by sending keepalive packets directly from the send thread. As a bonus we now send keepalive packets only when connection is idle. Submitted by: Mikolaj Golub <to.my.trociny@gmail.com> MFC after: 3 days
* Add a ${.CURDIR} reference to the previous commit.rpaulo2010-10-291-1/+1
| | | | Submitted by: dim
* Force include ../../libpcap/config.h since privsep.c groks pcap'srpaulo2010-10-291-0/+2
| | | | internals.
* Correct a typo.jh2010-10-271-1/+1
| | | | | | PR: 151321 Submitted by: Simon Walton MFC after: 3 days
* Use fprintf(stderr) instead of gctl_error() to print a warning about toopjd2010-10-261-2/+2
| | | | | | | | big sector size. When gctl error is set gctl_has_param() always returns 'false', which prevents geli(8) from finding some arguments and also masks an error, which is generates in such case. MFC after: 3 days
* Reimplemented "gpart destroy -F". Now it does all work in kernel.ae2010-10-252-84/+99
| | | | | | | | | | | | | | | | | This was needed for recover implementation. Implement the recover command for GPT. Now GPT will marked as corrupt when any of three types of corruption will be detected: 1. Damaged primary GPT header or table 2. Damaged secondary GPT header or table 3. Secondary header is not located in the last LBA Marked GPT becomes read-only. Any changes with corrupt table are prohibited. Only "destroy" and "recover" commands are allowed. Discussed with: geom@ (mostly silence) Tested by: Ilya A. Arhipov Approved by: mav (mentor) MFC after: 2 weeks
* Do some whitespace and `identify` output cleanup.mav2010-10-251-50/+57
| | | | | Submitted by: arundel MFC after: 2 weeks
OpenPOWER on IntegriCloud