7533 Commits

Author SHA1 Message Date
jhb
0fbe5b3df8 MFC 279951:
Simplify string mangling in ifmaybeload().
- Use strlcpy() instead of strcpy().
- Use strlcat() instead of a strlcpy() with a magic number subtracted
  from the length.
- Replace strncmp(..., strlen(foo) + 1) with strcmp(...).
2015-04-09 21:06:51 +00:00
mav
5f22f76484 MFC r280687: Make GEOM_PART work in presence of previous withered self. 2015-04-09 10:10:05 +00:00
wblock
0aa481cad3 MFC 280988:
Add articles, avoid use of "you", simplify a few sentences.
2015-04-09 03:30:05 +00:00
mav
7e7a1cb5ec MFC r280166:
Make ATA power management commands to work on SCSI HBAs via PASS THROUGH.
2015-03-31 07:21:53 +00:00
mav
457dafa988 MFC r280249: Add camcontrol subcommands to control APM and AAM levels.
Sponsored by:	iXsystems, Inc.
2015-03-26 08:38:53 +00:00
ae
c07681e98f MFC r269854:
Remove duplicate entry.

MFC r279935:
  Add GUID and alias for Apple Core Storage partition.

  PR:		196241
2015-03-19 14:09:27 +00:00
rwatson
bcbbcda0f2 Merge an applicable subset of r263234 from HEAD to stable/10:
Update most userspace consumers of capability.h to use capsicum.h instead.

  auditdistd is not updated as I will make the change upstream and then do a
  vendor import sometime in the next week or two.

Note that a significant fraction does not apply, as FreeBSD 10 doesn't
contain a Capsicumised ping, casperd, libcasper, etc.  When these features
are merged, the capsicum.h change will need to be merged with them.

Sponsored by:	Google, Inc.
2015-03-19 12:32:48 +00:00
trasz
1aec35d876 MFC r277799:
Fix sysctl name.

Sponsored by:	The FreeBSD Foundation
2015-03-07 19:46:47 +00:00
ae
204f9a5f7c MFC r279324:
When gpart(8) is trying automatically determine the first available
  block of free space after existing partition, take into account
  provider's stripeoffset, since the result will be adjusted to this
  value.

  PR:		197989
2015-03-05 10:08:37 +00:00
ken
a5cd9b061e MFC r278964:
The __FreeBSD_version was changed to 1001510 to be appropriate for
stable/10.

I will followup with a commit to mpr(4) and mps(4) in head to reflect
the stable/10 __FreeBSD_version and merge the change back to stable/10.

  ------------------------------------------------------------------------
  r278964 | ken | 2015-02-18 11:30:19 -0700 (Wed, 18 Feb 2015) | 46 lines

  Make sure that the flags for the XPT_DEV_ADVINFO CCB are initialized
  properly.

  If there is garbage in the flags field, it can sometimes include a
  set CDAI_FLAG_STORE flag, which may cause either an error or
  perhaps result in overwriting the field that was intended to be
  read.

  sys/cam/cam_ccb.h:
  	Add a new flag to the XPT_DEV_ADVINFO CCB, CDAI_FLAG_NONE,
  	that callers can use to set the flags field when no store
  	is desired.

  sys/cam/scsi/scsi_enc_ses.c:
  	In ses_setphyspath_callback(), explicitly set the
  	XPT_DEV_ADVINFO flags to CDAI_FLAG_NONE when fetching the
  	physical path information.  Instead of ORing in the
  	CDAI_FLAG_STORE flag when storing the physical path, set
  	the flags field to CDAI_FLAG_STORE.

  sys/cam/scsi/scsi_sa.c:
  	Set the XPT_DEV_ADVINFO flags field to CDAI_FLAG_NONE when
  	fetching extended inquiry information.

  sys/cam/scsi/scsi_da.c:
  	When storing extended READ CAPACITY information, set the
  	XPT_DEV_ADVINFO flags field to CDAI_FLAG_STORE instead of
  	ORing it into a field that isn't initialized.

  sys/dev/mpr/mpr_sas.c,
  sys/dev/mps/mps_sas.c:
  	When fetching extended READ CAPACITY information, set the
  	XPT_DEV_ADVINFO flags field to CDAI_FLAG_NONE instead of
  	setting it to 0.

  sbin/camcontrol/camcontrol.c:
  	When fetching a device ID, set the XPT_DEV_ADVINFO flags
  	field to CDAI_FLAG_NONE instead of 0.

  sys/sys/param.h:
  	Bump __FreeBSD_version to 1100061 for the new XPT_DEV_ADVINFO
  	CCB flag, CDAI_FLAG_NONE.

  Sponsored by:	Spectra Logic
2015-02-26 20:46:16 +00:00
ngie
63d67d50be MFC r277678:
r277678:

  Add MK_CCD knob for building and installing ccd(4), ccdconfig, etc

  Sponsored by: EMC / Isilon Storage Division
2015-02-13 21:32:05 +00:00
ngie
e146e39f9f MFC r277725:
r277725:

  Add MK_HAST knob for building and installing hastd(8), et al

  Sponsored by: EMC / Isilon Storage Division
2015-02-11 07:12:00 +00:00
ngie
bf4551aa32 MFC r277675,r277726,r278070:
r277675:

  Add MK_ISCSI knob for building the iscsi initiator, iscsi daemon, kernel
  modules, etc

  Sponsored by: EMC / Isilon Storage Division

r277726:

  Build sbin/iscontrol again if MK_ISCSI != no

  Pointyhat to: me

r278070:

  Remove duplicate MK_ISCSI block and sort the conditional blocks so this error
  won't crop up again in the future

  Reported by: gjb
2015-02-11 07:08:32 +00:00
jhb
1fa38dee26 MFC 277714:
natd(8) will work with an unconfigured interface and effectively not do
anything until the interface is assigned an address.  This fixes
ipfw_nat to do the same by using an IP of INADDR_ANY instead of
aborting the nat setup if the requested interface is not yet configured.
2015-02-06 18:13:29 +00:00
ken
d2ea45e16c MFC r276835:
r276835 | ken | 2015-01-08 09:58:40 -0700 (Thu, 08 Jan 2015) | 91 lines

  Improve camcontrol(8) handling of drive defect data.

  This includes a new summary mode (-s) for camcontrol defects that
  quickly tells the user the most important thing: how many defects
  are in the requested list.  The actual location of the defects is
  less important.

  Modern drives frequently have more than the 8191 defects that can
  be reported by the READ DEFECT DATA (10) command.  If they don't
  have that many grown defects, they certainly have more than 8191
  defects in the primary (i.e. factory) defect list.

  The READ DEFECT DATA (12) command allows for longer parameter
  lists, as well as indexing into the list of defects, and so allows
  reporting many more defects.

  This has been tested with HGST drives and Seagate drives, but
  does not fully work with Seagate drives.  Once I have a Seagate
  spec I may be able to determine whether it is possible to make it
  work with Seagate drives.

  scsi_da.h:	Add a definition for the new long block defect
  		format.

  		Add bit and mask definitions for the new extended
  		physical sector and bytes from index defect
  		formats.

  		Add a prototype for the new scsi_read_defects() CDB
  		building function.

  scsi_da.c:	Add a new scsi_read_defects() CDB building function.
  		camcontrol(8) was previously composing CDBs manually.
  		This is long overdue.

  camcontrol.c:	Revamp the camcontrol defects subcommand.  We now
  		go through multiple stages in trying to get defect
  		data off the drive while avoiding various drive
  		firmware quirks.

  		We start off by requesting the defect header with
  		the 10 byte command.  If we're in summary mode (-s)
  		and the drive reports fewer defects than can be
  		represented in the 10 byte header, we're done.
  		Otherwise, we know that we need to issue the
  		12 byte command if the drive reports the maximum
  		number of defects.

  		If we're in summary mode, we're done if we get a
  		good response back when asking for the 12 byte header.

  		If the user has asked for the full list, then we
  		use the address descriptor index field in the 12
  		byte CDB to step through the list in 64K chunks.
  		64K is small enough to work with most any ancient
  		or modern SCSI controller.

  		Add support for printing the new long block defect
  		format, as well as the extended physical sector and
  		bytes from index formats.  I don't have any drives
  		that support the new formats.

  		Add a hexadecimal output format that can be turned
  		on with -X.

  		Add a quiet mode (-q) that can be turned on with
  		the summary mode (-s) to just print out a number.

  		Revamp the error detection and recovery code for
  		the defects command to work with HGST drives.

  		Call the new scsi_read_defects() CDB building
  		function instead of rolling the CDB ourselves.

  		Pay attention to the residual from the defect list
  		request when printing it out, so we don't run off
  		the end of the list.

  		Use the new scsi_nv library routines to convert
  		from strings to numbers and back.

  camcontrol.8:	Document the new defect formats (longblock, extbfi,
  		extphys) and command line options (-q, -s, -S and
  		-X) for the defects subcommand.

  		Explain a little more about what drives generally
  		do and don't support.

Sponsored by:	Spectra Logic
2015-02-03 22:18:48 +00:00
ngie
ab0b7c3d85 MFC r277674:
r277674 (by ngie):

  Fix building rcorder with -DDEBUG by using libutil.h instead of util.h from
  usr.bin/make

  Sponsored by: EMC / Isilon Storage Division
2015-02-02 05:46:36 +00:00
trasz
0638ccbfc6 MFC r275680:
Add fstyp(8).  This utility, named after its SVR4 counterpart, detects
filesystems.  It differs from file(1) in that it gives machine-parseable
output, it outputs filesystem labels, doesn't get confused by other
formats metadata, and runs in Capsicum sandbox.

Differential Revision:	https://reviews.freebsd.org/D1255
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2015-01-20 20:39:29 +00:00
trasz
45a21be73d MFC r275510:
Move iscsi.conf.5 from sbin/iscontrol/ to usr.bin/iscsictl/, as the
former is obsolete.

Sponsored by:	The FreeBSD Foundation
2015-01-14 11:29:16 +00:00
trasz
6a2be062a5 MFC r274858:
Cross-reference autounmountd(8) from umount(8).

Sponsored by:	The FreeBSD Foundation
2015-01-01 15:38:57 +00:00
trasz
783c94c87f MFC r274857:
Cross-reference automount(8) from mount(8).

Sponsored by:	The FreeBSD Foundation
2015-01-01 15:37:21 +00:00
ngie
d4c625976a MFC r264400,r265836:
r264400:

  NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
  and finish the job. ncurses is now the only Makefile in the tree that
  uses it since it wasn't a simple mechanical change, and will be
  addressed in a future commit.

r265836:

  Remove last two NO_MAN= in the tree. In both of these cases, MAN= is
  what is needed.
2014-12-31 23:25:37 +00:00
trasz
40ef49f52b MFC r274742:
Uniformly refer to a file system as "file system".

Sponsored by:	The FreeBSD Foundation
2014-12-21 11:26:51 +00:00
trasz
84195308d0 MFC r274741:
Add example on how to use gpart before growfs.  While here, reorder examples
so that the simplest one comes first.

Sponsored by:	The FreeBSD Foundation
2014-12-21 11:25:26 +00:00
trasz
950a2d5097 MFC r274738:
Document growfs(8) feature apparently nobody knows about.

Sponsored by:	The FreeBSD Foundation
2014-12-21 11:23:59 +00:00
trasz
83b038683b MFC r274737:
Use proper ordering in EXAMPLES section in growfs(8).

Sponsored by:	The FreeBSD Foundation
2014-12-21 11:22:15 +00:00
bryanv
5ce5864383 MFC r274322:
Attempt to report a better error if sanitize is not supported
2014-12-09 07:03:49 +00:00
ngie
bb7db53959 MFC r275170:
Convert sbin/mdconfig/tests from prove format tests to ATF format tests

  As a side effect...
  1. The tests now checks for the root user before continuing with kyua, which is
     more visible than the test being skipped with the TAP protocol
  2. The tests work with devices that aren't /dev/md0 by caching the device
     attached during the test to a file, and later use the cached information to
     detach the device in the cleanup routine
  3. The tests no longer require perl to run

  PR: 191191
  Sponsored by: EMC / Isilon Storage Division
2014-12-05 12:51:27 +00:00
delphij
0b08d45457 MFC r272044:
Constify a parameter of name2oid.  No functional change.
2014-12-04 23:15:44 +00:00
trasz
39035328b4 MFC r273896:
Build mount_nfs(8) with WARNS=6.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:57:31 +00:00
trasz
abb884ffe0 MFC r273848:
Get rid of obsolete code in mount_nfs(8).

MFC r273861:

Remove two functions unused after r273848.  Would be nice if clang
or at least scan-build yelled about it.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:55:35 +00:00
trasz
3c827138a2 MFC r273851:
Note that the "timeout" nfs option is in tenths of a second.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:43:32 +00:00
trasz
059653a03d MFC r273849:
Add support for "timeo", "actimeo", "noac", and "proto" options
to mount_nfs(8).  They are implemented on Linux, OS X, and Solaris,
and thus can be expected to appear in automounter maps.

Sponsored by:	The FreeBSD Foundation
2014-11-29 15:41:55 +00:00
ae
3a3d4bc315 MFC r274750:
Use geom attribute "PART::type" to determine partition type and choose
  relevant fsck_xxx utility.
2014-11-27 08:41:31 +00:00
nyan
3f0322db38 MFC: r272243
Add missing library dependencies.
2014-11-03 05:35:45 +00:00
ae
456c95b69d MFC r272746:
Add an ability to set dumpdev via loader(8) tunable.

MFC r272747:
  Revert r156046. We support setting dumpdev via loader tunable again.
  Also change default disk name to ada.
2014-10-29 11:07:40 +00:00
skreuzer
d384077778 MFC r269627:
Mention tmpfs(5)

PR:             192389
Submitted by:   yaneurabeya@gmail.com
Approved by:    hrs (mentor)
2014-10-14 19:21:04 +00:00
mav
2cb46b9c51 MFC r271588: Update CAM CCB accounting for the new status quo.
devq_openings counter lost its meaning after allocation queues has gone.
held counter is still meaningful, but problematic to update due to separate
locking of CCB allocation and queuing.

To fix that replace devq_openings counter with allocated counter.  held is
now calculated on request as difference between number of allocated, queued
and active CCBs.
2014-10-14 12:13:01 +00:00
trasz
625b27b4d0 MFC r272932:
Mark iscontrol(8) and iscsi_initiator(4) obsolete.

Differential Revision:	https://reviews.freebsd.org/D931
Reviewed by:	wblock@
Sponsored by:	The FreeBSD Foundation
2014-10-14 07:52:37 +00:00
hrs
72b3bc6083 MFC r272885:
Do not add late flag when file= is specified because it has a bad
  side-effect.  The specified file should exist before the fstab line.
2014-10-11 20:35:36 +00:00
jhb
5595ee4003 MFC 270828,271487,271495:
Add sysctls to export the BIOS SMAP and EFI memory maps along with
handlers in the sysctl(8) binary to format them.
2014-10-10 20:47:23 +00:00
hrs
295bc031b8 MFC r271921:
Fix a typo.
2014-10-09 23:50:31 +00:00
hrs
33c910e72d MFC r271919:
Fix a bug which could make routed(8) daemon exit by sending a special RIP
  query from a remote machine, and disable accepting it by default.  This
  requests a routed(8) daemon to dump routing information base for debugging
  purpose.  An -i flag to enable it has been added.
2014-10-09 23:49:36 +00:00
hrs
c1d2c479c7 MFC r271909:
Revert changes in r269180.  It could cause -c N option to enter an
  infinite loop if no reply packet is received.
2014-10-09 23:48:20 +00:00
hrs
ff5a508f69 MFC r271411:
Fix a bug which could break extended attributes in a dump output.
  This occurred when a file was >892kB long and had a large data (>1kB)
  in the extended attributes.
2014-10-09 23:43:13 +00:00
hrs
5500c83bb6 MFC r257036:
Return 0 if:

    1. "-u N" specified, no -f, and mdN found,
    2. no -u, "-f /pathname" specified, and mdN associated with /pathname found,
    3. "-u N" specified, "-f /pathname" specified, and both of them found,
    4. "-l" specified and no -f,
    5. "-l" specified, "-f /pathname" specified, and /pathname found.

  otherwise return -1.
2014-10-09 23:17:18 +00:00
hrs
0f665a39d5 MFC r256715:
Use long explicitly for the time difference.
2014-10-09 23:15:26 +00:00
hrs
d602c1189c MFC r256695:
- Add relative specification in expiration time.
  - Add proto3 option for RTF_PROTO3.
  - Use %lu for members of struct rt_metrics.
2014-10-09 23:14:02 +00:00
ae
142c064467 MFC r271307:
Add the ability to set `prefer_source' flag to an IPv6 address.
  It affects the IPv6 source address selection algorithm (RFC 6724)
  and allows override the last rule ("longest matching prefix") for
  choosing among equivalent addresses. The address with `prefer_source'
  will be preferred source address.
2014-10-09 02:49:33 +00:00
bdrewery
bcf511dc04 MFC r271720:
If fgets(3) fails in getbounds(), show strerror(3) if not an EOF. Also fix a
  FILE* leak in getbounds().

PR:		192032
Approved by:	re (gjb)
2014-10-02 18:11:13 +00:00
emaste
37dd226a2e MFC EFI support for the installer
r264978 (nwhitehorn):

    Add EFI support to the installer. This requires that the kernel
    provide a sysctl to determine what firmware is in use. This sysctl
    does not exist yet, so the following blocks are in front of the
    wheels:
    - I've provisionally called this "hw.platform" after the equivalent
      thing on PPC
    - The logic to check the sysctl is short-circuited to always choose
      BIOS.  There's a comment in the top of the file about how to turn
      this off.

    If IA64 acquired a boot1.efifat-like thing (probably with very few
    modifications), the same code could be adapted there.

r265016 (nwhitehorn):

    Finish connecting up installer UEFI support. If the kernel was
    booted using EFI, set up the disks for an EFI system. If booted from
    BIOS/CSM, set up for BIOS.

r268256 (nwhitehorn):

    After EFI support was added to the installer, it needed to allow
    boot partitions of types other than "freebsd-boot" (in particular,
    "efi").  This allows the removal of some nasty hacks for supporting
    PowerPC systems, in particular aliasing freebsd-boot to apple-boot
    on APM and an IBM-specific code on MBR.

    This changes the installer to use the correct names, which also
    breaks a degeneracy in the meaning of "freebsd-boot" that allows the
    addition of support for some newer IBM systems that can boot from
    GPT in addition to MBR. Since I have no idea how to detect which
    those systems are, leave the default on IBM PPC systems as MBR for
    now.

Approved by:	re
PR:		193658
Relnotes:	Yes
2014-09-15 17:49:46 +00:00