From owner-svn-soc-all@FreeBSD.ORG Wed Sep 7 13:44:59 2011 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 5F04F106566C for ; Wed, 7 Sep 2011 13:44:57 +0000 (UTC) (envelope-from oleksandr@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Wed, 07 Sep 2011 13:44:57 +0000 Date: Wed, 07 Sep 2011 13:44:57 +0000 From: oleksandr@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20110907134457.5F04F106566C@hub.freebsd.org> Cc: Subject: socsvn commit: r225711 - in soc2011/oleksandr/oleksandr-head/head/sys: cam dev/ata dev/usb/storage kern sys X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2011 13:44:59 -0000 Author: oleksandr Date: Wed Sep 7 13:44:57 2011 New Revision: 225711 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=225711 Log: Edit code in the kernel Modified: soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_periph.c soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_xpt.c soc2011/oleksandr/oleksandr-head/head/sys/dev/ata/ata-all.c soc2011/oleksandr/oleksandr-head/head/sys/dev/usb/storage/umass.c soc2011/oleksandr/oleksandr-head/head/sys/kern/subr_devstat.c soc2011/oleksandr/oleksandr-head/head/sys/sys/devicestat.h Modified: soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_periph.c ============================================================================== --- soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_periph.c Wed Sep 7 12:53:18 2011 (r225710) +++ soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_periph.c Wed Sep 7 13:44:57 2011 (r225711) @@ -1699,109 +1699,109 @@ frozen = (status & CAM_DEV_QFRZN) != 0; status &= CAM_STATUS_MASK; openings = relsim_flags = 0; - - struct devstat *device_error = NULL; + + struct devstat *device_error = NULL; devstat_error_flags error_flag_ret = 0, error_flag_type = 0, error_flag_sense = 0; - /* - * If the error is not critical refer it to the type of retry able. - */ - if (status == CAM_SEL_TIMEOUT || status == CAM_SCSI_BUSY || - status == CAM_SIM_QUEUED || status == CAM_FUNC_NOTAVAIL || - status == CAM_REQ_INVALID || status == CAM_CMD_TIMEOUT) - error_flag_ret = DEVSTAT_ERROR_RETRIABLE; - /* - * If the error is critical refer it to the type of non retry able. - */ - if (status == CAM_REQ_CMP_ERR || status == CAM_TID_INVALID || - status == CAM_SCSI_STATUS_ERROR || status == CAM_AUTOSENSE_FAIL || - status == CAM_LUN_INVALID || status == CAM_AUTOSNS_VALID || - status == CAM_ATA_STATUS_ERROR) - error_flag_ret = DEVSTAT_ERROR_NON_RETRIABLE; - /* - * If the error is write error refer it to the type of write error. - */ - if (ccb->ccb_h.flags == CAM_DIR_OUT && error_flag_ret != 0) - error_flag_type = DEVSTAT_ERROR_WRITE_ERROR; - /* - * If the error is read error refer it to the type of read error - */ - if (ccb->ccb_h.flags == CAM_DIR_IN && error_flag_ret != 0) - error_flag_type = DEVSTAT_ERROR_READ_ERROR; - /* - * If the request is countrol and there is no action with data - * refer it to the type of other error. - */ - if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_NONE && - error_flag_ret != 0) - error_flag_type = DEVSTAT_ERROR_OTHER_ERROR; - /* - * If function code is equal to XPT_SCSI_IO it means that the - * information about error can be found in the structure sense_data. - */ - if (ccb->ccb_h.func_code == XPT_SCSI_IO && error_flag_ret != 0) { - int sense_key, error_code, asc, ascq; - scsi_extract_sense(&ccb->csio.sense_data, - &error_code, &sense_key, &asc, &ascq); - switch(sense_key) { - case SSD_KEY_RECOVERED_ERROR: - error_flag_sense = DEVSTAT_ERROR_RECOVERED_ERROR; - break; - case SSD_KEY_NOT_READY: - error_flag_sense = DEVSTAT_ERROR_NOT_READY; - break; - case SSD_KEY_MEDIUM_ERROR: - error_flag_sense = DEVSTAT_ERROR_MEDIUM_ERROR; - break; - case SSD_KEY_HARDWARE_ERROR: - error_flag_sense = DEVSTAT_ERROR_HARDWARE_ERROR; - break; - case SSD_KEY_ILLEGAL_REQUEST: - error_flag_sense = DEVSTAT_ERROR_ILLEGAL_REQUEST; - break; - case SSD_KEY_UNIT_ATTENTION: - error_flag_sense = DEVSTAT_ERROR_UNIT_ATTENTION; - break; - case SSD_KEY_ABORTED_COMMAND: - error_flag_sense = DEVSTAT_ERROR_ABORTED_COMMAND; - break; - } - } - /* - * If function code is equal to XPT_ATA_IO it means that the - * information about error can be found in the structure ataio.res. - */ - if (ccb->ccb_h.func_code == XPT_ATA_IO && error_flag_ret != 0) { - if ((ccb->ataio.res.status & 0x20) && (!ccb->ataio.res.error)) - error_flag_sense = DEVSTAT_ERROR_HARDWARE_ERROR; - if (ccb->ataio.res.status & 0x10) { - if (ccb->ataio.res.error && 0x02) - error_flag_sense = DEVSTAT_ERROR_NOT_READY; - if ((ccb->ataio.res.error && 0x40) || - (ccb->ataio.res.error && 0x01) || - (ccb->ataio.res.error && 0x10)) - error_flag_sense = DEVSTAT_ERROR_MEDIUM_ERROR; - if (ccb->ataio.res.error && 0x04) - error_flag_sense = DEVSTAT_ERROR_ILLEGAL_REQUEST; - if ((ccb->ataio.res.error && 0x20) || - (ccb->ataio.res.error && 0x08)) - error_flag_sense = DEVSTAT_ERROR_UNIT_ATTENTION; - if (ccb->ataio.res.error && 0x80) - error_flag_sense = DEVSTAT_ERROR_ABORTED_COMMAND; - } - } - /* - * If the error is present, search for appropriate structure - * in devstat and increase the corresponding counters of errors. - */ - if (error_flag_ret) { - if ((device_error = devstat_search( - ccb->ccb_h.path->periph->periph_name, - ccb->ccb_h.path->periph->unit_number)) != NULL) { - devstat_add_error(device_error, error_flag_ret | - error_flag_type | error_flag_sense); - } - } + /* + * If the error is not critical refer it to the type of retry able. + */ + if (status == CAM_SEL_TIMEOUT || status == CAM_SCSI_BUSY || + status == CAM_SIM_QUEUED || status == CAM_FUNC_NOTAVAIL || + status == CAM_REQ_INVALID || status == CAM_CMD_TIMEOUT) + error_flag_ret = DEVSTAT_ERROR_RETRIABLE; + /* + * If the error is critical refer it to the type of non retry able. + */ + if (status == CAM_REQ_CMP_ERR || status == CAM_TID_INVALID || + status == CAM_SCSI_STATUS_ERROR || status == CAM_AUTOSENSE_FAIL || + status == CAM_LUN_INVALID || status == CAM_AUTOSNS_VALID || + status == CAM_ATA_STATUS_ERROR) + error_flag_ret = DEVSTAT_ERROR_NON_RETRIABLE; + /* + * If the error is write error refer it to the type of write error. + */ + if (ccb->ccb_h.flags == CAM_DIR_OUT && error_flag_ret != 0) + error_flag_type = DEVSTAT_ERROR_WRITE_ERROR; + /* + * If the error is read error refer it to the type of read error + */ + if (ccb->ccb_h.flags == CAM_DIR_IN && error_flag_ret != 0) + error_flag_type = DEVSTAT_ERROR_READ_ERROR; + /* + * If the request is countrol and there is no action with data + * refer it to the type of other error. + */ + if ((ccb->ccb_h.flags & CAM_DIR_MASK) == CAM_DIR_NONE && + error_flag_ret != 0) + error_flag_type = DEVSTAT_ERROR_OTHER_ERROR; + /* + * If function code is equal to XPT_SCSI_IO it means that the + * information about error can be found in the structure sense_data. + */ + if (ccb->ccb_h.func_code == XPT_SCSI_IO && error_flag_ret != 0) { + int sense_key, error_code, asc, ascq; + scsi_extract_sense(&ccb->csio.sense_data, + &error_code, &sense_key, &asc, &ascq); + switch(sense_key) { + case SSD_KEY_RECOVERED_ERROR: + error_flag_sense = DEVSTAT_ERROR_RECOVERED_ERROR; + break; + case SSD_KEY_NOT_READY: + error_flag_sense = DEVSTAT_ERROR_NOT_READY; + break; + case SSD_KEY_MEDIUM_ERROR: + error_flag_sense = DEVSTAT_ERROR_MEDIUM_ERROR; + break; + case SSD_KEY_HARDWARE_ERROR: + error_flag_sense = DEVSTAT_ERROR_HARDWARE_ERROR; + break; + case SSD_KEY_ILLEGAL_REQUEST: + error_flag_sense = DEVSTAT_ERROR_ILLEGAL_REQUEST; + break; + case SSD_KEY_UNIT_ATTENTION: + error_flag_sense = DEVSTAT_ERROR_UNIT_ATTENTION; + break; + case SSD_KEY_ABORTED_COMMAND: + error_flag_sense = DEVSTAT_ERROR_ABORTED_COMMAND; + break; + } + } + /* + * If function code is equal to XPT_ATA_IO it means that the + * information about error can be found in the structure ataio.res. + */ + if (ccb->ccb_h.func_code == XPT_ATA_IO && error_flag_ret != 0) { + if ((ccb->ataio.res.status & 0x20) && (!ccb->ataio.res.error)) + error_flag_sense = DEVSTAT_ERROR_HARDWARE_ERROR; + if (ccb->ataio.res.status & 0x10) { + if (ccb->ataio.res.error && 0x02) + error_flag_sense = DEVSTAT_ERROR_NOT_READY; + if ((ccb->ataio.res.error && 0x40) || + (ccb->ataio.res.error && 0x01) || + (ccb->ataio.res.error && 0x10)) + error_flag_sense = DEVSTAT_ERROR_MEDIUM_ERROR; + if (ccb->ataio.res.error && 0x04) + error_flag_sense = DEVSTAT_ERROR_ILLEGAL_REQUEST; + if ((ccb->ataio.res.error && 0x20) || + (ccb->ataio.res.error && 0x08)) + error_flag_sense = DEVSTAT_ERROR_UNIT_ATTENTION; + if (ccb->ataio.res.error && 0x80) + error_flag_sense = DEVSTAT_ERROR_ABORTED_COMMAND; + } + } + /* + * If the error is present, search for appropriate structure + * in devstat and increase the corresponding counters of errors. + */ + if (error_flag_ret) { + if ((device_error = devstat_search( + ccb->ccb_h.path->periph->periph_name, + ccb->ccb_h.path->periph->unit_number)) != NULL) { + devstat_add_error(device_error, error_flag_ret | + error_flag_type | error_flag_sense); + } + } switch (status) { case CAM_REQ_CMP: error = 0; Modified: soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_xpt.c ============================================================================== --- soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_xpt.c Wed Sep 7 12:53:18 2011 (r225710) +++ soc2011/oleksandr/oleksandr-head/head/sys/cam/cam_xpt.c Wed Sep 7 13:44:57 2011 (r225711) @@ -4140,7 +4140,7 @@ xpt_done(union ccb *done_ccb) { struct cam_sim *sim; - int first; + int first; CAM_DEBUG(done_ccb->ccb_h.path, CAM_DEBUG_TRACE, ("xpt_done\n")); if ((done_ccb->ccb_h.func_code & XPT_FC_QUEUED) != 0) { Modified: soc2011/oleksandr/oleksandr-head/head/sys/dev/ata/ata-all.c ============================================================================== --- soc2011/oleksandr/oleksandr-head/head/sys/dev/ata/ata-all.c Wed Sep 7 12:53:18 2011 (r225710) +++ soc2011/oleksandr/oleksandr-head/head/sys/dev/ata/ata-all.c Wed Sep 7 13:44:57 2011 (r225711) @@ -50,7 +50,6 @@ #include #include #include -#include #ifdef ATA_CAM #include @@ -1554,6 +1553,7 @@ struct ata_channel *ch = device_get_softc(dev); union ccb *ccb = request->ccb; int fatalerr = 0; + if (ch->requestsense) { ata_cam_process_sense(dev, request); return; Modified: soc2011/oleksandr/oleksandr-head/head/sys/dev/usb/storage/umass.c ============================================================================== --- soc2011/oleksandr/oleksandr-head/head/sys/dev/usb/storage/umass.c Wed Sep 7 12:53:18 2011 (r225710) +++ soc2011/oleksandr/oleksandr-head/head/sys/dev/usb/storage/umass.c Wed Sep 7 13:44:57 2011 (r225711) @@ -120,7 +120,6 @@ #include #include #include -#include #include #include @@ -2551,6 +2550,7 @@ uint8_t status) { ccb->csio.resid = residue; + switch (status) { case STATUS_CMD_OK: ccb->ccb_h.status = CAM_REQ_CMP; Modified: soc2011/oleksandr/oleksandr-head/head/sys/kern/subr_devstat.c ============================================================================== --- soc2011/oleksandr/oleksandr-head/head/sys/kern/subr_devstat.c Wed Sep 7 12:53:18 2011 (r225710) +++ soc2011/oleksandr/oleksandr-head/head/sys/kern/subr_devstat.c Wed Sep 7 13:44:57 2011 (r225711) @@ -103,7 +103,7 @@ devstat_support_flags flags, devstat_type_flags device_type, devstat_priority priority) -{ +{ struct devstatlist *devstat_head; struct devstat *ds_tmp; @@ -201,6 +201,7 @@ devstat_generation++; mtx_unlock(&devstat_mutex); } + /* * Search in the devstat desired structure. */ @@ -231,6 +232,7 @@ return NULL; } } + /* * Record a transaction start. * @@ -369,40 +371,41 @@ devstat_end_transaction(ds, bp->bio_bcount - bp->bio_resid, DEVSTAT_TAG_SIMPLE, flg, NULL, &bp->bio_t0); } + /* * Increase corresponding counter by unit. */ void devstat_add_error(struct devstat *ds, devstat_error_flags error_flag) { - if ((error_flag | DEVSTAT_ERROR_RETRIABLE) == error_flag) + if ((error_flag & DEVSTAT_ERROR_RETRIABLE) != 0) ds->dev_error.retriable++; - if ((error_flag | DEVSTAT_ERROR_NON_RETRIABLE) == error_flag) + if ((error_flag & DEVSTAT_ERROR_NON_RETRIABLE) != 0) ds->dev_error.non_retriable++; - if ((error_flag | DEVSTAT_ERROR_WRITE_ERROR) == error_flag) + if ((error_flag & DEVSTAT_ERROR_WRITE_ERROR) != 0) ds->dev_error.write_error++; - if ((error_flag | DEVSTAT_ERROR_READ_ERROR) == error_flag) + if ((error_flag & DEVSTAT_ERROR_READ_ERROR) != 0) ds->dev_error.read_error++; - if ((error_flag | DEVSTAT_ERROR_OTHER_ERROR) == error_flag) + if ((error_flag & DEVSTAT_ERROR_OTHER_ERROR) != 0) ds->dev_error.other_error++; - if ((error_flag | DEVSTAT_ERROR_RECOVERED_ERROR) == error_flag) + if ((error_flag & DEVSTAT_ERROR_RECOVERED_ERROR) != 0) ds->dev_error.recovered++; - if ((error_flag | DEVSTAT_ERROR_NOT_READY) == error_flag) + if ((error_flag & DEVSTAT_ERROR_NOT_READY) != 0) ds->dev_error.not_ready++; - if ((error_flag | DEVSTAT_ERROR_MEDIUM_ERROR) == error_flag) + if ((error_flag & DEVSTAT_ERROR_MEDIUM_ERROR) != 0) ds->dev_error.medium_error++; - if ((error_flag | DEVSTAT_ERROR_HARDWARE_ERROR) == error_flag) + if ((error_flag & DEVSTAT_ERROR_HARDWARE_ERROR) != 0) ds->dev_error.hardware++; - if ((error_flag | DEVSTAT_ERROR_ILLEGAL_REQUEST) == error_flag) + if ((error_flag & DEVSTAT_ERROR_ILLEGAL_REQUEST) != 0) ds->dev_error.illegal_request++; - if ((error_flag | DEVSTAT_ERROR_UNIT_ATTENTION) == error_flag) + if ((error_flag & DEVSTAT_ERROR_UNIT_ATTENTION) != 0) ds->dev_error.unit_attention++; - if ((error_flag | DEVSTAT_ERROR_ABORTED_COMMAND) == error_flag) + if ((error_flag & DEVSTAT_ERROR_ABORTED_COMMAND) != 0) ds->dev_error.aborted_command++; } + /* * This is the sysctl handler for the devstat package. The data pushed out - * on the kern.devstat.all sysctl variable consists of the current devstat * generation number, and then an array of devstat structures, one for each * device in the system. Modified: soc2011/oleksandr/oleksandr-head/head/sys/sys/devicestat.h ============================================================================== --- soc2011/oleksandr/oleksandr-head/head/sys/sys/devicestat.h Wed Sep 7 12:53:18 2011 (r225710) +++ soc2011/oleksandr/oleksandr-head/head/sys/sys/devicestat.h Wed Sep 7 13:44:57 2011 (r225711) @@ -53,7 +53,7 @@ * userland utilities to determine whether or not they are in sync with the * kernel. */ -#define DEVSTAT_VERSION 6 +#define DEVSTAT_VERSION 6 /* * These flags specify which statistics features are supported or not @@ -94,23 +94,25 @@ DEVSTAT_PRIORITY_ARRAY = 0x120, DEVSTAT_PRIORITY_MAX = 0xfff } devstat_priority; + /* * These flags indicates the type of disk error. */ typedef enum { - DEVSTAT_ERROR_RETRIABLE = 0x001, - DEVSTAT_ERROR_NON_RETRIABLE = 0x002, - DEVSTAT_ERROR_READ_ERROR = 0x004, - DEVSTAT_ERROR_WRITE_ERROR = 0x008, - DEVSTAT_ERROR_OTHER_ERROR = 0x010, - DEVSTAT_ERROR_RECOVERED_ERROR = 0x020, - DEVSTAT_ERROR_NOT_READY = 0x040, - DEVSTAT_ERROR_MEDIUM_ERROR = 0x080, - DEVSTAT_ERROR_HARDWARE_ERROR = 0x100, - DEVSTAT_ERROR_ILLEGAL_REQUEST = 0x200, - DEVSTAT_ERROR_UNIT_ATTENTION = 0x400, - DEVSTAT_ERROR_ABORTED_COMMAND = 0x800 + DEVSTAT_ERROR_RETRIABLE = 0x001, + DEVSTAT_ERROR_NON_RETRIABLE = 0x002, + DEVSTAT_ERROR_READ_ERROR = 0x004, + DEVSTAT_ERROR_WRITE_ERROR = 0x008, + DEVSTAT_ERROR_OTHER_ERROR = 0x010, + DEVSTAT_ERROR_RECOVERED_ERROR = 0x020, + DEVSTAT_ERROR_NOT_READY = 0x040, + DEVSTAT_ERROR_MEDIUM_ERROR = 0x080, + DEVSTAT_ERROR_HARDWARE_ERROR = 0x100, + DEVSTAT_ERROR_ILLEGAL_REQUEST = 0x200, + DEVSTAT_ERROR_UNIT_ATTENTION = 0x400, + DEVSTAT_ERROR_ABORTED_COMMAND = 0x800 } devstat_error_flags; + /* * These types are intended to aid statistics gathering/display programs. * The first 13 types (up to the 'target' flag) are identical numerically @@ -144,23 +146,25 @@ DEVSTAT_TYPE_IF_MASK = 0x0f0, DEVSTAT_TYPE_PASS = 0x100 } devstat_type_flags; + /* * The structure that contains the disk errors counter. */ typedef struct { - int retriable; - int non_retriable; - int read_error; - int write_error; - int other_error; - int recovered; - int not_ready; - int medium_error; - int hardware; - int illegal_request; - int unit_attention; - int aborted_command; + int retriable; + int non_retriable; + int read_error; + int write_error; + int other_error; + int recovered; + int not_ready; + int medium_error; + int hardware; + int illegal_request; + int unit_attention; + int aborted_command; } devstat_device_error; + /* * XXX: Next revision should add * off_t offset[DEVSTAT_N_TRANS_FLAGS]; @@ -191,7 +195,7 @@ * Time the device was * created. */ - devstat_device_error dev_error; /* Disk error structure*/ + devstat_device_error dev_error; /* Disk error structure*/ u_int32_t block_size; /* Block size, bytes */ u_int64_t tag_types[3]; /* * The number of @@ -223,6 +227,7 @@ devstat_support_flags flags, devstat_type_flags device_type, devstat_priority priority); + struct devstat *devstat_search(const char *dev_name, u_int32_t unit_number); void devstat_remove_entry(struct devstat *ds); void devstat_start_transaction(struct devstat *ds, struct bintime *now); From owner-svn-soc-all@FreeBSD.ORG Wed Sep 7 13:46:39 2011 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id D4DDD1065670 for ; Wed, 7 Sep 2011 13:46:36 +0000 (UTC) (envelope-from oleksandr@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Wed, 07 Sep 2011 13:46:36 +0000 Date: Wed, 07 Sep 2011 13:46:36 +0000 From: oleksandr@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20110907134636.D4DDD1065670@hub.freebsd.org> Cc: Subject: socsvn commit: r225712 - soc2011/oleksandr/oleksandr-head/head/share/man/man9 X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2011 13:46:39 -0000 Author: oleksandr Date: Wed Sep 7 13:46:36 2011 New Revision: 225712 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=225712 Log: Edit code Modified: soc2011/oleksandr/oleksandr-head/head/share/man/man9/devstat.9 Modified: soc2011/oleksandr/oleksandr-head/head/share/man/man9/devstat.9 ============================================================================== --- soc2011/oleksandr/oleksandr-head/head/share/man/man9/devstat.9 Wed Sep 7 13:44:57 2011 (r225711) +++ soc2011/oleksandr/oleksandr-head/head/share/man/man9/devstat.9 Wed Sep 7 13:46:36 2011 (r225712) @@ -396,13 +396,13 @@ DEVSTAT_ERROR_READ_ERROR = 0x004, DEVSTAT_ERROR_WRITE_ERROR = 0x008, DEVSTAT_ERROR_OTHER_ERROR = 0x010, - DEVSTAT_ERROR_RECOVERED_ERROR = 0x020, - DEVSTAT_ERROR_NOT_READY = 0x040, - DEVSTAT_ERROR_MEDIUM_ERROR = 0x080, - DEVSTAT_ERROR_HARDWARE_ERROR = 0x100, - DEVSTAT_ERROR_ILLEGAL_REQUEST = 0x200, - DEVSTAT_ERROR_UNIT_ATTENTION = 0x400, - DEVSTAT_ERROR_ABORTED_COMMAND = 0x800 + DEVSTAT_ERROR_RECOVERED_ERROR = 0x020, + DEVSTAT_ERROR_NOT_READY = 0x040, + DEVSTAT_ERROR_MEDIUM_ERROR = 0x080, + DEVSTAT_ERROR_HARDWARE_ERROR = 0x100, + DEVSTAT_ERROR_ILLEGAL_REQUEST = 0x200, + DEVSTAT_ERROR_UNIT_ATTENTION = 0x400, + DEVSTAT_ERROR_ABORTED_COMMAND = 0x800 } devstat_error_flags; .Ed .Pp From owner-svn-soc-all@FreeBSD.ORG Wed Sep 7 13:53:49 2011 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 5315E1065677 for ; Wed, 7 Sep 2011 13:53:47 +0000 (UTC) (envelope-from oleksandr@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Wed, 07 Sep 2011 13:53:47 +0000 Date: Wed, 07 Sep 2011 13:53:47 +0000 From: oleksandr@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20110907135347.5315E1065677@hub.freebsd.org> Cc: Subject: socsvn commit: r225713 - soc2011/oleksandr/oleksandr-head/head/usr.sbin/iostat X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2011 13:53:49 -0000 Author: oleksandr Date: Wed Sep 7 13:53:47 2011 New Revision: 225713 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=225713 Log: Edit code in iostat Modified: soc2011/oleksandr/oleksandr-head/head/usr.sbin/iostat/iostat.c Modified: soc2011/oleksandr/oleksandr-head/head/usr.sbin/iostat/iostat.c ============================================================================== --- soc2011/oleksandr/oleksandr-head/head/usr.sbin/iostat/iostat.c Wed Sep 7 13:46:36 2011 (r225712) +++ soc2011/oleksandr/oleksandr-head/head/usr.sbin/iostat/iostat.c Wed Sep 7 13:53:47 2011 (r225713) @@ -100,7 +100,6 @@ #include #include #include -#include #include #include @@ -762,6 +761,7 @@ printf("us ni sy in id "); printf("\n"); } + if (Eflag>0) printf(" Error Device Statistics\n"); for (dn = 0; dn < num_devices; dn++) { From owner-svn-soc-all@FreeBSD.ORG Wed Sep 7 14:58:57 2011 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 048421065672 for ; Wed, 7 Sep 2011 14:58:55 +0000 (UTC) (envelope-from oleksandr@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Wed, 07 Sep 2011 14:58:55 +0000 Date: Wed, 07 Sep 2011 14:58:55 +0000 From: oleksandr@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20110907145855.048421065672@hub.freebsd.org> Cc: Subject: socsvn commit: r225716 - soc2011/oleksandr/oleksandr-head/head/usr.sbin/iostat X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2011 14:58:57 -0000 Author: oleksandr Date: Wed Sep 7 14:58:54 2011 New Revision: 225716 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=225716 Log: Correct Modified: soc2011/oleksandr/oleksandr-head/head/usr.sbin/iostat/iostat.c Modified: soc2011/oleksandr/oleksandr-head/head/usr.sbin/iostat/iostat.c ============================================================================== --- soc2011/oleksandr/oleksandr-head/head/usr.sbin/iostat/iostat.c Wed Sep 7 13:26:20 2011 (r225715) +++ soc2011/oleksandr/oleksandr-head/head/usr.sbin/iostat/iostat.c Wed Sep 7 14:58:54 2011 (r225716) @@ -200,9 +200,9 @@ case 'd': dflag++; break; - case 'E': - Eflag++; - break; + case 'E': + Eflag++; + break; case 'h': hflag++; break; @@ -762,7 +762,7 @@ printf("\n"); } - if (Eflag>0) + if (Eflag>0) printf(" Error Device Statistics\n"); for (dn = 0; dn < num_devices; dn++) { int di;