From owner-p4-projects@FreeBSD.ORG Mon Aug 21 17:42:23 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0EFFE16A4F5; Mon, 21 Aug 2006 17:42:23 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C194A16A4E8 for ; Mon, 21 Aug 2006 17:42:22 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E58DF43D8B for ; Mon, 21 Aug 2006 17:42:04 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k7LHg4UR022228 for ; Mon, 21 Aug 2006 17:42:04 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k7LHg4DX022225 for perforce@freebsd.org; Mon, 21 Aug 2006 17:42:04 GMT (envelope-from imp@freebsd.org) Date: Mon, 21 Aug 2006 17:42:04 GMT Message-Id: <200608211742.k7LHg4DX022225@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 104701 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Aug 2006 17:42:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=104701 Change 104701 by imp@imp_paco-paco on 2006/08/21 17:41:54 IFC @104700 Affected files ... .. //depot/projects/arm/src/bin/ps/ps.1#3 integrate .. //depot/projects/arm/src/lib/libc/arm/net/htonl.S#2 integrate .. //depot/projects/arm/src/lib/libc/arm/net/htons.S#2 integrate .. //depot/projects/arm/src/lib/libc/arm/net/ntohl.S#2 integrate .. //depot/projects/arm/src/lib/libc/arm/net/ntohs.S#2 integrate .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#6 integrate .. //depot/projects/arm/src/sbin/camcontrol/camcontrol.8#2 integrate .. //depot/projects/arm/src/sbin/camcontrol/camcontrol.c#2 integrate .. //depot/projects/arm/src/sbin/dhclient/dhclient.8#3 integrate .. //depot/projects/arm/src/sbin/dhclient/dhclient.c#3 integrate .. //depot/projects/arm/src/share/man/man9/lock.9#2 integrate .. //depot/projects/arm/src/sys/cam/scsi/scsi_all.c#4 integrate .. //depot/projects/arm/src/sys/cam/scsi/scsi_all.h#3 integrate .. //depot/projects/arm/src/sys/dev/iicbus/if_ic.c#4 integrate .. //depot/projects/arm/src/sys/dev/iicbus/iicbb.c#4 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_ioctl.h#7 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_pci.c#13 integrate .. //depot/projects/arm/src/sys/sys/sysctl.h#11 integrate .. //depot/projects/arm/src/sys/ufs/ffs/ffs_snapshot.c#13 integrate .. //depot/projects/arm/src/sys/vm/vm_object.c#14 integrate .. //depot/projects/arm/src/sys/vm/vm_page.c#18 integrate .. //depot/projects/arm/src/sys/vm/vm_pageq.c#9 integrate .. //depot/projects/arm/src/sys/vm/vm_zeroidle.c#5 integrate .. //depot/projects/arm/src/usr.sbin/sysinstall/devices.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sysinstall/install.c#2 integrate Differences ... ==== //depot/projects/arm/src/bin/ps/ps.1#3 (text+ko) ==== @@ -27,9 +27,9 @@ .\" SUCH DAMAGE. .\" .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 -.\" $FreeBSD: src/bin/ps/ps.1,v 1.87 2006/08/18 14:12:38 yar Exp $ +.\" $FreeBSD: src/bin/ps/ps.1,v 1.88 2006/08/21 03:09:12 yar Exp $ .\" -.Dd August 18, 2006 +.Dd August 21, 2006 .Dt PS 1 .Os .Sh NAME @@ -181,7 +181,8 @@ list of keywords specified. The last keyword in the list may be appended with an equals .Pq Ql = -sign and a string spanning the rest of the argument. +sign and a string that spans the rest of the argument and can contain +space and comma characters. This causes the printed header to use the specified string instead of the standard header. Multiple keywords may also be given in the form of more than one ==== //depot/projects/arm/src/lib/libc/arm/net/htonl.S#2 (text+ko) ==== @@ -37,12 +37,14 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/arm/net/htonl.S,v 1.1 2004/05/14 12:04:30 cognet Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/arm/net/htonl.S,v 1.2 2006/08/21 14:42:47 cognet Exp $"); _ENTRY(_C_LABEL(htonl)) _PROF_PROLOGUE +#ifndef __ARMEB__ eor r1, r0, r0, ror #16 bic r1, r1, #0x00FF0000 mov r0, r0, ror #8 eor r0, r0, r1, lsr #8 +#endif mov pc, lr ==== //depot/projects/arm/src/lib/libc/arm/net/htons.S#2 (text+ko) ==== @@ -37,11 +37,13 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/arm/net/htons.S,v 1.1 2004/05/14 12:04:30 cognet Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/arm/net/htons.S,v 1.2 2006/08/21 14:42:47 cognet Exp $"); _ENTRY(_C_LABEL(htons)) _PROF_PROLOGUE +#ifndef __ARMEB__ and r1, r0, #0xff mov r0, r0, lsr #8 orr r0, r0, r1, lsl #8 +#endif mov pc, lr ==== //depot/projects/arm/src/lib/libc/arm/net/ntohl.S#2 (text+ko) ==== @@ -37,12 +37,14 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/arm/net/ntohl.S,v 1.1 2004/05/14 12:04:30 cognet Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/arm/net/ntohl.S,v 1.2 2006/08/21 14:42:47 cognet Exp $"); _ENTRY(_C_LABEL(ntohl)) _PROF_PROLOGUE +#ifndef __ARMEB__ eor r1, r0, r0, ror #16 bic r1, r1, #0x00FF0000 mov r0, r0, ror #8 eor r0, r0, r1, lsr #8 +#endif mov pc, lr ==== //depot/projects/arm/src/lib/libc/arm/net/ntohs.S#2 (text+ko) ==== @@ -37,11 +37,13 @@ */ #include -__FBSDID("$FreeBSD: src/lib/libc/arm/net/ntohs.S,v 1.1 2004/05/14 12:04:30 cognet Exp $"); +__FBSDID("$FreeBSD: src/lib/libc/arm/net/ntohs.S,v 1.2 2006/08/21 14:42:47 cognet Exp $"); _ENTRY(_C_LABEL(ntohs)) _PROF_PROLOGUE +#ifndef __ARMEB__ and r1, r0, #0xff mov r0, r0, lsr #8 orr r0, r0, r1, lsl #8 +#endif mov pc, lr ==== //depot/projects/arm/src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#6 (text+ko) ==== @@ -3,7 +3,7 @@ The &os; Project - $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.961 2006/08/17 05:16:15 gshapiro Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.962 2006/08/21 00:59:40 bmah Exp $ 2000 @@ -1557,7 +1557,10 @@ &merged; IPFilter has been updated from - 4.1.8 to 4.1.10. + 4.1.8 to 4.1.13. + + less has been updated from v381 + to v394. OpenSSH has been updated from 4.2p1 to 4.3p1. ==== //depot/projects/arm/src/sbin/camcontrol/camcontrol.8#2 (text+ko) ==== @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 1998, 1999, 2000, 2002, 2005 Kenneth D. Merry. +.\" Copyright (c) 1998, 1999, 2000, 2002, 2005, 2006 Kenneth D. Merry. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/sbin/camcontrol/camcontrol.8,v 1.41 2005/06/14 11:24:55 ru Exp $ +.\" $FreeBSD: src/sbin/camcontrol/camcontrol.8,v 1.42 2006/08/21 13:24:49 ken Exp $ .\" .Dd September 14, 1998 .Dt CAMCONTROL 8 @@ -59,6 +59,13 @@ .Op Fl S .Op Fl R .Nm +.Ic reportluns +.Op device id +.Op generic args +.Op Fl c +.Op Fl l +.Op Fl r Ar reporttype +.Nm .Ic start .Op device id .Op generic args @@ -266,6 +273,37 @@ .It Fl R Print out transfer rate information. .El +.It Ic reportluns +Send the SCSI REPORT LUNS (0xA0) command to the given device. +By default, +.Nm +will print out the list of logical units (LUNs) supported by the target device. +There are a couple of options to modify the output: +.Bl -tag -width 01234567890123 +.It Fl c +Just print out a count of LUNs, not the actual LUN numbers. +.It Fl l +Just print out the LUNs, and don't print out the count. +.It Fl r Ar reporttype +Specify the type of report to request from the target: +.Bl -tag -width 012345678 +.It default +Return the default report. +This is the +.Nm +default. +Most targets will support this report if they support the REPORT LUNS +command. +.It wellknown +Return only well known LUNs. +.It all +Return all available LUNs. +.El +.El +.Pp +.Nm +will try to print out LUN numbers in a reasonable format. +It can understand the peripheral, flat, LUN and extended LUN formats. .It Ic start Send the SCSI Start/Stop Unit (0x1B) command to the given device with the start bit set. ==== //depot/projects/arm/src/sbin/camcontrol/camcontrol.c#2 (text+ko) ==== @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2005 Kenneth D. Merry + * Copyright (c) 1997, 1998, 1999, 2000, 2001, 2002, 2005, 2006 Kenneth D. Merry * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/camcontrol/camcontrol.c,v 1.53 2005/03/26 05:34:54 ken Exp $"); +__FBSDID("$FreeBSD: src/sbin/camcontrol/camcontrol.c,v 1.54 2006/08/21 13:24:49 ken Exp $"); #include #include @@ -69,6 +69,7 @@ CAM_CMD_TAG = 0x0000000e, CAM_CMD_RATE = 0x0000000f, CAM_CMD_DETACH = 0x00000010, + CAM_CMD_REPORTLUNS = 0x00000011 } cam_cmdmask; typedef enum { @@ -127,6 +128,7 @@ {"stop", CAM_CMD_STARTSTOP, CAM_ARG_NONE, NULL}, {"load", CAM_CMD_STARTSTOP, CAM_ARG_START_UNIT | CAM_ARG_EJECT, NULL}, {"eject", CAM_CMD_STARTSTOP, CAM_ARG_EJECT, NULL}, + {"reportluns", CAM_CMD_REPORTLUNS, CAM_ARG_NONE, "clr:"}, #endif /* MINIMALISTIC */ {"rescan", CAM_CMD_RESCAN, CAM_ARG_NONE, NULL}, {"reset", CAM_CMD_RESET, CAM_ARG_NONE, NULL}, @@ -203,6 +205,8 @@ int timeout, int argc, char **argv, char *combinedopt); static int scsiformat(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout); +static int scsireportluns(struct cam_device *device, int argc, char **argv, + char *combinedopt, int retry_count, int timeout); #endif /* MINIMALISTIC */ camcontrol_optret @@ -3152,6 +3156,251 @@ return(error); } + +static int +scsireportluns(struct cam_device *device, int argc, char **argv, + char *combinedopt, int retry_count, int timeout) +{ + union ccb *ccb; + int c, countonly, lunsonly; + struct scsi_report_luns_data *lundata; + int alloc_len; + uint8_t report_type; + uint32_t list_len, i, j; + int retval; + + retval = 0; + lundata = NULL; + report_type = RPL_REPORT_DEFAULT; + ccb = cam_getccb(device); + + if (ccb == NULL) { + warnx("%s: error allocating ccb", __func__); + return (1); + } + + bzero(&(&ccb->ccb_h)[1], + sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + + countonly = 0; + lunsonly = 0; + + while ((c = getopt(argc, argv, combinedopt)) != -1) { + switch (c) { + case 'c': + countonly++; + break; + case 'l': + lunsonly++; + break; + case 'r': + if (strcasecmp(optarg, "default") == 0) + report_type = RPL_REPORT_DEFAULT; + else if (strcasecmp(optarg, "wellknown") == 0) + report_type = RPL_REPORT_WELLKNOWN; + else if (strcasecmp(optarg, "all") == 0) + report_type = RPL_REPORT_ALL; + else { + warnx("%s: invalid report type \"%s\"", + __func__, optarg); + retval = 1; + goto bailout; + } + break; + default: + break; + } + } + + if ((countonly != 0) + && (lunsonly != 0)) { + warnx("%s: you can only specify one of -c or -l", __func__); + retval = 1; + goto bailout; + } + /* + * According to SPC-4, the allocation length must be at least 16 + * bytes -- enough for the header and one LUN. + */ + alloc_len = sizeof(*lundata) + 8; + +retry: + + lundata = malloc(alloc_len); + + if (lundata == NULL) { + warn("%s: error mallocing %d bytes", __func__, alloc_len); + retval = 1; + goto bailout; + } + + scsi_report_luns(&ccb->csio, + /*retries*/ retry_count, + /*cbfcnp*/ NULL, + /*tag_action*/ MSG_SIMPLE_Q_TAG, + /*select_report*/ report_type, + /*rpl_buf*/ lundata, + /*alloc_len*/ alloc_len, + /*sense_len*/ SSD_FULL_SIZE, + /*timeout*/ timeout ? timeout : 5000); + + /* Disable freezing the device queue */ + ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; + + if (arglist & CAM_ARG_ERR_RECOVER) + ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER; + + if (cam_send_ccb(device, ccb) < 0) { + warn("error sending REPORT LUNS command"); + + if (arglist & CAM_ARG_VERBOSE) + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + + retval = 1; + goto bailout; + } + + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); + retval = 1; + goto bailout; + } + + + list_len = scsi_4btoul(lundata->length); + + /* + * If we need to list the LUNs, and our allocation + * length was too short, reallocate and retry. + */ + if ((countonly == 0) + && (list_len > (alloc_len - sizeof(*lundata)))) { + alloc_len = list_len + sizeof(*lundata); + free(lundata); + goto retry; + } + + if (lunsonly == 0) + fprintf(stdout, "%u LUN%s found\n", list_len / 8, + ((list_len / 8) > 1) ? "s" : ""); + + if (countonly != 0) + goto bailout; + + for (i = 0; i < (list_len / 8); i++) { + int no_more; + + no_more = 0; + for (j = 0; j < sizeof(lundata->luns[i].lundata); j += 2) { + if (j != 0) + fprintf(stdout, ","); + switch (lundata->luns[i].lundata[j] & + RPL_LUNDATA_ATYP_MASK) { + case RPL_LUNDATA_ATYP_PERIPH: + if ((lundata->luns[i].lundata[j] & + RPL_LUNDATA_PERIPH_BUS_MASK) != 0) + fprintf(stdout, "%d:", + lundata->luns[i].lundata[j] & + RPL_LUNDATA_PERIPH_BUS_MASK); + else if ((j == 0) + && ((lundata->luns[i].lundata[j+2] & + RPL_LUNDATA_PERIPH_BUS_MASK) == 0)) + no_more = 1; + + fprintf(stdout, "%d", + lundata->luns[i].lundata[j+1]); + break; + case RPL_LUNDATA_ATYP_FLAT: { + uint8_t tmplun[2]; + tmplun[0] = lundata->luns[i].lundata[j] & + RPL_LUNDATA_FLAT_LUN_MASK; + tmplun[1] = lundata->luns[i].lundata[j+1]; + + fprintf(stdout, "%d", scsi_2btoul(tmplun)); + no_more = 1; + break; + } + case RPL_LUNDATA_ATYP_LUN: + fprintf(stdout, "%d:%d:%d", + (lundata->luns[i].lundata[j+1] & + RPL_LUNDATA_LUN_BUS_MASK) >> 5, + lundata->luns[i].lundata[j] & + RPL_LUNDATA_LUN_TARG_MASK, + lundata->luns[i].lundata[j+1] & + RPL_LUNDATA_LUN_LUN_MASK); + break; + case RPL_LUNDATA_ATYP_EXTLUN: { + int field_len, field_len_code, eam_code; + + eam_code = lundata->luns[i].lundata[j] & + RPL_LUNDATA_EXT_EAM_MASK; + field_len_code = (lundata->luns[i].lundata[j] & + RPL_LUNDATA_EXT_LEN_MASK) >> 4; + field_len = field_len_code * 2; + + if ((eam_code == RPL_LUNDATA_EXT_EAM_WK) + && (field_len_code == 0x00)) { + fprintf(stdout, "%d", + lundata->luns[i].lundata[j+1]); + } else if ((eam_code == + RPL_LUNDATA_EXT_EAM_NOT_SPEC) + && (field_len_code == 0x03)) { + uint8_t tmp_lun[8]; + + /* + * This format takes up all 8 bytes. + * If we aren't starting at offset 0, + * that's a bug. + */ + if (j != 0) { + fprintf(stdout, "Invalid " + "offset %d for " + "Extended LUN not " + "specified format", j); + no_more = 1; + break; + } + bzero(tmp_lun, sizeof(tmp_lun)); + bcopy(&lundata->luns[i].lundata[j+1], + &tmp_lun[1], sizeof(tmp_lun) - 1); + fprintf(stdout, "%#jx", + (intmax_t)scsi_8btou64(tmp_lun)); + no_more = 1; + } else { + fprintf(stderr, "Unknown Extended LUN" + "Address method %#x, length " + "code %#x", eam_code, + field_len_code); + no_more = 1; + } + break; + } + default: + fprintf(stderr, "Unknown LUN address method " + "%#x\n", lundata->luns[i].lundata[0] & + RPL_LUNDATA_ATYP_MASK); + break; + } + /* + * For the flat addressing method, there are no + * other levels after it. + */ + if (no_more != 0) + break; + } + fprintf(stdout, "\n"); + } + +bailout: + + cam_freeccb(ccb); + + free(lundata); + + return (retval); +} + #endif /* MINIMALISTIC */ void @@ -3164,6 +3413,7 @@ " camcontrol periphlist [dev_id][-n dev_name] [-u unit]\n" " camcontrol tur [dev_id][generic args]\n" " camcontrol inquiry [dev_id][generic args] [-D] [-S] [-R]\n" +" camcontrol reportluns [dev_id][generic args] [-c] [-l] [-r report]\n" " camcontrol start [dev_id][generic args]\n" " camcontrol stop [dev_id][generic args]\n" " camcontrol load [dev_id][generic args]\n" @@ -3196,6 +3446,7 @@ "periphlist list all CAM peripheral drivers attached to a device\n" "tur send a test unit ready to the named device\n" "inquiry send a SCSI inquiry command to the named device\n" +"reportluns send a SCSI report luns command to the device\n" "start send a Start Unit command to the device\n" "stop send a Stop Unit command to the device\n" "load send a Start Unit command to the device with the load bit set\n" @@ -3236,6 +3487,10 @@ "-D get the standard inquiry data\n" "-S get the serial number\n" "-R get the transfer rate, etc.\n" +"reportluns arguments:\n" +"-c only report a count of available LUNs\n" +"-l only print out luns, and not a count\n" +"-r specify \"default\", \"wellknown\" or \"all\"\n" "cmd arguments:\n" "-c cdb [args] specify the SCSI CDB\n" "-i len fmt specify input data and input data format\n" @@ -3547,6 +3802,11 @@ error = scsiformat(cam_dev, argc, argv, combinedopt, retry_count, timeout); break; + case CAM_CMD_REPORTLUNS: + error = scsireportluns(cam_dev, argc, argv, + combinedopt, retry_count, + timeout); + break; #endif /* MINIMALISTIC */ case CAM_CMD_USAGE: usage(1); ==== //depot/projects/arm/src/sbin/dhclient/dhclient.8#3 (text+ko) ==== @@ -36,9 +36,9 @@ .\" see ``http://www.isc.org/isc''. To learn more about Vixie .\" Enterprises, see ``http://www.vix.com''. .\" -.\" $FreeBSD: src/sbin/dhclient/dhclient.8,v 1.7 2006/08/17 20:11:21 brian Exp $ +.\" $FreeBSD: src/sbin/dhclient/dhclient.8,v 1.8 2006/08/21 16:31:31 brian Exp $ .\" -.Dd August 17, 2006 +.Dd July 22, 2005 .Dt DHCLIENT 8 .Os .Sh NAME @@ -46,7 +46,7 @@ .Nd "Dynamic Host Configuration Protocol (DHCP) client" .Sh SYNOPSIS .Nm -.Op Fl bdpqu +.Op Fl bdqu .Op Fl c Ar file .Op Fl l Ar file .Ar interface @@ -83,14 +83,6 @@ Specify an alternate location, .Ar file , for the leases file. -.It Fl p -Tells -.Nm -to persist in trying to configure the interface, despite -an inability to gain carrier. -This is used to survive switch outages and when -.Nm -is required as soon as the cable is connected. .It Fl q Forces .Nm ==== //depot/projects/arm/src/sbin/dhclient/dhclient.c#3 (text+ko) ==== @@ -54,7 +54,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/dhclient/dhclient.c,v 1.18 2006/08/17 17:27:42 brian Exp $"); +__FBSDID("$FreeBSD: src/sbin/dhclient/dhclient.c,v 1.19 2006/08/21 16:31:31 brian Exp $"); #include "dhcpd.h" #include "privsep.h" @@ -295,14 +295,13 @@ int ch, fd, quiet = 0, i = 0; int pipe_fd[2]; int immediate_daemon = 0; - int persist = 0; struct passwd *pw; /* Initially, log errors to stderr as well as to syslogd. */ openlog(__progname, LOG_PID | LOG_NDELAY, DHCPD_LOG_FACILITY); setlogmask(LOG_UPTO(LOG_INFO)); - while ((ch = getopt(argc, argv, "bc:dl:pqu")) != -1) + while ((ch = getopt(argc, argv, "bc:dl:qu")) != -1) switch (ch) { case 'b': immediate_daemon = 1; @@ -316,9 +315,6 @@ case 'l': path_dhclient_db = optarg; break; - case 'p': - persist = 1; - break; case 'q': quiet = 1; break; @@ -366,18 +362,12 @@ fprintf(stderr, "."); fflush(stderr); if (++i > 10) { - if (persist) { - fprintf(stderr, " giving up for now\n"); - break; - } else { - fprintf(stderr, " giving up\n"); - exit(1); - } + fprintf(stderr, " giving up\n"); + exit(1); } sleep(1); } - if (i <= 10) - fprintf(stderr, " got link\n"); + fprintf(stderr, " got link\n"); } if ((nullfd = open(_PATH_DEVNULL, O_RDWR, 0)) == -1) @@ -447,7 +437,7 @@ { extern char *__progname; - fprintf(stderr, "usage: %s [-bdpqu] ", __progname); + fprintf(stderr, "usage: %s [-bdqu] ", __progname); fprintf(stderr, "[-c conffile] [-l leasefile] interface\n"); exit(1); } ==== //depot/projects/arm/src/share/man/man9/lock.9#2 (text+ko) ==== @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH .\" DAMAGE. .\" -.\" $FreeBSD: src/share/man/man9/lock.9,v 1.13 2006/06/20 21:41:14 maxim Exp $ +.\" $FreeBSD: src/share/man/man9/lock.9,v 1.14 2006/08/21 12:45:19 kib Exp $ .\" .Dd June 20, 2006 .Dt LOCK 9 @@ -138,6 +138,8 @@ .It Dv LK_UPGRADE Upgrade a shared lock to an exclusive lock. If this call fails, the shared lock is lost. +During the upgrade, the shared lock could +be temporarily dropped. Attempts to upgrade an exclusive lock will cause a .Xr panic 9 . .It Dv LK_RELEASE ==== //depot/projects/arm/src/sys/cam/scsi/scsi_all.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.48 2005/04/14 03:52:50 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/scsi/scsi_all.c,v 1.49 2006/08/21 13:24:50 ken Exp $"); #include @@ -2749,8 +2749,9 @@ void scsi_report_luns(struct ccb_scsiio *csio, u_int32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), - u_int8_t tag_action, struct scsi_report_luns_data *rpl_buf, - u_int32_t alloc_len, u_int8_t sense_len, u_int32_t timeout) + u_int8_t tag_action, u_int8_t select_report, + struct scsi_report_luns_data *rpl_buf, u_int32_t alloc_len, + u_int8_t sense_len, u_int32_t timeout) { struct scsi_report_luns *scsi_cmd; @@ -2767,7 +2768,8 @@ scsi_cmd = (struct scsi_report_luns *)&csio->cdb_io.cdb_bytes; bzero(scsi_cmd, sizeof(*scsi_cmd)); scsi_cmd->opcode = REPORT_LUNS; - scsi_ulto4b(alloc_len, scsi_cmd->addr); + scsi_cmd->select_report = select_report; + scsi_ulto4b(alloc_len, scsi_cmd->length); } /* ==== //depot/projects/arm/src/sys/cam/scsi/scsi_all.h#3 (text+ko) ==== @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@tfs.com) Sept 1992 * - * $FreeBSD: src/sys/cam/scsi/scsi_all.h,v 1.25 2006/05/30 22:44:00 mjacob Exp $ + * $FreeBSD: src/sys/cam/scsi/scsi_all.h,v 1.26 2006/08/21 13:24:50 ken Exp $ */ /* @@ -708,11 +708,16 @@ struct scsi_report_luns { - u_int8_t opcode; - u_int8_t byte2; - u_int8_t unused[3]; - u_int8_t addr[4]; - u_int8_t control; + uint8_t opcode; + uint8_t reserved1; +#define RPL_REPORT_DEFAULT 0x00 +#define RPL_REPORT_WELLKNOWN 0x01 +#define RPL_REPORT_ALL 0x02 + uint8_t select_report; + uint8_t reserved2[3]; + uint8_t length[4]; + uint8_t reserved3; + uint8_t control; }; struct scsi_report_luns_data { @@ -723,10 +728,22 @@ */ struct { u_int8_t lundata[8]; - } luns[1]; + } luns[0]; }; +#define RPL_LUNDATA_PERIPH_BUS_MASK 0x3f +#define RPL_LUNDATA_FLAT_LUN_MASK 0x3f +#define RPL_LUNDATA_LUN_TARG_MASK 0x3f +#define RPL_LUNDATA_LUN_BUS_MASK 0xe0 +#define RPL_LUNDATA_LUN_LUN_MASK 0x1f +#define RPL_LUNDATA_EXT_LEN_MASK 0x30 +#define RPL_LUNDATA_EXT_EAM_MASK 0x0f +#define RPL_LUNDATA_EXT_EAM_WK 0x01 +#define RPL_LUNDATA_EXT_EAM_NOT_SPEC 0x0f #define RPL_LUNDATA_ATYP_MASK 0xc0 /* MBZ for type 0 lun */ -#define RPL_LUNDATA_T0LUN 1 /* @ lundata[1] */ +#define RPL_LUNDATA_ATYP_PERIPH 0x00 +#define RPL_LUNDATA_ATYP_FLAT 0x40 +#define RPL_LUNDATA_ATYP_LUN 0x80 +#define RPL_LUNDATA_ATYP_EXTLUN 0xc0 struct scsi_sense_data @@ -1035,11 +1052,12 @@ uint32_t timeout); void scsi_report_luns(struct ccb_scsiio *csio, u_int32_t retries, - void (*cbfcnp)(struct cam_periph *, - union ccb *), u_int8_t tag_action, - struct scsi_report_luns_data *, - u_int32_t alloc_len, u_int8_t sense_len, - u_int32_t timeout); + void (*cbfcnp)(struct cam_periph *, + union ccb *), u_int8_t tag_action, + u_int8_t select_report, + struct scsi_report_luns_data *rpl_buf, + u_int32_t alloc_len, u_int8_t sense_len, + u_int32_t timeout); void scsi_synchronize_cache(struct ccb_scsiio *csio, u_int32_t retries, ==== //depot/projects/arm/src/sys/dev/iicbus/if_ic.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/iicbus/if_ic.c,v 1.25 2006/04/04 19:30:47 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/iicbus/if_ic.c,v 1.26 2006/08/21 17:32:50 imp Exp $"); /* * I2C bus IP driver @@ -267,7 +267,7 @@ * icintr() */ static void -icintr (device_t dev, int event, char *ptr) +icintr(device_t dev, int event, char *ptr) { struct ic_softc *sc = (struct ic_softc *)device_get_softc(dev); int unit = device_get_unit(dev); @@ -340,8 +340,8 @@ * icoutput() */ static int -icoutput(struct ifnet *ifp, struct mbuf *m, - struct sockaddr *dst, struct rtentry *rt) +icoutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst, + struct rtentry *rt) { device_t icdev = devclass_get_device(ic_devclass, ifp->if_dunit); device_t parent = device_get_parent(icdev); ==== //depot/projects/arm/src/sys/dev/iicbus/iicbb.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/iicbus/iicbb.c,v 1.14 2006/04/04 23:29:17 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/iicbus/iicbb.c,v 1.15 2006/08/21 17:32:50 imp Exp $"); /* * Generic I2C bit-banging code @@ -104,14 +104,16 @@ devclass_t iicbb_devclass; -static int iicbb_probe(device_t dev) +static int +iicbb_probe(device_t dev) { device_set_desc(dev, "I2C bit-banging driver"); return (0); } -static int iicbb_attach(device_t dev) +static int +iicbb_attach(device_t dev) { struct iicbb_softc *sc = (struct iicbb_softc *)device_get_softc(dev); @@ -123,7 +125,8 @@ return (0); } -static int iicbb_detach(device_t dev) +static int +iicbb_detach(device_t dev) { struct iicbb_softc *sc = (struct iicbb_softc *)device_get_softc(dev); @@ -188,7 +191,8 @@ printf(format, args); \ } while (0) -static void iicbb_setscl(device_t dev, int val, int timeout) +static void +iicbb_setscl(device_t dev, int val, int timeout) { int k = 0; @@ -203,7 +207,8 @@ return; } -static void iicbb_one(device_t dev, int timeout) +static void +iicbb_one(device_t dev, int timeout) { I2C_SET(dev,0,1); I2C_SET(dev,1,1); @@ -211,7 +216,8 @@ return; } -static void iicbb_zero(device_t dev, int timeout) +static void +iicbb_zero(device_t dev, int timeout) { I2C_SET(dev,0,0); I2C_SET(dev,1,0); @@ -233,7 +239,8 @@ * When the SLAVE has pulled this line low the MASTER will take the CLOCK * line low and then the SLAVE will release the SDA (data) line. */ -static int iicbb_ack(device_t dev, int timeout) +static int +iicbb_ack(device_t dev, int timeout) { int noack; int k = 0; @@ -254,7 +261,8 @@ return (noack); } -static void iicbb_sendbyte(device_t dev, u_char data, int timeout) +static void +iicbb_sendbyte(device_t dev, u_char data, int timeout) { int i; @@ -269,7 +277,8 @@ return; } -static u_char iicbb_readbyte(device_t dev, int last, int timeout) +static u_char +iicbb_readbyte(device_t dev, int last, int timeout) { int i; unsigned char data=0; @@ -291,17 +300,20 @@ return data; } -static int iicbb_callback(device_t dev, int index, caddr_t data) +static int +iicbb_callback(device_t dev, int index, caddr_t data) { return (IICBB_CALLBACK(device_get_parent(dev), index, data)); } -static int iicbb_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) +static int +iicbb_reset(device_t dev, u_char speed, u_char addr, u_char *oldaddr) { return (IICBB_RESET(device_get_parent(dev), speed, addr, oldaddr)); } -static int iicbb_start(device_t dev, u_char slave, int timeout) +static int +iicbb_start(device_t dev, u_char slave, int timeout) { int error; @@ -327,7 +339,8 @@ return (error); } -static int iicbb_stop(device_t dev) +static int +iicbb_stop(device_t dev) { I2C_SET(dev,0,0); I2C_SET(dev,1,0); @@ -336,8 +349,8 @@ return (0); } -static int iicbb_write(device_t dev, char * buf, int len, int *sent, - int timeout) +static int +iicbb_write(device_t dev, char * buf, int len, int *sent, int timeout) { int bytes, error = 0; @@ -360,8 +373,8 @@ return (error); } -static int iicbb_read(device_t dev, char * buf, int len, int *read, - int last, int delay) +static int +iicbb_read(device_t dev, char * buf, int len, int *read, int last, int delay) { int bytes; ==== //depot/projects/arm/src/sys/dev/isp/isp_ioctl.h#7 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/isp/isp_ioctl.h,v 1.17 2006/08/04 20:14:03 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/isp/isp_ioctl.h,v 1.18 2006/08/21 00:46:10 mjacob Exp $ */ /*- * * Copyright (c) 1997-2006 by Matthew Jacob >>> TRUNCATED FOR MAIL (1000 lines) <<<