summaryrefslogtreecommitdiffstats
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* Update to -r224294 to ensure that only one of MNT_SUJ or MNT_SOFTDEPmckusick2011-07-301-2/+2
| | | | | | | is set so that mount can revert back to using MNT_NOWAIT when doing getmntinfo. Approved by: re (kib)
* Move the MNTK_SUJ flag in mnt_kern_flag to MNT_SUJ in mnt_flagmckusick2011-07-241-2/+3
| | | | | | | | | so that it is visible to userland programs. This change enables the `mount' command with no arguments to be able to show if a filesystem is mounted using journaled soft updates as opposed to just normal soft updates. Approved by: re (bz)
* This patch removes a check in ifconfig which disables HT/40 channelsadrian2011-07-201-12/+0
| | | | | | | | | | | | | on frequency bands with DFS. All Atheros chipsets >= AR9001 support radar event detection on HT40 extension channels. This should be a chipset specific item rather than enforced in the regulatory domain database. In addition, it's irrelevant for STA mode, as the radar detection is done by the access point, not the STA. Approved by: re (kib)
* This patch enables listing DFS related flags when 'ifconfig -v wlanXadrian2011-07-191-3/+14
| | | | | | | | | | | | | | | list channel' is run. The following new options are introduced: * D: channel requires DFS * R: channel has a radar event * I: channel has detected inteference * C: the CAC period has completed on a channel that requires it (ie, DFS + PASSIVE.) It's relevant for developing, debugging and using the DFS and interference options. Approved by: re (bz)
* If compiling RESCUE always ignore feature_present(3) calls so thatbz2011-07-183-0/+7
| | | | | | | | | | a /rescue/ifconfig more modern than the kernel could still configure IPv4 or IPv6 addresses. Reported by: Andrzej Tobola (ato iem.pw.edu.pl) Reported by: gcooper MFC after: 1 day X-MFC: will not MFC any time soon, just reminder for r222527
* The MBR uses a 32-bit unsigned integer to store the size of a slice, butrstone2011-07-171-4/+4
| | | | | | | | | | | | | | | | fdisk(1) internally uses a signed int. Should a user attempt to specify a slice containing more than 2^31 - 1 sectors, an error will be reported on systems with sizeof(long) == 4 and the slice size will be silently truncated on systems with sizeof(long) > 4. Instead use an unsigned long to store the slice size in fdisk(1). This allows the user to specify a slice size up to the maximum permitted by the MBR on-disk format and does not have any problems with silent truncation should the use specify an slice size larger than 2^32 on systems with sizeof(long) > 4. Submitted by: Mark Johnston (markjdb AT gmail DOT com) MFC after: 2 weeks
* Break out the pass 5 inode and block map updating into a separate functionmckusick2011-07-152-28/+45
| | | | so that the function can be used by the journaling soft updates recovery.
* When using -A option (unmount all mounted filesystems), do not attemptmckusick2011-07-141-0/+2
| | | | to unmount /dev as it will always fail.
* Use _PATH_DEV and make the format more consistent with GEOM_LABEL.delphij2011-07-141-1/+2
| | | | Submitted by: ivoras
* Add a -l option to show file system's corresponding /dev/ufsid path.delphij2011-07-142-5/+26
| | | | | | | This is useful for scripts that converts existing system's fstab to use their /dev/ufsid devices. MFC after: 2 weeks
* Remove trailing whitespace in the shutdown(8) manual.gjb2011-07-141-2/+2
| | | | MFC after: 1 week
* Improvements to the shutdown(8) manual.gjb2011-07-141-12/+14
| | | | | | PR: 158807 Submitted by: arundel MFC after: 1 week
* When exiting with error because of an invalid command line argumenttrociny2011-07-131-3/+3
| | | | | | use errx(3), not err(3), and the exit code from sysexits(3). Approved by: pjd (mentor)
* Fix indentation.trociny2011-07-131-1/+1
| | | | Approved by: pjd (mentor)
* Use NULL instead of 0 for third argument of sigaction(2).ae2011-07-121-1/+1
| | | | | Pointed by: kib MFC after: 2 weeks
* Add SIGINFO handler.ae2011-07-121-0/+24
| | | | | | Reviewed by: kib Obtained from: NetBSD (partly) MFC after: 2 weeks
* Remove useless initialization.trociny2011-07-051-2/+1
| | | | | Approved by: pjd (mentor) MFC after: 3 days
* Add infrastructure to allow all frames/packets received on an interfacebz2011-07-033-1/+118
| | | | | | | | | | | | | | to be assigned to a non-default FIB instance. You may need to recompile world or ports due to the change of struct ifnet. Submitted by: cjsp Submitted by: Alexander V. Chernikov (melifaro ipfw.ru) (original versions) Reviewed by: julian Reviewed by: Alexander V. Chernikov (melifaro ipfw.ru) MFC after: 2 weeks X-MFC: use spare in struct ifnet
* Fix a typo.sem2011-07-011-1/+1
| | | | Approved by: kib
* - Handle the JOP_SYNC case as appropriate.jeff2011-06-301-0/+1
| | | | Reported by: pho
* Add new rule actions "call" and "return" to ipfw. They makeae2011-06-293-1/+106
| | | | | | | | | | | | | possible to organize subroutines with rules. The "call" action saves the current rule number in the internal stack and rules processing continues from the first rule with specified number (similar to skipto action). If later a rule with "return" action is encountered, the processing returns to the first rule with number of "call" rule saved in the stack plus one or higher. Submitted by: Vadim Goncharov Discussed by: ipfw@, luigi@
* Improve error reporting. Use corresponding error message when file to beae2011-06-291-4/+11
| | | | | | | | preprocessed is missing. Also suggest to use absolute pathname if -p option is specified. PR: bin/156653 MFC after: 2 weeks
* Check the returned value of activemap_write_complete() and update matadata ontrociny2011-06-281-2/+5
| | | | | | | | disk if needed. This should fix a potential case when extents are cleared in activemap but metadata is not updated on disk. Suggested by: pjd Approved by: pjd (mentor)
* Make activemap_write_start/complete check the keepdirty list, whentrociny2011-06-281-5/+8
| | | | | | | | stating if we need to update activemap on disk. This makes keepdirty serve its purpose -- to reduce number of metadata updates. Discussed with: pjd Approved by: pjd (mentor)
* Revert the mechanical change from 'file system' to 'filesystem', committedtrasz2011-06-282-41/+41
| | | | in r223429. As bde@ pointed out, it was mostly backwards.
* Update packet filter (pf) code to OpenBSD 4.5.bz2011-06-281-1/+1
| | | | | | | | You need to update userland (world and ports) tools to be in sync with the kernel. Submitted by: mlaier Submitted by: eri
* Compile hastd and hastctl with capsicum support.pjd2011-06-272-1/+3
| | | | X-MFC after: capsicum merge
* Compile capsicum support only if HAVE_CAPSICUM is defined.pjd2011-06-271-0/+4
| | | | MFC after: 3 days
* Log a warning if we cannot sandbox using capsicum, but only under debug level 1.pjd2011-06-271-2/+6
| | | | | | | It would be too noisy to log it as a proper warning as CAPABILITIES are not compiled into GENERIC by default. MFC after: 3 days
* Actually, if code had followed style(9), there would be less stupid errorsglebius2011-06-241-15/+30
| | | | | | like the one fixed in r223416. Noticed by: julian
* Remove duplicated header fileskevlo2011-06-241-1/+0
|
* Advertise growfs(8) a little better.trasz2011-06-222-2/+4
|
* Cosmetic fixes; mostly s/file system/filesystem/g and removing weird indenttrasz2011-06-222-46/+46
| | | | from messages.
* One more braino from me.glebius2011-06-221-3/+6
| | | | | Pointy hat to: glebius Submitted by: Alexander V. Chernikov <melifaro ipfw.ru>
* When user specifies the bootcode with size smaller than VTOC_BOOTCODE,ae2011-06-211-1/+4
| | | | | | | | gpart_write_partcode_vtoc8 does access out of range of allocated memory. Check size of bootcode before writing it. Pointed out by: ru MFC after: 1 week
* Mod the offset padding by alignment. Without this change we maydelphij2011-06-211-2/+2
| | | | | | pad too much when underlying GEOM object have a zero stripesize. MFC after: 1 month
* The "size" param needs no adjusting to stripeoffset.ae2011-06-211-2/+2
| | | | Reported by: Kris Moore
* Correct subcommand name 'unset' -> 'unscript'.pjd2011-06-181-1/+1
|
* Fix clang warnings.benl2011-06-181-1/+2
| | | | Approved by: philip (mentor)
* - Fix my braino in the 220835, when I used strtok(). It isn'tglebius2011-06-171-14/+32
| | | | | | | | | | | applicable here, since modifies the string. Switch to strchr(). - Restore support for undocumented optional parameters of redir_port and redir_proto, that were disabled in 220835. - While here, change !isalpha() checks on optinal parameters for isdigit(). Submitted by: Alexander V. Chernikov <melifaro ipfw.ru> PR: kern/143653
* In HAST we use two sockets - one for only sending the data and one fortrociny2011-06-172-0/+6
| | | | | | | | | | | | | | | | | | only receiving the data. In r220271 the unused directions were disabled using shutdown(2). Unfortunately, this broke automatic receive buffer sizing, which currently works only for connections in ETASBLISHED state. It was a root cause of the issue reported by users, when connection between primary and secondary could get stuck. Disable the code introduced in r220271 until the issue with automatic buffer sizing is not resolved. Reported by: Daniel Kalchev <daniel@digsys.bg>, danger, sobomax Tested by: Daniel Kalchev <daniel@digsys.bg>, danger Approved by: pjd (mentor) MFC after: 1 week
* Add "alignment" param to the request before calling gpart_autofill().ae2011-06-161-0/+1
|
* Revert r222688.sobomax2011-06-161-14/+2
| | | | Requested by: Mikolaj Golub
* Lay groundwork in CAM for recording and reporting physical path andgibbs2011-06-141-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | other device attributes stored in the CAM Existing Device Table (EDT). This includes some infrastructure requried by the enclosure services driver to export physical path information. Make the CAM device advanced info interface accept store requests. sys/cam/scsi/scsi_all.c: sys/cam/scsi/scsi_all.h: - Replace scsi_get_sas_addr() with a scsi_get_devid() which takes a callback that decides whether to accept a particular descriptor. Provide callbacks for NAA IEEE Registered addresses and for SAS addresses, replacing the old function. This is needed because the old function doesn't work for an enclosure address for a SAS device, which is not flagged as a SAS address, but is NAA IEEE Registered. It may be worthwhile merging this interface with the devid match interface. - Add a few more defines for some device ID fields. sbin/camcontrol/camcontrol.c: - Update for the CCB_DEV_ADVINFO interface change. cam/cam_xpt_internal.h: - Add the new fields for the physical path string to the CAM EDT. cam/cam_ccb.h: - Rename CCB_GDEV_ADVINFO to simply CCB_DEV_ADVINFO, and the ccb structure to ccb_dev_advinfo. - Add a flag that changes this CCB's action to store, rather than the default, retrieve. - Add a new buffer type, CDAI_TYPE_PHYS_PATH, for the new CAM EDT physpath field. - Remove the never-implemented transport & proto flags. cam/cam_xpt.c: cam/cam_xpt.h: - Add xpt_getattr(), which provides a wrapper for fetching a device's attribute using the GEOM strings as key. This method currently supports "GEOM::ident" and "GEOM::physpath". Submitted by: will Reviewed by : gibbs Extend the XPT_DEV_MATCH api to allow a device search by device ID. As far as the API is concerned, device ID is a binary blob to be interpreted by the transport layer. The SCSI implementation assumes it is an array of VPD device ID descriptors. sys/cam/cam_ccb.h: Create a new structure, device_id_match_pattern, and update the XPT_DEV_MATCH datastructures and flags so that this pattern type can be used. sys/cam/cam_xpt.c: - A single pattern matching on both inquiry data and device ID is invalid. Report any violators. - Pass device ID match requests through to the new routine scsi_devid_match(). The direct call of a SCSI routine is a layering violation, but no worse than the one a few lines up that checks inquiry data. Defer cleaning this up until our future, larger, rototilling of CAM. - Zero out cam_ed and cam_et nodes on allocation. Prior to this change, device_id_len and device_id were not inialized, preventing proper detection of the presence of this information. sys/cam/scsi/scsi_all.c: sys/cam/scsi/scsi_all.h: Add the scsi_match_devid() routine. Add a helper function for extracting peripherial driver names sys/cam/cam_periph.c: sys/cam/cam_periph.h: Add the cam_periph_list() method which fills an sbuf with a comma delimited list of the peripheral instances associated with a given CAM path. Add a helper functions for SCSI commands used by the SES driver. sys/cam/scsi/scsi_all.c: sys/cam/scsi/scsi_all.h: Add structure definitions and csio filling functions for the receive diagnostic results and send diagnostic commands. Misc CAM XPT cleanups. sys/cam/cam_xpt.c: Broadcast AC_FOUND_DEVICE and AC_PATH_REGISTERED events at the time async event handlers are attached even when registering just for events on a partitular SIM. Previously, you had to register for these events on all SIMs in the system in order to get the initial broadcast even though subsequent device and path arrivals would be delivered. sys/cam/cam_xpt.c: Remove SIM mutex held asserts from path accessors. CAM paths are reference counted and it is this reference count, not the sim mutex, that garantees they are stable. Sponsored by: Spectra Logic Corporation
* Implement "global" mode for ipfw nat. It is similar to natd(8)ae2011-06-144-7/+45
| | | | | | | | | | | | | | | | "globalport" option for multiple NAT instances. If ipfw rule contains "global" keyword instead of nat_number, then for each outgoing packet ipfw_nat looks up translation state in all configured nat instances. If an entry is found, packet aliased according to that entry, otherwise packet is passed unchanged. User can specify "skip_global" option in NAT configuration to exclude an instance from the lookup in global mode. PR: kern/157867 Submitted by: Alexander V. Chernikov (previous version) Tested by: Eugene Grosbein
* Check nat id a bit more strictly.ae2011-06-141-6/+7
|
* Grab one of the ifcap bits for netmap, and enable printing in ifconfig.luigi2011-06-141-1/+1
| | | | | | | Document the fact that we might want an IFCAP_CANTCHANGE mask, even though the value is not yet used in sys/net/if.c (asked on -current a week ago, no feedback so i assume no objection).
* Implement fully asynchronous partial truncation with softupdates journalingjeff2011-06-101-36/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to resolve errors which can cause corruption on recovery with the old synchronous mechanism. - Append partial truncation freework structures to indirdeps while truncation is proceeding. These prevent new block pointers from becoming valid until truncation completes and serialize truncations. - On completion of a partial truncate journal work waits for zeroed pointers to hit indirects. - softdep_journal_freeblocks() handles last frag allocation and last block zeroing. - vtruncbuf/ffs_page_remove moved into softdep_*_freeblocks() so it is only implemented in one place. - Block allocation failure handling moved up one level so it does not proceed with buf locks held. This permits us to do more extensive reclaims when filesystem space is exhausted. - softdep_sync_metadata() is broken into two parts, the first executes once at the start of ffs_syncvnode() and flushes truncations and inode dependencies. The second is called on each locked buf. This eliminates excessive looping and rollbacks. - Improve the mechanism in process_worklist_item() that handles acquiring vnode locks for handle_workitem_remove() so that it works more generally and does not loop excessively over the same worklist items on each call. - Don't corrupt directories by zeroing the tail in fsck. This is only done for regular files. - Push a fsync complete record for files that need it so the checker knows a truncation in the journal is no longer valid. Discussed with: mckusick, kib (ffs_pages_remove and ffs_truncate parts) Tested by: pho
* Add dump.c to the rtsol build. It is needed now that sec2str is non-staticken2011-06-081-1/+1
| | | | and used in rtsold.c.
* Add a special mount option "failok" to indicate that the administrator wantsdelphij2011-06-071-2/+14
| | | | | | | | | the system to proceed to boot without bailing out into single user mode, even when the file system can not be successfully mounted. This option is implemented in mount(8) and not passed into kernel. MFC after: 1 month
OpenPOWER on IntegriCloud