summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rw-r--r--sbin/adjkerntz/Makefile.depend1
-rw-r--r--sbin/atm/atmconfig/Makefile.depend1
-rw-r--r--sbin/badsect/Makefile1
-rw-r--r--sbin/badsect/Makefile.depend1
-rw-r--r--sbin/bsdlabel/Makefile.depend1
-rw-r--r--sbin/camcontrol/Makefile2
-rw-r--r--sbin/camcontrol/Makefile.depend1
-rw-r--r--sbin/camcontrol/attrib.c509
-rw-r--r--sbin/camcontrol/camcontrol.8145
-rw-r--r--sbin/camcontrol/camcontrol.c30
-rw-r--r--sbin/camcontrol/camcontrol.h3
-rw-r--r--sbin/camcontrol/persist.c4
-rw-r--r--sbin/ccdconfig/Makefile.depend1
-rw-r--r--sbin/clri/Makefile.depend1
-rw-r--r--sbin/comcontrol/Makefile.depend1
-rw-r--r--sbin/conscontrol/Makefile.depend1
-rw-r--r--sbin/ddb/Makefile.depend1
-rw-r--r--sbin/devd/Makefile.depend1
-rw-r--r--sbin/devfs/Makefile.depend1
-rw-r--r--sbin/dhclient/Makefile.depend1
-rw-r--r--sbin/dhclient/dhclient.c8
-rw-r--r--sbin/dmesg/Makefile.depend1
-rw-r--r--sbin/dump/Makefile.depend1
-rw-r--r--sbin/dumpfs/Makefile.depend1
-rw-r--r--sbin/dumpfs/dumpfs.c2
-rw-r--r--sbin/dumpon/Makefile.depend1
-rw-r--r--sbin/etherswitchcfg/Makefile.depend1
-rw-r--r--sbin/fdisk/Makefile.depend1
-rw-r--r--sbin/fdisk_pc98/Makefile.depend1
-rw-r--r--sbin/ffsinfo/Makefile.depend1
-rw-r--r--sbin/fsck/Makefile.depend1
-rw-r--r--sbin/fsck_ffs/Makefile.depend1
-rw-r--r--sbin/fsck_msdosfs/Makefile.depend1
-rw-r--r--sbin/fsdb/Makefile.depend1
-rw-r--r--sbin/fsirand/Makefile.depend1
-rw-r--r--sbin/gbde/Makefile.depend1
-rw-r--r--sbin/geom/class/cache/Makefile.depend1
-rw-r--r--sbin/geom/class/concat/Makefile.depend1
-rw-r--r--sbin/geom/class/eli/Makefile.depend1
-rw-r--r--sbin/geom/class/eli/geom_eli.c2
-rw-r--r--sbin/geom/class/journal/Makefile.depend1
-rw-r--r--sbin/geom/class/label/Makefile.depend1
-rw-r--r--sbin/geom/class/mirror/Makefile.depend1
-rw-r--r--sbin/geom/class/mountver/Makefile.depend1
-rw-r--r--sbin/geom/class/multipath/Makefile.depend1
-rw-r--r--sbin/geom/class/multipath/gmultipath.818
-rw-r--r--sbin/geom/class/nop/Makefile.depend1
-rw-r--r--sbin/geom/class/part/Makefile.depend1
-rw-r--r--sbin/geom/class/raid/Makefile.depend1
-rw-r--r--sbin/geom/class/raid3/Makefile.depend1
-rw-r--r--sbin/geom/class/sched/Makefile.depend1
-rw-r--r--sbin/geom/class/shsec/Makefile.depend1
-rw-r--r--sbin/geom/class/stripe/Makefile.depend1
-rw-r--r--sbin/geom/class/virstor/Makefile.depend1
-rw-r--r--sbin/geom/core/Makefile.depend1
-rw-r--r--sbin/ggate/ggatec/Makefile.depend1
-rw-r--r--sbin/ggate/ggated/Makefile.depend1
-rw-r--r--sbin/ggate/ggatel/Makefile.depend1
-rw-r--r--sbin/growfs/Makefile.depend1
-rw-r--r--sbin/gvinum/Makefile.depend1
-rw-r--r--sbin/hastctl/Makefile.depend1
-rw-r--r--sbin/hastd/Makefile.depend1
-rw-r--r--sbin/ifconfig/Makefile.depend1
-rw-r--r--sbin/init/Makefile.depend1
-rw-r--r--sbin/ipf/ipf/Makefile.depend1
-rw-r--r--sbin/ipf/ipfs/Makefile.depend1
-rw-r--r--sbin/ipf/ipfstat/Makefile.depend1
-rw-r--r--sbin/ipf/ipftest/Makefile.depend1
-rw-r--r--sbin/ipf/ipmon/Makefile.depend1
-rw-r--r--sbin/ipf/ipnat/Makefile.depend1
-rw-r--r--sbin/ipf/ippool/Makefile.depend1
-rw-r--r--sbin/ipf/ipresend/Makefile.depend1
-rw-r--r--sbin/ipf/libipf/Makefile.depend1
-rw-r--r--sbin/ipfw/Makefile.depend1
-rw-r--r--sbin/iscontrol/Makefile.depend1
-rw-r--r--sbin/kldconfig/Makefile.depend1
-rw-r--r--sbin/kldload/Makefile.depend1
-rw-r--r--sbin/kldstat/Makefile.depend1
-rw-r--r--sbin/kldunload/Makefile.depend1
-rw-r--r--sbin/ldconfig/Makefile.depend1
-rw-r--r--sbin/mca/Makefile5
-rw-r--r--sbin/mca/Makefile.depend19
-rw-r--r--sbin/mca/mca.873
-rw-r--r--sbin/mca/mca.c547
-rw-r--r--sbin/md5/Makefile.depend1
-rw-r--r--sbin/mdconfig/Makefile.depend1
-rw-r--r--sbin/mdmfs/Makefile.depend1
-rw-r--r--sbin/mknod/Makefile.depend1
-rw-r--r--sbin/mksnap_ffs/Makefile.depend1
-rw-r--r--sbin/mount/Makefile.depend1
-rw-r--r--sbin/mount_cd9660/Makefile.depend1
-rw-r--r--sbin/mount_fusefs/Makefile.depend1
-rw-r--r--sbin/mount_msdosfs/Makefile.depend1
-rw-r--r--sbin/mount_nfs/Makefile.depend1
-rw-r--r--sbin/mount_nullfs/Makefile.depend1
-rw-r--r--sbin/mount_udf/Makefile.depend1
-rw-r--r--sbin/mount_unionfs/Makefile.depend1
-rw-r--r--sbin/natd/Makefile.depend1
-rw-r--r--sbin/newfs/Makefile.depend1
-rw-r--r--sbin/newfs_msdos/Makefile.depend1
-rw-r--r--sbin/nfsiod/Makefile.depend1
-rw-r--r--sbin/nos-tun/Makefile.depend1
-rw-r--r--sbin/nvmecontrol/Makefile.depend1
-rw-r--r--sbin/pfctl/Makefile.depend1
-rw-r--r--sbin/pflogd/Makefile.depend1
-rw-r--r--sbin/ping/Makefile.depend1
-rw-r--r--sbin/ping6/Makefile.depend1
-rw-r--r--sbin/quotacheck/Makefile.depend1
-rw-r--r--sbin/rcorder/Makefile.depend1
-rw-r--r--sbin/reboot/Makefile.depend1
-rw-r--r--sbin/recoverdisk/Makefile.depend1
-rw-r--r--sbin/resolvconf/Makefile.depend1
-rw-r--r--sbin/restore/Makefile.depend1
-rw-r--r--sbin/route/Makefile.depend1
-rw-r--r--sbin/routed/Makefile.depend1
-rw-r--r--sbin/routed/rtquery/Makefile.depend1
-rw-r--r--sbin/rtsol/Makefile.depend1
-rw-r--r--sbin/savecore/Makefile.depend1
-rw-r--r--sbin/sconfig/Makefile.depend1
-rw-r--r--sbin/setkey/Makefile.depend1
-rw-r--r--sbin/shutdown/Makefile.depend1
-rw-r--r--sbin/spppcontrol/Makefile.depend1
-rw-r--r--sbin/sunlabel/Makefile.depend1
-rw-r--r--sbin/swapon/Makefile.depend1
-rw-r--r--sbin/sysctl/Makefile.depend1
-rw-r--r--sbin/tunefs/Makefile.depend1
-rw-r--r--sbin/umount/Makefile.depend1
127 files changed, 815 insertions, 665 deletions
diff --git a/sbin/adjkerntz/Makefile.depend b/sbin/adjkerntz/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/adjkerntz/Makefile.depend
+++ b/sbin/adjkerntz/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/atm/atmconfig/Makefile.depend b/sbin/atm/atmconfig/Makefile.depend
index 3782b97..7df1c10 100644
--- a/sbin/atm/atmconfig/Makefile.depend
+++ b/sbin/atm/atmconfig/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/badsect/Makefile b/sbin/badsect/Makefile
index c11f8cba..68e2964 100644
--- a/sbin/badsect/Makefile
+++ b/sbin/badsect/Makefile
@@ -4,6 +4,5 @@
PROG= badsect
LIBADD= ufs
MAN= badsect.8
-WARNS?= 2
.include <bsd.prog.mk>
diff --git a/sbin/badsect/Makefile.depend b/sbin/badsect/Makefile.depend
index 6ce72cc..99cf113 100644
--- a/sbin/badsect/Makefile.depend
+++ b/sbin/badsect/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/bsdlabel/Makefile.depend b/sbin/bsdlabel/Makefile.depend
index 5d7ba23..851372c 100644
--- a/sbin/bsdlabel/Makefile.depend
+++ b/sbin/bsdlabel/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/camcontrol/Makefile b/sbin/camcontrol/Makefile
index f23ef52..cbc5452 100644
--- a/sbin/camcontrol/Makefile
+++ b/sbin/camcontrol/Makefile
@@ -3,7 +3,7 @@
PROG= camcontrol
SRCS= camcontrol.c util.c
.if !defined(RELEASE_CRUNCH)
-SRCS+= fwdownload.c modeedit.c persist.c progress.c
+SRCS+= attrib.c fwdownload.c modeedit.c persist.c progress.c
.else
CFLAGS+= -DMINIMALISTIC
.endif
diff --git a/sbin/camcontrol/Makefile.depend b/sbin/camcontrol/Makefile.depend
index 1448d0f..48a48dd 100644
--- a/sbin/camcontrol/Makefile.depend
+++ b/sbin/camcontrol/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/camcontrol/attrib.c b/sbin/camcontrol/attrib.c
new file mode 100644
index 0000000..62d4b1e
--- /dev/null
+++ b/sbin/camcontrol/attrib.c
@@ -0,0 +1,509 @@
+/*-
+ * Copyright (c) 2014 Spectra Logic Corporation
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ *
+ * Authors: Ken Merry (Spectra Logic Corporation)
+ */
+/*
+ * SCSI Read and Write Attribute support for camcontrol(8).
+ */
+
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
+
+#include <sys/ioctl.h>
+#include <sys/stdint.h>
+#include <sys/types.h>
+#include <sys/endian.h>
+#include <sys/sbuf.h>
+#include <sys/queue.h>
+#include <sys/chio.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <inttypes.h>
+#include <unistd.h>
+#include <string.h>
+#include <strings.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <limits.h>
+#include <err.h>
+#include <locale.h>
+
+#include <cam/cam.h>
+#include <cam/cam_debug.h>
+#include <cam/cam_ccb.h>
+#include <cam/scsi/scsi_all.h>
+#include <cam/scsi/scsi_pass.h>
+#include <cam/scsi/scsi_ch.h>
+#include <cam/scsi/scsi_message.h>
+#include <camlib.h>
+#include "camcontrol.h"
+
+#if 0
+struct scsi_attr_desc {
+ int attr_id;
+
+ STAILQ_ENTRY(scsi_attr_desc) links;
+};
+#endif
+
+static struct scsi_nv elem_type_map[] = {
+ { "all", ELEMENT_TYPE_ALL },
+ { "picker", ELEMENT_TYPE_MT },
+ { "slot", ELEMENT_TYPE_ST },
+ { "portal", ELEMENT_TYPE_IE },
+ { "drive", ELEMENT_TYPE_DT },
+};
+
+static struct scsi_nv sa_map[] = {
+ { "attr_values", SRA_SA_ATTR_VALUES },
+ { "attr_list", SRA_SA_ATTR_LIST },
+ { "lv_list", SRA_SA_LOG_VOL_LIST },
+ { "part_list", SRA_SA_PART_LIST },
+ { "supp_attr", SRA_SA_SUPPORTED_ATTRS }
+};
+
+static struct scsi_nv output_format_map[] = {
+ { "text_esc", SCSI_ATTR_OUTPUT_TEXT_ESC },
+ { "text_raw", SCSI_ATTR_OUTPUT_TEXT_RAW },
+ { "nonascii_esc", SCSI_ATTR_OUTPUT_NONASCII_ESC },
+ { "nonascii_trim", SCSI_ATTR_OUTPUT_NONASCII_TRIM },
+ { "nonascii_raw", SCSI_ATTR_OUTPUT_NONASCII_RAW },
+ { "field_all", SCSI_ATTR_OUTPUT_FIELD_ALL },
+ { "field_none", SCSI_ATTR_OUTPUT_FIELD_NONE },
+ { "field_desc", SCSI_ATTR_OUTPUT_FIELD_DESC },
+ { "field_num", SCSI_ATTR_OUTPUT_FIELD_NUM },
+ { "field_size", SCSI_ATTR_OUTPUT_FIELD_SIZE },
+ { "field_rw", SCSI_ATTR_OUTPUT_FIELD_RW },
+};
+
+int
+scsiattrib(struct cam_device *device, int argc, char **argv, char *combinedopt,
+ int retry_count, int timeout, int verbosemode, int err_recover)
+{
+ union ccb *ccb = NULL;
+ int attr_num = -1;
+#if 0
+ int num_attrs = 0;
+#endif
+ int start_attr = 0;
+ int cached_attr = 0;
+ int read_service_action = -1;
+ int read_attr = 0, write_attr = 0;
+ int element_address = 0;
+ int element_type = ELEMENT_TYPE_ALL;
+ int partition = 0;
+ int logical_volume = 0;
+ char *endptr;
+ uint8_t *data_buf = NULL;
+ uint32_t dxfer_len = UINT16_MAX - 1;
+ uint32_t valid_len;
+ uint32_t output_format;
+ STAILQ_HEAD(, scsi_attr_desc) write_attr_list;
+ int error = 0;
+ int c;
+
+ ccb = cam_getccb(device);
+ if (ccb == NULL) {
+ warnx("%s: error allocating CCB", __func__);
+ error = 1;
+ goto bailout;
+ }
+
+ bzero(&(&ccb->ccb_h)[1],
+ sizeof(union ccb) - sizeof(struct ccb_hdr));
+
+ STAILQ_INIT(&write_attr_list);
+
+ /*
+ * By default, when displaying attribute values, we trim out
+ * non-ASCII characters in ASCII fields. We display all fields
+ * (description, attribute number, attribute size, and readonly
+ * status). We default to displaying raw text.
+ *
+ * XXX KDM need to port this to stable/10 and newer FreeBSD
+ * versions that have iconv built in and can convert codesets.
+ */
+ output_format = SCSI_ATTR_OUTPUT_NONASCII_TRIM |
+ SCSI_ATTR_OUTPUT_FIELD_ALL |
+ SCSI_ATTR_OUTPUT_TEXT_RAW;
+
+ data_buf = malloc(dxfer_len);
+ if (data_buf == NULL) {
+ warn("%s: error allocating %u bytes", __func__, dxfer_len);
+ error = 1;
+ goto bailout;
+ }
+
+ while ((c = getopt(argc, argv, combinedopt)) != -1) {
+ switch (c) {
+ case 'a':
+ attr_num = strtol(optarg, &endptr, 0);
+ if (*endptr != '\0') {
+ warnx("%s: invalid attribute number %s",
+ __func__, optarg);
+ error = 1;
+ goto bailout;
+ }
+ start_attr = attr_num;
+ break;
+ case 'c':
+ cached_attr = 1;
+ break;
+ case 'e':
+ element_address = strtol(optarg, &endptr, 0);
+ if (*endptr != '\0') {
+ warnx("%s: invalid element address %s",
+ __func__, optarg);
+ error = 1;
+ goto bailout;
+ }
+ break;
+ case 'F': {
+ scsi_nv_status status;
+ scsi_attrib_output_flags new_outflags;
+ int entry_num = 0;
+ char *tmpstr;
+
+ if (isdigit(optarg[0])) {
+ output_format = strtoul(optarg, &endptr, 0);
+ if (*endptr != '\0') {
+ warnx("%s: invalid numeric output "
+ "format argument %s", __func__,
+ optarg);
+ error = 1;
+ goto bailout;
+ }
+ break;
+ }
+ new_outflags = SCSI_ATTR_OUTPUT_NONE;
+
+ while ((tmpstr = strsep(&optarg, ",")) != NULL) {
+ status = scsi_get_nv(output_format_map,
+ sizeof(output_format_map) /
+ sizeof(output_format_map[0]), tmpstr,
+ &entry_num, SCSI_NV_FLAG_IG_CASE);
+
+ if (status == SCSI_NV_FOUND)
+ new_outflags |=
+ output_format_map[entry_num].value;
+ else {
+ warnx("%s: %s format option %s",
+ __func__,
+ (status == SCSI_NV_AMBIGUOUS) ?
+ "ambiguous" : "invalid", tmpstr);
+ error = 1;
+ goto bailout;
+ }
+ }
+ output_format = new_outflags;
+ break;
+ }
+ case 'p':
+ partition = strtol(optarg, &endptr, 0);
+ if (*endptr != '\0') {
+ warnx("%s: invalid partition number %s",
+ __func__, optarg);
+ error = 1;
+ goto bailout;
+ }
+ break;
+ case 'r': {
+ scsi_nv_status status;
+ int entry_num = 0;
+
+ status = scsi_get_nv(sa_map, sizeof(sa_map) /
+ sizeof(sa_map[0]), optarg, &entry_num,
+ SCSI_NV_FLAG_IG_CASE);
+ if (status == SCSI_NV_FOUND)
+ read_service_action = sa_map[entry_num].value;
+ else {
+ warnx("%s: %s %s option %s", __func__,
+ (status == SCSI_NV_AMBIGUOUS) ?
+ "ambiguous" : "invalid", "service action",
+ optarg);
+ error = 1;
+ goto bailout;
+ }
+ read_attr = 1;
+ break;
+ }
+ case 's':
+ start_attr = strtol(optarg, &endptr, 0);
+ if (*endptr != '\0') {
+ warnx("%s: invalid starting attr argument %s",
+ __func__, optarg);
+ error = 1;
+ goto bailout;
+ }
+ break;
+ case 'T': {
+ scsi_nv_status status;
+ int entry_num = 0;
+
+ status = scsi_get_nv(elem_type_map,
+ sizeof(elem_type_map) / sizeof(elem_type_map[0]),
+ optarg, &entry_num, SCSI_NV_FLAG_IG_CASE);
+ if (status == SCSI_NV_FOUND)
+ element_type = elem_type_map[entry_num].value;
+ else {
+ warnx("%s: %s %s option %s", __func__,
+ (status == SCSI_NV_AMBIGUOUS) ?
+ "ambiguous" : "invalid", "element type",
+ optarg);
+ error = 1;
+ goto bailout;
+ }
+ break;
+ }
+ case 'w':
+ warnx("%s: writing attributes is not implemented yet",
+ __func__);
+ error = 1;
+ goto bailout;
+ break;
+ case 'V':
+ logical_volume = strtol(optarg, &endptr, 0);
+
+ if (*endptr != '\0') {
+ warnx("%s: invalid logical volume argument %s",
+ __func__, optarg);
+ error = 1;
+ goto bailout;
+ }
+ break;
+ default:
+ break;
+ }
+ }
+
+ /*
+ * Default to reading attributes
+ */
+ if (((read_attr == 0) && (write_attr == 0))
+ || ((read_attr != 0) && (write_attr != 0))) {
+ warnx("%s: Must specify either -r or -w", __func__);
+ error = 1;
+ goto bailout;
+ }
+
+ if (read_attr != 0) {
+ scsi_read_attribute(&ccb->csio,
+ /*retries*/ retry_count,
+ /*cbfcnp*/ NULL,
+ /*tag_action*/ MSG_SIMPLE_Q_TAG,
+ /*service_action*/ read_service_action,
+ /*element*/ element_address,
+ /*elem_type*/ element_type,
+ /*logical_volume*/ logical_volume,
+ /*partition*/ partition,
+ /*first_attribute*/ start_attr,
+ /*cache*/ cached_attr,
+ /*data_ptr*/ data_buf,
+ /*length*/ dxfer_len,
+ /*sense_len*/ SSD_FULL_SIZE,
+ /*timeout*/ timeout ? timeout : 60000);
+#if 0
+ } else {
+#endif
+
+ }
+
+ ccb->ccb_h.flags |= CAM_DEV_QFRZDIS;
+
+ if (err_recover != 0)
+ ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER;
+
+ if (cam_send_ccb(device, ccb) < 0) {
+ warn("error sending %s ATTRIBUTE", (read_attr != 0) ?
+ "READ" : "WRITE");
+
+ if (verbosemode != 0) {
+ cam_error_print(device, ccb, CAM_ESF_ALL,
+ CAM_EPF_ALL, stderr);
+ }
+
+ error = 1;
+ goto bailout;
+ }
+
+ if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
+ if (verbosemode != 0) {
+ cam_error_print(device, ccb, CAM_ESF_ALL,
+ CAM_EPF_ALL, stderr);
+ }
+ error = 1;
+ goto bailout;
+ }
+
+ if (read_attr == 0)
+ goto bailout;
+
+ valid_len = dxfer_len - ccb->csio.resid;
+
+ switch (read_service_action) {
+ case SRA_SA_ATTR_VALUES: {
+ uint32_t len_left, hdr_len, cur_len;
+ struct scsi_read_attribute_values *hdr;
+ struct scsi_mam_attribute_header *cur_id;
+ char error_str[512];
+ uint8_t *cur_pos;
+ struct sbuf *sb;
+
+ hdr = (struct scsi_read_attribute_values *)data_buf;
+
+ if (valid_len < sizeof(*hdr)) {
+ fprintf(stdout, "No attributes returned.\n");
+ error = 0;
+ goto bailout;
+ }
+
+ sb = sbuf_new_auto();
+ if (sb == NULL) {
+ warn("%s: Unable to allocate sbuf", __func__);
+ error = 1;
+ goto bailout;
+ }
+ /*
+ * XXX KDM grab more data if it is available.
+ */
+ hdr_len = scsi_4btoul(hdr->length);
+
+ for (len_left = MIN(valid_len, hdr_len),
+ cur_pos = &hdr->attribute_0[0]; len_left > sizeof(*cur_id);
+ len_left -= cur_len, cur_pos += cur_len) {
+ int cur_attr_num;
+ cur_id = (struct scsi_mam_attribute_header *)cur_pos;
+ cur_len = scsi_2btoul(cur_id->length) + sizeof(*cur_id);
+ cur_attr_num = scsi_2btoul(cur_id->id);
+
+ if ((attr_num != -1)
+ && (cur_attr_num != attr_num))
+ continue;
+
+ error = scsi_attrib_sbuf(sb, cur_id, len_left,
+ /*user_table*/ NULL, /*num_user_entries*/ 0,
+ /*prefer_user_table*/ 0, output_format, error_str,
+ sizeof(error_str));
+ if (error != 0) {
+ warnx("%s: %s", __func__, error_str);
+ sbuf_delete(sb);
+ error = 1;
+ goto bailout;
+ }
+ if (attr_num != -1)
+ break;
+ }
+
+ sbuf_finish(sb);
+ fprintf(stdout, "%s", sbuf_data(sb));
+ sbuf_delete(sb);
+ break;
+ }
+ case SRA_SA_SUPPORTED_ATTRS:
+ case SRA_SA_ATTR_LIST: {
+ uint32_t len_left, hdr_len;
+ struct scsi_attrib_list_header *hdr;
+ struct scsi_attrib_table_entry *entry = NULL;
+ const char *sa_name = "Supported Attributes";
+ const char *at_name = "Available Attributes";
+ int attr_id;
+ uint8_t *cur_id;
+
+ hdr = (struct scsi_attrib_list_header *)data_buf;
+ if (valid_len < sizeof(*hdr)) {
+ fprintf(stdout, "No %s\n",
+ (read_service_action == SRA_SA_SUPPORTED_ATTRS)?
+ sa_name : at_name);
+ error = 0;
+ goto bailout;
+ }
+ fprintf(stdout, "%s:\n",
+ (read_service_action == SRA_SA_SUPPORTED_ATTRS) ?
+ sa_name : at_name);
+ hdr_len = scsi_4btoul(hdr->length);
+ for (len_left = MIN(valid_len, hdr_len),
+ cur_id = &hdr->first_attr_0[0]; len_left > 1;
+ len_left -= sizeof(uint16_t), cur_id += sizeof(uint16_t)) {
+ attr_id = scsi_2btoul(cur_id);
+
+ if ((attr_num != -1)
+ && (attr_id != attr_num))
+ continue;
+
+ entry = scsi_get_attrib_entry(attr_id);
+ fprintf(stdout, "0x%.4x", attr_id);
+ if (entry == NULL)
+ fprintf(stdout, "\n");
+ else
+ fprintf(stdout, ": %s\n", entry->desc);
+
+ if (attr_num != -1)
+ break;
+ }
+ break;
+ }
+ case SRA_SA_PART_LIST:
+ case SRA_SA_LOG_VOL_LIST: {
+ struct scsi_attrib_lv_list *lv_list;
+ const char *partition_name = "Partition";
+ const char *lv_name = "Logical Volume";
+
+ if (valid_len < sizeof(*lv_list)) {
+ fprintf(stdout, "No %s list returned\n",
+ (read_service_action == SRA_SA_PART_LIST) ?
+ partition_name : lv_name);
+ error = 0;
+ goto bailout;
+ }
+
+ lv_list = (struct scsi_attrib_lv_list *)data_buf;
+
+ fprintf(stdout, "First %s: %d\n",
+ (read_service_action == SRA_SA_PART_LIST) ?
+ partition_name : lv_name,
+ lv_list->first_lv_number);
+ fprintf(stdout, "Number of %ss: %d\n",
+ (read_service_action == SRA_SA_PART_LIST) ?
+ partition_name : lv_name,
+ lv_list->num_logical_volumes);
+ break;
+ }
+ default:
+ break;
+ }
+bailout:
+ if (ccb != NULL)
+ cam_freeccb(ccb);
+
+ free(data_buf);
+
+ return (error);
+}
diff --git a/sbin/camcontrol/camcontrol.8 b/sbin/camcontrol/camcontrol.8
index 15e1862..b9bb248 100644
--- a/sbin/camcontrol/camcontrol.8
+++ b/sbin/camcontrol/camcontrol.8
@@ -298,6 +298,19 @@
.Op Fl T Ar res_type
.Op Fl U
.Nm
+.Ic attrib
+.Op device id
+.Op generic args
+.Aq Fl r Ar action | Fl w Ar attrib
+.Op Fl a Ar attr_num
+.Op Fl c
+.Op Fl e Ar elem_addr
+.Op Fl F Ar form1,form2
+.Op Fl p Ar part
+.Op Fl s Ar start_addr
+.Op Fl T Ar elem_type
+.Op Fl V Ar lv_num
+.Nm
.Ic help
.Sh DESCRIPTION
The
@@ -1822,6 +1835,129 @@ Register and Move request.
This option only applies to the Register and Move service action of the
Persistent Reserve Out command.
.El
+.It Ic attrib
+Issue the
+.Tn SCSI
+READ or WRITE ATTRIBUTE commands.
+These commands are used to read and write attributes in Medium Auxiliary
+Memory (MAM).
+The most common place Medium Auxiliary Memory is found is small flash chips
+included tape cartriges.
+For instance,
+.Tn LTO
+tapes have MAM.
+Either the
+.Fl r
+option or the
+.Fl w
+option must be specified.
+.Bl -tag -width 14n
+.It Fl r Ar action
+Specify the READ ATTRIBUTE service action.
+.Bl -tag -width 11n
+.It attr_values
+Issue the ATTRIBUTE VALUES service action.
+Read and decode the available attributes and their values.
+.It attr_list
+Issue the ATTRIBUTE LIST service action.
+List the attributes that are available to read and write.
+.It lv_list
+Issue the LOGICAL VOLUME LIST service action.
+List the available logical volumes in the MAM.
+.It part_list
+Issue the PARTITION LIST service action.
+List the available partitions in the MAM.
+.It supp_attr
+Issue the SUPPORTED ATTRIBUTES service action.
+List attributes that are supported for reading or writing.
+These attributes may or may not be currently present in the MAM.
+.El
+.It Fl w Ar attr
+Specify an attribute to write to the MAM.
+This option is not yet implemented.
+.It Fl a Ar num
+Specify the attribute number to display.
+This option only works with the attr_values, attr_list and supp_attr
+arguments to
+.Fl r .
+.It Fl c
+Display cached attributes.
+If the device supports this flag, it allows displaying attributes for the
+last piece of media loaded in the drive.
+.It Fl e Ar num
+Specify the element address.
+This is used for specifying which element number in a medium changer to
+access when reading attributes.
+The element number could be for a picker, portal, slot or drive.
+.It Fl F Ar form1,form2
+Specify the output format for the attribute values (attr_val) display as a
+comma separated list of options.
+The default output is currently set to field_all,nonascii_trim,text_raw.
+Once this code is ported to FreeBSD 10, any text fields will be converted
+from their codeset to the user's native codeset with
+.Xr iconv 3 .
+.Pp
+The text options are mutually exclusive; if you specify more than one, you
+will get unpredictable results.
+The nonascii options are also mutually exclusive.
+Most of the field options may be logically ORed together.
+.Bl -tag -width 12n
+.It text_esc
+Print text fields with non-ASCII characters escaped.
+.It text_raw
+Print text fields natively, with no codeset conversion.
+.It nonascii_esc
+If any non-ASCII characters occur in fields that are supposed to be ASCII,
+escape the non-ASCII characters.
+.It nonascii_trim
+If any non-ASCII characters occur in fields that are supposed to be ASCII,
+omit the non-ASCII characters.
+.It nonascii_raw
+If any non-ASCII characters occur in fields that are supposed to be ASCII,
+print them as they are.
+.It field_all
+Print all of the prefix fields: description, attribute number, attribute
+size, and the attribute's readonly status.
+If field_all is specified, specifying any other field options will not have
+an effect.
+.It field_none
+Print none of the prefix fields, and only print out the attribute value.
+If field_none is specified, specifying any other field options will result
+in those fields being printed.
+.It field_desc
+Print out the attribute description.
+.It field_num
+Print out the attribute number.
+.It field_size
+Print out the attribute size.
+.It field_rw
+Print out the attribute's readonly status.
+.El
+.It Fl p Ar part
+Specify the partition.
+When the media has multiple partitions, specifying different partition
+numbers allows seeing the values for each individual partition.
+.It Fl s Ar start_num
+Specify the starting attribute number.
+This requests that the target device return attribute information starting
+at the given number.
+.It Fl T Ar elem_type
+Specify the element type.
+For medium changer devices, this allows specifying the type the element
+referenced in the element address (
+.Fl e ) .
+Valid types are:
+.Dq all ,
+.Dq picker ,
+.Dq slot ,
+.Dq portal ,
+and
+.Dq drive .
+.El
+.It Fl V Ar vol_num
+Specify the number of the logical volume to operate on.
+If the media has multiple logical volumes, this will allow displaying
+or writing attributes on the given logical volume.
.It Ic help
Print out verbose usage information.
.El
@@ -2047,6 +2183,15 @@ current initiator will be unregistered from the target.
The reservation will be moved to relative target port 2 on the target
device.
The registration will persist across power losses.
+.Pp
+.Bd -literal -offset indent
+camcontrol attrib sa0 -v -i attr_values -p 1
+.Ed
+.Pp
+This will read and decode the attribute values from partition 1 on the tape
+in tape drive sa0, and will display any
+.Tn SCSI
+errors that result.
.Sh SEE ALSO
.Xr cam 3 ,
.Xr cam_cdbparse 3 ,
diff --git a/sbin/camcontrol/camcontrol.c b/sbin/camcontrol/camcontrol.c
index c0a1344..45826e7 100644
--- a/sbin/camcontrol/camcontrol.c
+++ b/sbin/camcontrol/camcontrol.c
@@ -98,7 +98,8 @@ typedef enum {
CAM_CMD_SANITIZE = 0x0000001f,
CAM_CMD_PERSIST = 0x00000020,
CAM_CMD_APM = 0x00000021,
- CAM_CMD_AAM = 0x00000022
+ CAM_CMD_AAM = 0x00000022,
+ CAM_CMD_ATTRIB = 0x00000023
} cam_cmdmask;
typedef enum {
@@ -224,6 +225,7 @@ static struct camcontrol_opts option_table[] = {
{"security", CAM_CMD_SECURITY, CAM_ARG_NONE, "d:e:fh:k:l:qs:T:U:y"},
{"hpa", CAM_CMD_HPA, CAM_ARG_NONE, "Pflp:qs:U:y"},
{"persist", CAM_CMD_PERSIST, CAM_ARG_NONE, "ai:I:k:K:o:ps:ST:U"},
+ {"attrib", CAM_CMD_ATTRIB, CAM_ARG_NONE, "a:ce:F:p:r:s:T:w:V:"},
#endif /* MINIMALISTIC */
{"help", CAM_CMD_USAGE, CAM_ARG_NONE, NULL},
{"-?", CAM_CMD_USAGE, CAM_ARG_NONE, NULL},
@@ -2566,12 +2568,11 @@ atahpa(struct cam_device *device, int retry_count, int timeout,
struct ata_params *ident_buf;
struct ccb_getdev cgd;
struct ata_set_max_pwd pwd;
- int error, confirm, quiet, c, action, actions, setpwd, persist;
+ int error, confirm, quiet, c, action, actions, persist;
int security, is48bit, pwdsize;
u_int64_t hpasize, maxsize;
actions = 0;
- setpwd = 0;
confirm = 0;
quiet = 0;
maxsize = 0;
@@ -8118,6 +8119,9 @@ usage(int printlong)
" camcontrol persist [dev_id][generic args] <-i action|-o action>\n"
" [-a][-I tid][-k key][-K sa_key][-p][-R rtp]\n"
" [-s scope][-S][-T type][-U]\n"
+" camcontrol attrib [dev_id][generic args] <-r action|-w attr>\n"
+" [-a attr_num][-c][-e elem][-F form1,form1]\n"
+" [-p part][-s start][-T type][-V vol]\n"
#endif /* MINIMALISTIC */
" camcontrol help\n");
if (!printlong)
@@ -8157,6 +8161,7 @@ usage(int printlong)
"fwdownload program firmware of the named device with the given image\n"
"security report or send ATA security commands to the named device\n"
"persist send the SCSI PERSISTENT RESERVE IN or OUT commands\n"
+"attrib send the SCSI READ or WRITE ATTRIBUTE commands\n"
"help this message\n"
"Device Identifiers:\n"
"bus:target specify the bus and target, lun defaults to 0\n"
@@ -8307,6 +8312,20 @@ usage(int printlong)
"-T res_type specify the reservation type: read_shared, wr_ex, rd_ex,\n"
" ex_ac, wr_ex_ro, ex_ac_ro, wr_ex_ar, ex_ac_ar\n"
"-U unregister the current initiator for register_move\n"
+"attrib arguments:\n"
+"-r action specify attr_values, attr_list, lv_list, part_list, or\n"
+" supp_attr\n"
+"-w attr specify an attribute to write, one -w argument per attr\n"
+"-a attr_num only display this attribute number\n"
+"-c get cached attributes\n"
+"-e elem_addr request attributes for the given element in a changer\n"
+"-F form1,form2 output format, comma separated list: text_esc, text_raw,\n"
+" nonascii_esc, nonascii_trim, nonascii_raw, field_all,\n"
+" field_none, field_desc, field_num, field_size, field_rw\n"
+"-p partition request attributes for the given partition\n"
+"-s start_attr request attributes starting at the given number\n"
+"-T elem_type specify the element type (used with -e)\n"
+"-V logical_vol specify the logical volume ID\n"
);
#endif /* MINIMALISTIC */
}
@@ -8651,6 +8670,11 @@ main(int argc, char **argv)
retry_count, timeout, arglist & CAM_ARG_VERBOSE,
arglist & CAM_ARG_ERR_RECOVER);
break;
+ case CAM_CMD_ATTRIB:
+ error = scsiattrib(cam_dev, argc, argv, combinedopt,
+ retry_count, timeout, arglist & CAM_ARG_VERBOSE,
+ arglist & CAM_ARG_ERR_RECOVER);
+ break;
#endif /* MINIMALISTIC */
case CAM_CMD_USAGE:
usage(1);
diff --git a/sbin/camcontrol/camcontrol.h b/sbin/camcontrol/camcontrol.h
index 7c249bf..582b6a3 100644
--- a/sbin/camcontrol/camcontrol.h
+++ b/sbin/camcontrol/camcontrol.h
@@ -66,6 +66,9 @@ int scsidoinquiry(struct cam_device *device, int argc, char **argv,
int scsipersist(struct cam_device *device, int argc, char **argv,
char *combinedopt, int retry_count, int timeout, int verbose,
int err_recover);
+int scsiattrib(struct cam_device *device, int argc, char **argv,
+ char *combinedopt, int retry_count, int timeout, int verbose,
+ int err_recover);
char *cget(void *hook, char *name);
int iget(void *hook, char *name);
void arg_put(void *hook, int letter, void *arg, int count, char *name);
diff --git a/sbin/camcontrol/persist.c b/sbin/camcontrol/persist.c
index bcc1073..c7e16c7 100644
--- a/sbin/camcontrol/persist.c
+++ b/sbin/camcontrol/persist.c
@@ -432,7 +432,7 @@ scsipersist(struct cam_device *device, int argc, char **argv, char *combinedopt,
uint32_t res_len = 0;
unsigned long rel_tgt_port = 0;
uint8_t *res_buf = NULL;
- int scope = SPR_LU_SCOPE, res_type = 0, key_set = 0, sa_key_set = 0;
+ int scope = SPR_LU_SCOPE, res_type = 0;
struct persist_transport_id *id, *id2;
STAILQ_HEAD(, persist_transport_id) transport_id_list;
uint64_t key = 0, sa_key = 0;
@@ -510,10 +510,8 @@ scsipersist(struct cam_device *device, int argc, char **argv, char *combinedopt,
}
if (c == 'k') {
key = tmpval;
- key_set = 1;
} else {
sa_key = tmpval;
- sa_key_set = 1;
}
break;
}
diff --git a/sbin/ccdconfig/Makefile.depend b/sbin/ccdconfig/Makefile.depend
index 5d7ba23..851372c 100644
--- a/sbin/ccdconfig/Makefile.depend
+++ b/sbin/ccdconfig/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/clri/Makefile.depend b/sbin/clri/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/clri/Makefile.depend
+++ b/sbin/clri/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/comcontrol/Makefile.depend b/sbin/comcontrol/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/comcontrol/Makefile.depend
+++ b/sbin/comcontrol/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/conscontrol/Makefile.depend b/sbin/conscontrol/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/conscontrol/Makefile.depend
+++ b/sbin/conscontrol/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ddb/Makefile.depend b/sbin/ddb/Makefile.depend
index 7a06b0f..a1ac545 100644
--- a/sbin/ddb/Makefile.depend
+++ b/sbin/ddb/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/devd/Makefile.depend b/sbin/devd/Makefile.depend
index ff511e6..eb9beeb 100644
--- a/sbin/devd/Makefile.depend
+++ b/sbin/devd/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/devfs/Makefile.depend b/sbin/devfs/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/devfs/Makefile.depend
+++ b/sbin/devfs/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/dhclient/Makefile.depend b/sbin/dhclient/Makefile.depend
index 45371c5..7de116d 100644
--- a/sbin/dhclient/Makefile.depend
+++ b/sbin/dhclient/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 22b21f1..7905813 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1845,12 +1845,16 @@ rewrite_client_leases(void)
leaseFile = fopen(path_dhclient_db, "w");
if (!leaseFile)
error("can't create %s: %m", path_dhclient_db);
- cap_rights_init(&rights, CAP_FSTAT, CAP_FSYNC, CAP_FTRUNCATE,
- CAP_SEEK, CAP_WRITE);
+ cap_rights_init(&rights, CAP_FCNTL, CAP_FSTAT, CAP_FSYNC,
+ CAP_FTRUNCATE, CAP_SEEK, CAP_WRITE);
if (cap_rights_limit(fileno(leaseFile), &rights) < 0 &&
errno != ENOSYS) {
error("can't limit lease descriptor: %m");
}
+ if (cap_fcntls_limit(fileno(leaseFile), CAP_FCNTL_GETFL) < 0 &&
+ errno != ENOSYS) {
+ error("can't limit lease descriptor fcntls: %m");
+ }
} else {
fflush(leaseFile);
rewind(leaseFile);
diff --git a/sbin/dmesg/Makefile.depend b/sbin/dmesg/Makefile.depend
index 7a06b0f..a1ac545 100644
--- a/sbin/dmesg/Makefile.depend
+++ b/sbin/dmesg/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/dump/Makefile.depend b/sbin/dump/Makefile.depend
index 725077b..26cae4e 100644
--- a/sbin/dump/Makefile.depend
+++ b/sbin/dump/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/dumpfs/Makefile.depend b/sbin/dumpfs/Makefile.depend
index 6ce72cc..99cf113 100644
--- a/sbin/dumpfs/Makefile.depend
+++ b/sbin/dumpfs/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c
index baf3d99..ce69ba1 100644
--- a/sbin/dumpfs/dumpfs.c
+++ b/sbin/dumpfs/dumpfs.c
@@ -165,7 +165,7 @@ dumpfs(const char *name)
fstime = afs.fs_time;
printf("magic\t%x (UFS2)\ttime\t%s",
afs.fs_magic, ctime(&fstime));
- printf("superblock location\t%jd\tid\t[ %x %x ]\n",
+ printf("superblock location\t%jd\tid\t[ %08x %08x ]\n",
(intmax_t)afs.fs_sblockloc, afs.fs_id[0], afs.fs_id[1]);
printf("ncg\t%d\tsize\t%jd\tblocks\t%jd\n",
afs.fs_ncg, (intmax_t)fssize, (intmax_t)afs.fs_dsize);
diff --git a/sbin/dumpon/Makefile.depend b/sbin/dumpon/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/dumpon/Makefile.depend
+++ b/sbin/dumpon/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/etherswitchcfg/Makefile.depend b/sbin/etherswitchcfg/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/etherswitchcfg/Makefile.depend
+++ b/sbin/etherswitchcfg/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/fdisk/Makefile.depend b/sbin/fdisk/Makefile.depend
index 5d7ba23..851372c 100644
--- a/sbin/fdisk/Makefile.depend
+++ b/sbin/fdisk/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/fdisk_pc98/Makefile.depend b/sbin/fdisk_pc98/Makefile.depend
index 25f093b..4c7271b 100644
--- a/sbin/fdisk_pc98/Makefile.depend
+++ b/sbin/fdisk_pc98/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
diff --git a/sbin/ffsinfo/Makefile.depend b/sbin/ffsinfo/Makefile.depend
index 6ce72cc..99cf113 100644
--- a/sbin/ffsinfo/Makefile.depend
+++ b/sbin/ffsinfo/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/fsck/Makefile.depend b/sbin/fsck/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/fsck/Makefile.depend
+++ b/sbin/fsck/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/fsck_ffs/Makefile.depend b/sbin/fsck_ffs/Makefile.depend
index 6ce72cc..99cf113 100644
--- a/sbin/fsck_ffs/Makefile.depend
+++ b/sbin/fsck_ffs/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/fsck_msdosfs/Makefile.depend b/sbin/fsck_msdosfs/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/fsck_msdosfs/Makefile.depend
+++ b/sbin/fsck_msdosfs/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/fsdb/Makefile.depend b/sbin/fsdb/Makefile.depend
index a0fbe50..a1c5d03 100644
--- a/sbin/fsdb/Makefile.depend
+++ b/sbin/fsdb/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/fsirand/Makefile.depend b/sbin/fsirand/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/fsirand/Makefile.depend
+++ b/sbin/fsirand/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/gbde/Makefile.depend b/sbin/gbde/Makefile.depend
index d71c69a..1d64ddb 100644
--- a/sbin/gbde/Makefile.depend
+++ b/sbin/gbde/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/cache/Makefile.depend b/sbin/geom/class/cache/Makefile.depend
index f680682..1c2c57c 100644
--- a/sbin/geom/class/cache/Makefile.depend
+++ b/sbin/geom/class/cache/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/concat/Makefile.depend b/sbin/geom/class/concat/Makefile.depend
index f680682..1c2c57c 100644
--- a/sbin/geom/class/concat/Makefile.depend
+++ b/sbin/geom/class/concat/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/eli/Makefile.depend b/sbin/geom/class/eli/Makefile.depend
index 02b0007..cbf4e19 100644
--- a/sbin/geom/class/eli/Makefile.depend
+++ b/sbin/geom/class/eli/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/eli/geom_eli.c b/sbin/geom/class/eli/geom_eli.c
index 7df4d90..502303d 100644
--- a/sbin/geom/class/eli/geom_eli.c
+++ b/sbin/geom/class/eli/geom_eli.c
@@ -423,7 +423,7 @@ eli_genkey_passphrase_prompt(struct gctl_req *req, bool new, char *passbuf,
for (;;) {
p = readpassphrase(
- new ? "Enter new passphrase:" : "Enter passphrase:",
+ new ? "Enter new passphrase: " : "Enter passphrase: ",
passbuf, passbufsize, RPP_ECHO_OFF | RPP_REQUIRE_TTY);
if (p == NULL) {
bzero(passbuf, passbufsize);
diff --git a/sbin/geom/class/journal/Makefile.depend b/sbin/geom/class/journal/Makefile.depend
index 20b8969..f04aa87 100644
--- a/sbin/geom/class/journal/Makefile.depend
+++ b/sbin/geom/class/journal/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/label/Makefile.depend b/sbin/geom/class/label/Makefile.depend
index f680682..1c2c57c 100644
--- a/sbin/geom/class/label/Makefile.depend
+++ b/sbin/geom/class/label/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/mirror/Makefile.depend b/sbin/geom/class/mirror/Makefile.depend
index 9c072c2..87303d7 100644
--- a/sbin/geom/class/mirror/Makefile.depend
+++ b/sbin/geom/class/mirror/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/mountver/Makefile.depend b/sbin/geom/class/mountver/Makefile.depend
index f680682..1c2c57c 100644
--- a/sbin/geom/class/mountver/Makefile.depend
+++ b/sbin/geom/class/mountver/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/multipath/Makefile.depend b/sbin/geom/class/multipath/Makefile.depend
index f680682..1c2c57c 100644
--- a/sbin/geom/class/multipath/Makefile.depend
+++ b/sbin/geom/class/multipath/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/multipath/gmultipath.8 b/sbin/geom/class/multipath/gmultipath.8
index 07ac01e..cdb2e8a 100644
--- a/sbin/geom/class/multipath/gmultipath.8
+++ b/sbin/geom/class/multipath/gmultipath.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 18, 2012
+.Dd June 11, 2015
.Dt GMULTIPATH 8
.Os
.Sh NAME
@@ -253,13 +253,13 @@ This I/O continues until an I/O is returned with
a generic I/O error or a "Nonexistent Device" error.
When this occurs, that path is marked FAIL, the next path
in a list is selected as active and the failed I/O reissued.
-In Active/Active mode all paths not marked FAIL may handle I/O same time.
+In Active/Active mode all paths not marked FAIL may handle I/O at the same time.
Requests are distributed between paths to equalize load.
-For capable devices it allows to utilize bandwidth of all paths.
-In Active/Read mode all paths not marked FAIL may handle reads same time,
-but unlike Active/Active only one path handles write requests at any
+For capable devices it allows to utilize the bandwidth of all paths.
+In Active/Read mode all paths not marked FAIL may handle reads at the same time,
+but unlike in Active/Active mode only one path handles write requests at any
point in time.
-It allows to closer follow original write request order if above layer
+It allows to closer follow the original write request order if the layer above
needs it for data consistency (not waiting for requisite write completion
before sending dependent write).
.Pp
@@ -269,9 +269,9 @@ GEOM class is given an opportunity to taste these new devices.
If a new
device has a
.Nm MULTIPATH
-on-disk metadata label, the device is used to either create a new
+on-disk metadata label, the device is either used to create a new
.Nm MULTIPATH
-GEOM, or been added the list of paths for an existing
+GEOM, or added to the list of paths for an existing
.Nm MULTIPATH
GEOM.
.Pp
@@ -281,7 +281,7 @@ and
.Xr mpt 4
based Fibre Channel disk devices.
For these devices, when a device disappears
-(due e.g., to a cable pull or power failure to a switch), the device is
+(due to e.g., a cable pull or power failure to a switch), the device is
proactively marked as gone and I/O to it failed.
This causes the
.Nm MULTIPATH
diff --git a/sbin/geom/class/nop/Makefile.depend b/sbin/geom/class/nop/Makefile.depend
index f680682..1c2c57c 100644
--- a/sbin/geom/class/nop/Makefile.depend
+++ b/sbin/geom/class/nop/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/part/Makefile.depend b/sbin/geom/class/part/Makefile.depend
index 40c0f44..4622764 100644
--- a/sbin/geom/class/part/Makefile.depend
+++ b/sbin/geom/class/part/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/raid/Makefile.depend b/sbin/geom/class/raid/Makefile.depend
index 9c072c2..87303d7 100644
--- a/sbin/geom/class/raid/Makefile.depend
+++ b/sbin/geom/class/raid/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/raid3/Makefile.depend b/sbin/geom/class/raid3/Makefile.depend
index 9c072c2..87303d7 100644
--- a/sbin/geom/class/raid3/Makefile.depend
+++ b/sbin/geom/class/raid3/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/sched/Makefile.depend b/sbin/geom/class/sched/Makefile.depend
index f680682..1c2c57c 100644
--- a/sbin/geom/class/sched/Makefile.depend
+++ b/sbin/geom/class/sched/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/shsec/Makefile.depend b/sbin/geom/class/shsec/Makefile.depend
index f680682..1c2c57c 100644
--- a/sbin/geom/class/shsec/Makefile.depend
+++ b/sbin/geom/class/shsec/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/stripe/Makefile.depend b/sbin/geom/class/stripe/Makefile.depend
index f680682..1c2c57c 100644
--- a/sbin/geom/class/stripe/Makefile.depend
+++ b/sbin/geom/class/stripe/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/class/virstor/Makefile.depend b/sbin/geom/class/virstor/Makefile.depend
index f680682..1c2c57c 100644
--- a/sbin/geom/class/virstor/Makefile.depend
+++ b/sbin/geom/class/virstor/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/geom/core/Makefile.depend b/sbin/geom/core/Makefile.depend
index 870b870..7762933 100644
--- a/sbin/geom/core/Makefile.depend
+++ b/sbin/geom/core/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ggate/ggatec/Makefile.depend b/sbin/ggate/ggatec/Makefile.depend
index 7127376..73bafe4 100644
--- a/sbin/ggate/ggatec/Makefile.depend
+++ b/sbin/ggate/ggatec/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ggate/ggated/Makefile.depend b/sbin/ggate/ggated/Makefile.depend
index b721496..9185091 100644
--- a/sbin/ggate/ggated/Makefile.depend
+++ b/sbin/ggate/ggated/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ggate/ggatel/Makefile.depend b/sbin/ggate/ggatel/Makefile.depend
index c8afe60..8ea3042 100644
--- a/sbin/ggate/ggatel/Makefile.depend
+++ b/sbin/ggate/ggatel/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/growfs/Makefile.depend b/sbin/growfs/Makefile.depend
index 0eab23f..58f9a33 100644
--- a/sbin/growfs/Makefile.depend
+++ b/sbin/growfs/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/gvinum/Makefile.depend b/sbin/gvinum/Makefile.depend
index c85fadc..30266ac 100644
--- a/sbin/gvinum/Makefile.depend
+++ b/sbin/gvinum/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/hastctl/Makefile.depend b/sbin/hastctl/Makefile.depend
index 3afd982..fa326bb 100644
--- a/sbin/hastctl/Makefile.depend
+++ b/sbin/hastctl/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/hastd/Makefile.depend b/sbin/hastd/Makefile.depend
index a6d7388..546ac40 100644
--- a/sbin/hastd/Makefile.depend
+++ b/sbin/hastd/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ifconfig/Makefile.depend b/sbin/ifconfig/Makefile.depend
index 1e768ab..768e8c6 100644
--- a/sbin/ifconfig/Makefile.depend
+++ b/sbin/ifconfig/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/init/Makefile.depend b/sbin/init/Makefile.depend
index 0d04553..10a95e7 100644
--- a/sbin/init/Makefile.depend
+++ b/sbin/init/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ipf/ipf/Makefile.depend b/sbin/ipf/ipf/Makefile.depend
index e0b84fd..4eb9aad 100644
--- a/sbin/ipf/ipf/Makefile.depend
+++ b/sbin/ipf/ipf/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ipf/ipfs/Makefile.depend b/sbin/ipf/ipfs/Makefile.depend
index 814419a..baac233 100644
--- a/sbin/ipf/ipfs/Makefile.depend
+++ b/sbin/ipf/ipfs/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ipf/ipfstat/Makefile.depend b/sbin/ipf/ipfstat/Makefile.depend
index a72e1f3..9efa7cf 100644
--- a/sbin/ipf/ipfstat/Makefile.depend
+++ b/sbin/ipf/ipfstat/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ipf/ipftest/Makefile.depend b/sbin/ipf/ipftest/Makefile.depend
index d47fed7..6167828 100644
--- a/sbin/ipf/ipftest/Makefile.depend
+++ b/sbin/ipf/ipftest/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ipf/ipmon/Makefile.depend b/sbin/ipf/ipmon/Makefile.depend
index 729899c..5bdb549 100644
--- a/sbin/ipf/ipmon/Makefile.depend
+++ b/sbin/ipf/ipmon/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ipf/ipnat/Makefile.depend b/sbin/ipf/ipnat/Makefile.depend
index aa41ba1..1bbd418 100644
--- a/sbin/ipf/ipnat/Makefile.depend
+++ b/sbin/ipf/ipnat/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ipf/ippool/Makefile.depend b/sbin/ipf/ippool/Makefile.depend
index a91cdf7..cc3cf4d 100644
--- a/sbin/ipf/ippool/Makefile.depend
+++ b/sbin/ipf/ippool/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ipf/ipresend/Makefile.depend b/sbin/ipf/ipresend/Makefile.depend
index ca9247f..9e0787f 100644
--- a/sbin/ipf/ipresend/Makefile.depend
+++ b/sbin/ipf/ipresend/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ipf/libipf/Makefile.depend b/sbin/ipf/libipf/Makefile.depend
index f9d0411..55e67ed 100644
--- a/sbin/ipf/libipf/Makefile.depend
+++ b/sbin/ipf/libipf/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ipfw/Makefile.depend b/sbin/ipfw/Makefile.depend
index 57e21da..94816f2 100644
--- a/sbin/ipfw/Makefile.depend
+++ b/sbin/ipfw/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/iscontrol/Makefile.depend b/sbin/iscontrol/Makefile.depend
index 45dda90..6e045828 100644
--- a/sbin/iscontrol/Makefile.depend
+++ b/sbin/iscontrol/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/kldconfig/Makefile.depend b/sbin/kldconfig/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/kldconfig/Makefile.depend
+++ b/sbin/kldconfig/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/kldload/Makefile.depend b/sbin/kldload/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/kldload/Makefile.depend
+++ b/sbin/kldload/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/kldstat/Makefile.depend b/sbin/kldstat/Makefile.depend
index 461e710..9cb890b 100644
--- a/sbin/kldstat/Makefile.depend
+++ b/sbin/kldstat/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/kldunload/Makefile.depend b/sbin/kldunload/Makefile.depend
index 461e710..9cb890b 100644
--- a/sbin/kldunload/Makefile.depend
+++ b/sbin/kldunload/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ldconfig/Makefile.depend b/sbin/ldconfig/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/ldconfig/Makefile.depend
+++ b/sbin/ldconfig/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/mca/Makefile b/sbin/mca/Makefile
deleted file mode 100644
index 2616725..0000000
--- a/sbin/mca/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# $FreeBSD$
-PROG= mca
-MAN= mca.8
-
-.include <bsd.prog.mk>
diff --git a/sbin/mca/Makefile.depend b/sbin/mca/Makefile.depend
deleted file mode 100644
index a839545..0000000
--- a/sbin/mca/Makefile.depend
+++ /dev/null
@@ -1,19 +0,0 @@
-# Autogenerated - do NOT edit!
-
-DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
-
-DEP_MACHINE := ${.PARSEFILE:E}
-
-DIRDEPS = \
- gnu/lib/libgcc \
- include \
- include/xlocale \
- lib/${CSU_DIR} \
- lib/libc \
-
-
-.include <dirdeps.mk>
-
-.if ${DEP_RELDIR} == ${_DEP_RELDIR}
-# local dependencies - needed for -jN in clean tree
-.endif
diff --git a/sbin/mca/mca.8 b/sbin/mca/mca.8
deleted file mode 100644
index e654d36..0000000
--- a/sbin/mca/mca.8
+++ /dev/null
@@ -1,73 +0,0 @@
-.\" Copyright (c) 2006 Marcel Moolenaar
-.\" All rights reserved.
-.\"
-.\" Redistribution and use in source and binary forms, with or without
-.\" modification, are permitted provided that the following conditions
-.\" are met:
-.\"
-.\" 1. Redistributions of source code must retain the above copyright
-.\" notice, this list of conditions and the following disclaimer.
-.\" 2. Redistributions in binary form must reproduce the above copyright
-.\" notice, this list of conditions and the following disclaimer in the
-.\" documentation and/or other materials provided with the distribution.
-.\"
-.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
-.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
-.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
-.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
-.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\" $FreeBSD$
-.\"
-.Dd February 11, 2006
-.Dt MCA 8
-.Os
-.Sh NAME
-.Nm mca
-.Nd "Machine Check Architecture control utility"
-.Sh SYNOPSIS
-.Nm
-.Op Fl d
-.Op Fl f Ar filename
-.Sh DESCRIPTION
-The
-.Nm
-utility provides minimal functionality to dump or display MCA records
-that were saved by the kernel during boot.
-The default behaviour of the
-.Nm
-utility is to display all new MCA records on stdout.
-When the
-.Fl d
-option is given, the records are dumped in binary form.
-The default file to which records are dumped is
-.Pa /var/log/mca.log .
-This can be changed by specifying the
-.Fl f
-option.
-New records are appended to the dump file.
-.Pp
-Previously dumped records can be displayed by giving the name of
-the dump file with the
-.Fl f
-option.
-.Sh FILES
-.Bl -tag -width ".Pa /var/log/mca.log" -compact
-.It Pa /var/log/mca.log
-default dump file
-.El
-.Sh HISTORY
-The
-.Nm
-utility appeared in
-.Fx 5.0
-for ia64.
-.Sh BUGS
-The development of the
-.Nm
-utility is still a work in progress.
diff --git a/sbin/mca/mca.c b/sbin/mca/mca.c
deleted file mode 100644
index ed7bcff..0000000
--- a/sbin/mca/mca.c
+++ /dev/null
@@ -1,547 +0,0 @@
-/*
- * Copyright (c) 2002 Marcel Moolenaar
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
-
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/sysctl.h>
-#include <sys/uuid.h>
-
-/*
- * Hack to make this compile on non-ia64 machines.
- */
-#ifdef __ia64__
-#include <machine/mca.h>
-#else
-#include "../../sys/ia64/include/mca.h"
-#endif
-
-#include <err.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <uuid.h>
-
-#define BCD(x) ((x >> 4) * 10 + (x & 15))
-
-#define HW_MCA_MAX_CPUID 255
-
-static const char hw_mca_count[] = "hw.mca.count";
-static const char hw_mca_first[] = "hw.mca.first";
-static const char hw_mca_last[] = "hw.mca.last";
-static const char hw_mca_recid[] = "hw.mca.%d.%u";
-
-static char default_dumpfile[] = "/var/log/mca.log";
-
-int fl_dump;
-char *file;
-
-static const char *
-severity(int error)
-{
-
- switch (error) {
- case MCA_RH_ERROR_RECOVERABLE:
- return ("recoverable");
- case MCA_RH_ERROR_FATAL:
- return ("fatal");
- case MCA_RH_ERROR_CORRECTED:
- return ("corrected");
- }
-
- return ("unknown");
-}
-
-static const char *
-uuid(uuid_t *id)
-{
- static char buffer[64];
- char *s;
-
- uuid_to_string(id, &s, NULL);
- strcpy(buffer, s);
- free(s);
- return (buffer);
-}
-
-static int
-show_value(int indent, const char *var, const char *fmt, ...)
-{
- va_list ap;
- int len;
-
- len = indent;
- while (indent--)
- putchar(' ');
- len += printf("<%s>", var);
- va_start(ap, fmt);
- len += vprintf(fmt, ap);
- len += printf("</%s>\n", var);
- return (len);
-}
-
-static size_t
-show_header(struct mca_record_header *rh)
-{
-
- printf(" <header>\n");
- show_value(4, "seqnr", "%lld", (long long)rh->rh_seqnr);
- show_value(4, "revision", "%d.%d", BCD(rh->rh_major),
- BCD(rh->rh_minor));
- show_value(4, "severity", "%s", severity(rh->rh_error));
- show_value(4, "length", "%lld", (long long)rh->rh_length);
- show_value(4, "date", "%d%02d/%02d/%02d",
- BCD(rh->rh_time[MCA_RH_TIME_CENT]),
- BCD(rh->rh_time[MCA_RH_TIME_YEAR]),
- BCD(rh->rh_time[MCA_RH_TIME_MON]),
- BCD(rh->rh_time[MCA_RH_TIME_MDAY]));
- show_value(4, "time", "%02d:%02d:%02d",
- BCD(rh->rh_time[MCA_RH_TIME_HOUR]),
- BCD(rh->rh_time[MCA_RH_TIME_MIN]),
- BCD(rh->rh_time[MCA_RH_TIME_SEC]));
- if (rh->rh_flags & MCA_RH_FLAGS_PLATFORM_ID)
- show_value(4, "platform", "%s", uuid(&rh->rh_platform));
- printf(" </header>\n");
- return (rh->rh_length);
-}
-
-static void
-show_cpu_mod(const char *what, int idx, struct mca_cpu_mod *cpu_mod)
-{
- printf(" <%s-%d>\n", what, idx);
- if (cpu_mod->cpu_mod_flags & MCA_CPU_MOD_FLAGS_INFO)
- show_value(8, "info", "0x%016llx",
- (long long)cpu_mod->cpu_mod_info);
- if (cpu_mod->cpu_mod_flags & MCA_CPU_MOD_FLAGS_REQID)
- show_value(8, "requester", "0x%016llx",
- (long long)cpu_mod->cpu_mod_reqid);
- if (cpu_mod->cpu_mod_flags & MCA_CPU_MOD_FLAGS_RSPID)
- show_value(8, "responder", "0x%016llx",
- (long long)cpu_mod->cpu_mod_rspid);
- if (cpu_mod->cpu_mod_flags & MCA_CPU_MOD_FLAGS_TGTID)
- show_value(8, "target", "0x%016llx",
- (long long)cpu_mod->cpu_mod_tgtid);
- if (cpu_mod->cpu_mod_flags & MCA_CPU_MOD_FLAGS_IP)
- show_value(8, "ip", "0x%016llx",
- (long long)cpu_mod->cpu_mod_ip);
- printf(" </%s-%d>\n", what, idx);
-}
-
-static void
-show_cpu(struct mca_cpu_record *cpu)
-{
- char var[16];
- struct mca_cpu_mod *mod;
- struct mca_cpu_cpuid *cpuid;
-#ifdef notyet
- struct mca_cpu_psi *psi;
-#endif
- int i, n;
-
- printf(" <cpu>\n");
-
- if (cpu->cpu_flags & MCA_CPU_FLAGS_ERRMAP)
- show_value(6, "errmap", "0x%016llx",
- (long long)cpu->cpu_errmap);
- if (cpu->cpu_flags & MCA_CPU_FLAGS_STATE)
- show_value(6, "state", "0x%016llx",
- (long long)cpu->cpu_state);
- if (cpu->cpu_flags & MCA_CPU_FLAGS_CR_LID)
- show_value(6, "cr_lid", "0x%016llx",
- (long long)cpu->cpu_cr_lid);
-
- mod = (struct mca_cpu_mod*)(cpu + 1);
- n = MCA_CPU_FLAGS_CACHE(cpu->cpu_flags);
- for (i = 0; i < n; i++)
- show_cpu_mod("cache", i, mod++);
- n = MCA_CPU_FLAGS_TLB(cpu->cpu_flags);
- for (i = 0; i < n; i++)
- show_cpu_mod("tlb", i, mod++);
- n = MCA_CPU_FLAGS_BUS(cpu->cpu_flags);
- for (i = 0; i < n; i++)
- show_cpu_mod("bus", i, mod++);
- n = MCA_CPU_FLAGS_REG(cpu->cpu_flags);
- for (i = 0; i < n; i++)
- show_cpu_mod("reg", i, mod++);
- n = MCA_CPU_FLAGS_MS(cpu->cpu_flags);
- for (i = 0; i < n; i++)
- show_cpu_mod("ms", i, mod++);
-
- cpuid = (struct mca_cpu_cpuid*)mod;
- for (i = 0; i < 6; i++) {
- sprintf(var, "cpuid-%d", i);
- show_value(6, var, "0x%016llx", (long long)cpuid->cpuid[i]);
- }
-
-#ifdef notyet
- psi = (struct mca_cpu_psi*)(cpuid + 1);
-#endif
- /* TODO: Dump PSI */
-
- printf(" </cpu>\n");
-}
-
-static void
-show_memory(struct mca_mem_record *mem)
-{
- printf(" <memory>\n");
-
- if (mem->mem_flags & MCA_MEM_FLAGS_STATUS)
- show_value(6, "status", "0x%016llx",
- (long long)mem->mem_status);
- if (mem->mem_flags & MCA_MEM_FLAGS_ADDR)
- show_value(6, "address", "0x%016llx",
- (long long)mem->mem_addr);
- if (mem->mem_flags & MCA_MEM_FLAGS_ADDRMASK)
- show_value(6, "mask", "0x%016llx",
- (long long)mem->mem_addrmask);
- if (mem->mem_flags & MCA_MEM_FLAGS_NODE)
- show_value(6, "node", "0x%04x", mem->mem_node);
- if (mem->mem_flags & MCA_MEM_FLAGS_CARD)
- show_value(6, "card", "0x%04x", mem->mem_card);
- if (mem->mem_flags & MCA_MEM_FLAGS_MODULE)
- show_value(6, "module", "0x%04x", mem->mem_module);
- if (mem->mem_flags & MCA_MEM_FLAGS_BANK)
- show_value(6, "bank", "0x%04x", mem->mem_bank);
- if (mem->mem_flags & MCA_MEM_FLAGS_DEVICE)
- show_value(6, "device", "0x%04x", mem->mem_device);
- if (mem->mem_flags & MCA_MEM_FLAGS_ROW)
- show_value(6, "row", "0x%04x", mem->mem_row);
- if (mem->mem_flags & MCA_MEM_FLAGS_COLUMN)
- show_value(6, "column", "0x%04x", mem->mem_column);
- if (mem->mem_flags & MCA_MEM_FLAGS_BITPOS)
- show_value(6, "bit", "0x%04x", mem->mem_bitpos);
- if (mem->mem_flags & MCA_MEM_FLAGS_REQID)
- show_value(6, "requester", "0x%016llx",
- (long long)mem->mem_reqid);
- if (mem->mem_flags & MCA_MEM_FLAGS_RSPID)
- show_value(6, "responder", "0x%016llx",
- (long long)mem->mem_rspid);
- if (mem->mem_flags & MCA_MEM_FLAGS_TGTID)
- show_value(6, "target", "0x%016llx",
- (long long)mem->mem_tgtid);
- if (mem->mem_flags & MCA_MEM_FLAGS_BUSDATA)
- show_value(6, "status", "0x%016llx",
- (long long)mem->mem_busdata);
- if (mem->mem_flags & MCA_MEM_FLAGS_OEM_ID)
- show_value(6, "oem", "%s", uuid(&mem->mem_oem_id));
- /* TODO: Dump OEM data */
-
- printf(" </memory>\n");
-}
-
-static void
-show_sel(void)
-{
- printf(" # SEL\n");
-}
-
-static void
-show_pci_bus(struct mca_pcibus_record *pcibus)
-{
- printf(" <pci-bus>\n");
-
- if (pcibus->pcibus_flags & MCA_PCIBUS_FLAGS_STATUS)
- show_value(6, "status", "0x%016llx",
- (long long)pcibus->pcibus_status);
- if (pcibus->pcibus_flags & MCA_PCIBUS_FLAGS_ERROR)
- show_value(6, "error", "0x%04x", pcibus->pcibus_error);
- if (pcibus->pcibus_flags & MCA_PCIBUS_FLAGS_BUS)
- show_value(6, "bus", "0x%04x", pcibus->pcibus_bus);
- if (pcibus->pcibus_flags & MCA_PCIBUS_FLAGS_ADDR)
- show_value(6, "address", "0x%016llx",
- (long long)pcibus->pcibus_addr);
- if (pcibus->pcibus_flags & MCA_PCIBUS_FLAGS_DATA)
- show_value(6, "data", "0x%016llx",
- (long long)pcibus->pcibus_data);
- if (pcibus->pcibus_flags & MCA_PCIBUS_FLAGS_CMD)
- show_value(6, "cmd", "0x%016llx",
- (long long)pcibus->pcibus_cmd);
- if (pcibus->pcibus_flags & MCA_PCIBUS_FLAGS_REQID)
- show_value(6, "requester", "0x%016llx",
- (long long)pcibus->pcibus_reqid);
- if (pcibus->pcibus_flags & MCA_PCIBUS_FLAGS_RSPID)
- show_value(6, "responder", "0x%016llx",
- (long long)pcibus->pcibus_rspid);
- if (pcibus->pcibus_flags & MCA_PCIBUS_FLAGS_TGTID)
- show_value(6, "target", "0x%016llx",
- (long long)pcibus->pcibus_tgtid);
- if (pcibus->pcibus_flags & MCA_PCIBUS_FLAGS_OEM_ID)
- show_value(6, "oem", "%s", uuid(&pcibus->pcibus_oem_id));
- /* TODO: Dump OEM data */
-
- printf(" </pci-bus>\n");
-}
-
-static void
-show_smbios(void)
-{
- printf(" # SMBIOS\n");
-}
-
-static void
-show_pci_dev(struct mca_pcidev_record *pcidev)
-{
- printf(" <pci-dev>\n");
-
- if (pcidev->pcidev_flags & MCA_PCIDEV_FLAGS_STATUS)
- show_value(6, "status", "0x%016llx",
- (long long)pcidev->pcidev_status);
- if (pcidev->pcidev_flags & MCA_PCIDEV_FLAGS_INFO) {
- show_value(6, "vendor", "0x%04x",
- pcidev->pcidev_info.info_vendor);
- show_value(6, "device", "0x%04x",
- pcidev->pcidev_info.info_device);
- show_value(6, "class", "0x%06x",
- MCA_PCIDEV_INFO_CLASS(pcidev->pcidev_info.info_ccfn));
- show_value(6, "function", "0x%02x",
- MCA_PCIDEV_INFO_FUNCTION(pcidev->pcidev_info.info_ccfn));
- show_value(6, "slot", "0x%02x", pcidev->pcidev_info.info_slot);
- show_value(6, "bus", "0x%04x", pcidev->pcidev_info.info_bus);
- show_value(6, "segment", "0x%04x",
- pcidev->pcidev_info.info_segment);
- }
- /* TODO: dump registers */
- /* TODO: Dump OEM data */
-
- printf(" </pci-dev>\n");
-}
-
-static void
-show_generic(void)
-{
- printf(" # GENERIC\n");
-}
-
-static size_t
-show_section(struct mca_section_header *sh)
-{
- static uuid_t uuid_cpu = MCA_UUID_CPU;
- static uuid_t uuid_memory = MCA_UUID_MEMORY;
- static uuid_t uuid_sel = MCA_UUID_SEL;
- static uuid_t uuid_pci_bus = MCA_UUID_PCI_BUS;
- static uuid_t uuid_smbios = MCA_UUID_SMBIOS;
- static uuid_t uuid_pci_dev = MCA_UUID_PCI_DEV;
- static uuid_t uuid_generic = MCA_UUID_GENERIC;
-
- printf(" <section>\n");
- show_value(4, "uuid", "%s", uuid(&sh->sh_uuid));
- show_value(4, "revision", "%d.%d", BCD(sh->sh_major),
- BCD(sh->sh_minor));
-
- if (uuid_equal(&sh->sh_uuid, &uuid_cpu, NULL))
- show_cpu((void*)(sh + 1));
- else if (uuid_equal(&sh->sh_uuid, &uuid_memory, NULL))
- show_memory((void*)(sh + 1));
- else if (uuid_equal(&sh->sh_uuid, &uuid_sel, NULL))
- show_sel();
- else if (uuid_equal(&sh->sh_uuid, &uuid_pci_bus, NULL))
- show_pci_bus((void*)(sh + 1));
- else if (uuid_equal(&sh->sh_uuid, &uuid_smbios, NULL))
- show_smbios();
- else if (uuid_equal(&sh->sh_uuid, &uuid_pci_dev, NULL))
- show_pci_dev((void*)(sh + 1));
- else if (uuid_equal(&sh->sh_uuid, &uuid_generic, NULL))
- show_generic();
-
- printf(" </section>\n");
- return (sh->sh_length);
-}
-
-static void
-show(char *data, const char *mib)
-{
- size_t reclen, seclen;
-
- if (mib != NULL)
- printf("<!-- MIB: %s -->\n", mib);
-
- printf("<record>\n");
- reclen = show_header((void*)data) - sizeof(struct mca_record_header);
- data += sizeof(struct mca_record_header);
- while (reclen > sizeof(struct mca_section_header)) {
- seclen = show_section((void*)data);
- reclen -= seclen;
- data += seclen;
- }
- printf("</record>\n");
-}
-
-static void
-showall(char *buf, size_t buflen)
-{
- struct mca_record_header *rh;
- size_t reclen;
-
- do {
- if (buflen < sizeof(struct mca_record_header))
- return;
-
- rh = (void*)buf;
- reclen = rh->rh_length;
- if (buflen < reclen)
- return;
-
- show(buf, NULL);
-
- buf += reclen;
- buflen -= reclen;
- }
- while (1);
-}
-
-static void
-dump(char *data)
-{
- struct mca_record_header *rh;
- const char *fn;
- int fd;
-
- rh = (void*)data;
- fn = (file) ? file : default_dumpfile;
- fd = open(fn, O_WRONLY|O_CREAT|O_APPEND, 0660);
- if (fd == -1)
- err(2, "open(%s)", fn);
- if (write(fd, (void*)rh, rh->rh_length) == -1)
- err(2, "write(%s)", fn);
- close(fd);
-}
-
-static void
-usage(void)
-{
-
- fprintf(stderr, "usage: mca [-df]\n");
- exit (1);
-}
-
-int
-main(int argc, char **argv)
-{
- char mib[32];
- char *buf;
- size_t len;
- int ch, error, fd;
- int count, first, last, cpuid;
-
- while ((ch = getopt(argc, argv, "df:")) != -1) {
- switch(ch) {
- case 'd': /* dump */
- fl_dump = 1;
- break;
- case 'f':
- if (file)
- free(file); /* XXX complain! */
- file = strdup(optarg);
- break;
- default:
- usage();
- }
- }
-
- argc -= optind;
- argv += optind;
-
- if (file == NULL || fl_dump) {
- len = sizeof(count);
- if (sysctlbyname(hw_mca_count, &count, &len, NULL, 0) == -1)
- err(1, hw_mca_count);
-
- if (count == 0)
- errx(0, "no error records found");
-
- len = sizeof(first);
- if (sysctlbyname(hw_mca_first, &first, &len, NULL, 0) == -1)
- err(1, hw_mca_first);
-
- len = sizeof(last);
- if (sysctlbyname(hw_mca_last, &last, &len, NULL, 0) == -1)
- err(1, hw_mca_last);
-
- cpuid = 0;
- error = 0;
- while (count && first <= last) {
- do {
- sprintf(mib, hw_mca_recid, first, cpuid);
- len = 0;
- ch = sysctlbyname(mib, NULL, &len, NULL, 0);
- error = (ch == -1) ? errno : 0;
- if (error != ENOENT)
- break;
- cpuid++;
- } while (cpuid <= HW_MCA_MAX_CPUID);
- if (error == ENOENT && cpuid > HW_MCA_MAX_CPUID) {
- first++;
- cpuid = 0;
- continue;
- }
- if (error)
- errc(1, error, "%s(1)", mib);
-
- buf = malloc(len);
- if (buf == NULL)
- err(1, "buffer");
-
- if (sysctlbyname(mib, buf, &len, NULL, 0) == -1)
- err(1, "%s(2)", mib);
-
- if (fl_dump)
- dump(buf);
- else
- show(buf, mib);
-
- free(buf);
- count--;
- if (cpuid == HW_MCA_MAX_CPUID) {
- first++;
- cpuid = 0;
- } else
- cpuid++;
- }
- } else {
- fd = open(file, O_RDONLY);
- if (fd == -1)
- err(1, "open(%s)", file);
-
- len = lseek(fd, 0LL, SEEK_END);
- buf = mmap(NULL, len, PROT_READ, 0U, fd, 0LL);
- if (buf == MAP_FAILED)
- err(1, "mmap(%s)", file);
-
- showall(buf, len);
-
- munmap(buf, len);
- close(fd);
- }
-
- return (0);
-}
diff --git a/sbin/md5/Makefile.depend b/sbin/md5/Makefile.depend
index c0953ba..064e492 100644
--- a/sbin/md5/Makefile.depend
+++ b/sbin/md5/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/mdconfig/Makefile.depend b/sbin/mdconfig/Makefile.depend
index dd4a96f..bfd9ff6 100644
--- a/sbin/mdconfig/Makefile.depend
+++ b/sbin/mdconfig/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/mdmfs/Makefile.depend b/sbin/mdmfs/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/mdmfs/Makefile.depend
+++ b/sbin/mdmfs/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/mknod/Makefile.depend b/sbin/mknod/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/mknod/Makefile.depend
+++ b/sbin/mknod/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/mksnap_ffs/Makefile.depend b/sbin/mksnap_ffs/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/mksnap_ffs/Makefile.depend
+++ b/sbin/mksnap_ffs/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/mount/Makefile.depend b/sbin/mount/Makefile.depend
index 0eab23f..58f9a33 100644
--- a/sbin/mount/Makefile.depend
+++ b/sbin/mount/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/mount_cd9660/Makefile.depend b/sbin/mount_cd9660/Makefile.depend
index 467d7eb..5a8df4c 100644
--- a/sbin/mount_cd9660/Makefile.depend
+++ b/sbin/mount_cd9660/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/mount_fusefs/Makefile.depend b/sbin/mount_fusefs/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/mount_fusefs/Makefile.depend
+++ b/sbin/mount_fusefs/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/mount_msdosfs/Makefile.depend b/sbin/mount_msdosfs/Makefile.depend
index 9a6cb3c..af10867 100644
--- a/sbin/mount_msdosfs/Makefile.depend
+++ b/sbin/mount_msdosfs/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/mount_nfs/Makefile.depend b/sbin/mount_nfs/Makefile.depend
index f0ca83a..c0b7a14 100644
--- a/sbin/mount_nfs/Makefile.depend
+++ b/sbin/mount_nfs/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/mount_nullfs/Makefile.depend b/sbin/mount_nullfs/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/mount_nullfs/Makefile.depend
+++ b/sbin/mount_nullfs/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/mount_udf/Makefile.depend b/sbin/mount_udf/Makefile.depend
index 7c6a142..51cf539 100644
--- a/sbin/mount_udf/Makefile.depend
+++ b/sbin/mount_udf/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/mount_unionfs/Makefile.depend b/sbin/mount_unionfs/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/mount_unionfs/Makefile.depend
+++ b/sbin/mount_unionfs/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/natd/Makefile.depend b/sbin/natd/Makefile.depend
index 88214e1..3418575 100644
--- a/sbin/natd/Makefile.depend
+++ b/sbin/natd/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/newfs/Makefile.depend b/sbin/newfs/Makefile.depend
index f5ecca9..24f47f3 100644
--- a/sbin/newfs/Makefile.depend
+++ b/sbin/newfs/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/newfs_msdos/Makefile.depend b/sbin/newfs_msdos/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/newfs_msdos/Makefile.depend
+++ b/sbin/newfs_msdos/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/nfsiod/Makefile.depend b/sbin/nfsiod/Makefile.depend
index 461e710..9cb890b 100644
--- a/sbin/nfsiod/Makefile.depend
+++ b/sbin/nfsiod/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/nos-tun/Makefile.depend b/sbin/nos-tun/Makefile.depend
index 007ffdd..54c1f6f 100644
--- a/sbin/nos-tun/Makefile.depend
+++ b/sbin/nos-tun/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/nvmecontrol/Makefile.depend b/sbin/nvmecontrol/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/nvmecontrol/Makefile.depend
+++ b/sbin/nvmecontrol/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/pfctl/Makefile.depend b/sbin/pfctl/Makefile.depend
index 812d0c2..0113da6 100644
--- a/sbin/pfctl/Makefile.depend
+++ b/sbin/pfctl/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/pflogd/Makefile.depend b/sbin/pflogd/Makefile.depend
index 2fabd86..268320b 100644
--- a/sbin/pflogd/Makefile.depend
+++ b/sbin/pflogd/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ping/Makefile.depend b/sbin/ping/Makefile.depend
index c9d90b8..35832c2 100644
--- a/sbin/ping/Makefile.depend
+++ b/sbin/ping/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/ping6/Makefile.depend b/sbin/ping6/Makefile.depend
index 056a764..c87ecaf 100644
--- a/sbin/ping6/Makefile.depend
+++ b/sbin/ping6/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/quotacheck/Makefile.depend b/sbin/quotacheck/Makefile.depend
index 0eab23f..58f9a33 100644
--- a/sbin/quotacheck/Makefile.depend
+++ b/sbin/quotacheck/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/rcorder/Makefile.depend b/sbin/rcorder/Makefile.depend
index 0eab23f..58f9a33 100644
--- a/sbin/rcorder/Makefile.depend
+++ b/sbin/rcorder/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/reboot/Makefile.depend b/sbin/reboot/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/reboot/Makefile.depend
+++ b/sbin/reboot/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/recoverdisk/Makefile.depend b/sbin/recoverdisk/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/recoverdisk/Makefile.depend
+++ b/sbin/recoverdisk/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/resolvconf/Makefile.depend b/sbin/resolvconf/Makefile.depend
index 11aba52..f80275d 100644
--- a/sbin/resolvconf/Makefile.depend
+++ b/sbin/resolvconf/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/restore/Makefile.depend b/sbin/restore/Makefile.depend
index 725077b..26cae4e 100644
--- a/sbin/restore/Makefile.depend
+++ b/sbin/restore/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/route/Makefile.depend b/sbin/route/Makefile.depend
index 26a5ca9..a6497f2 100644
--- a/sbin/route/Makefile.depend
+++ b/sbin/route/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/routed/Makefile.depend b/sbin/routed/Makefile.depend
index 2ceda9e..9807567d 100644
--- a/sbin/routed/Makefile.depend
+++ b/sbin/routed/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
diff --git a/sbin/routed/rtquery/Makefile.depend b/sbin/routed/rtquery/Makefile.depend
index a2bd391..1dd2697 100644
--- a/sbin/routed/rtquery/Makefile.depend
+++ b/sbin/routed/rtquery/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/rtsol/Makefile.depend b/sbin/rtsol/Makefile.depend
index 007ffdd..54c1f6f 100644
--- a/sbin/rtsol/Makefile.depend
+++ b/sbin/rtsol/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/savecore/Makefile.depend b/sbin/savecore/Makefile.depend
index 2822d44..952944d 100644
--- a/sbin/savecore/Makefile.depend
+++ b/sbin/savecore/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/sconfig/Makefile.depend b/sbin/sconfig/Makefile.depend
index a839545..f52ca95 100644
--- a/sbin/sconfig/Makefile.depend
+++ b/sbin/sconfig/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
diff --git a/sbin/setkey/Makefile.depend b/sbin/setkey/Makefile.depend
index 68c2ae32..9764245 100644
--- a/sbin/setkey/Makefile.depend
+++ b/sbin/setkey/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/shutdown/Makefile.depend b/sbin/shutdown/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/shutdown/Makefile.depend
+++ b/sbin/shutdown/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/spppcontrol/Makefile.depend b/sbin/spppcontrol/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/spppcontrol/Makefile.depend
+++ b/sbin/spppcontrol/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/sunlabel/Makefile.depend b/sbin/sunlabel/Makefile.depend
index 25f093b..4c7271b 100644
--- a/sbin/sunlabel/Makefile.depend
+++ b/sbin/sunlabel/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
diff --git a/sbin/swapon/Makefile.depend b/sbin/swapon/Makefile.depend
index 0eab23f..58f9a33 100644
--- a/sbin/swapon/Makefile.depend
+++ b/sbin/swapon/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/sysctl/Makefile.depend b/sbin/sysctl/Makefile.depend
index f4b5142..3646e2e 100644
--- a/sbin/sysctl/Makefile.depend
+++ b/sbin/sysctl/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/tunefs/Makefile.depend b/sbin/tunefs/Makefile.depend
index 6ce72cc..99cf113 100644
--- a/sbin/tunefs/Makefile.depend
+++ b/sbin/tunefs/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
diff --git a/sbin/umount/Makefile.depend b/sbin/umount/Makefile.depend
index c3bc1bd..ddd5dbd 100644
--- a/sbin/umount/Makefile.depend
+++ b/sbin/umount/Makefile.depend
@@ -1,3 +1,4 @@
+# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
OpenPOWER on IntegriCloud