Deleted Added
full compact
subr_disk.c (105108) subr_disk.c (105365)
1/*
2 * ----------------------------------------------------------------------------
3 * "THE BEER-WARE LICENSE" (Revision 42):
4 * <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you
5 * can do whatever you want with this stuff. If we meet some day, and you think
6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7 * ----------------------------------------------------------------------------
8 *
1/*
2 * ----------------------------------------------------------------------------
3 * "THE BEER-WARE LICENSE" (Revision 42):
4 * <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you
5 * can do whatever you want with this stuff. If we meet some day, and you think
6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
7 * ----------------------------------------------------------------------------
8 *
9 * $FreeBSD: head/sys/kern/subr_disk.c 105108 2002-10-14 14:22:29Z phk $
9 * $FreeBSD: head/sys/kern/subr_disk.c 105365 2002-10-17 23:48:29Z sobomax $
10 *
11 */
12
13#include "opt_geom.h"
14
15#include <sys/param.h>
16#include <sys/systm.h>
17#include <sys/stdint.h>

--- 433 unchanged lines hidden (view full) ---

451 * blkdone should be -1 if the position of the error is unknown.
452 * The message is printed with printf.
453 */
454void
455disk_err(struct bio *bp, const char *what, int blkdone, int nl)
456{
457 daddr_t sn;
458
10 *
11 */
12
13#include "opt_geom.h"
14
15#include <sys/param.h>
16#include <sys/systm.h>
17#include <sys/stdint.h>

--- 433 unchanged lines hidden (view full) ---

451 * blkdone should be -1 if the position of the error is unknown.
452 * The message is printed with printf.
453 */
454void
455disk_err(struct bio *bp, const char *what, int blkdone, int nl)
456{
457 daddr_t sn;
458
459 printf("%s: %s", devtoname(bp->bio_dev), what);
459 printf("%s: %s ", devtoname(bp->bio_dev), what);
460 switch(bp->bio_cmd) {
460 switch(bp->bio_cmd) {
461 case BIO_READ: printf("cmd=read"); break;
462 case BIO_WRITE: printf("cmd=write"); break;
463 case BIO_DELETE: printf("cmd=delete"); break;
464 case BIO_GETATTR: printf("cmd=getattr"); break;
465 case BIO_SETATTR: printf("cmd=setattr"); break;
466 default: printf("cmd=%x", bp->bio_cmd); break;
461 case BIO_READ: printf("cmd=read "); break;
462 case BIO_WRITE: printf("cmd=write "); break;
463 case BIO_DELETE: printf("cmd=delete "); break;
464 case BIO_GETATTR: printf("cmd=getattr "); break;
465 case BIO_SETATTR: printf("cmd=setattr "); break;
466 default: printf("cmd=%x ", bp->bio_cmd); break;
467 }
468 sn = bp->bio_blkno;
469 if (bp->bio_bcount <= DEV_BSIZE) {
470 printf("fsbn %jd%s", (intmax_t)sn, nl ? "\n" : "");
471 return;
472 }
473 if (blkdone >= 0) {
474 sn += blkdone;

--- 157 unchanged lines hidden ---
467 }
468 sn = bp->bio_blkno;
469 if (bp->bio_bcount <= DEV_BSIZE) {
470 printf("fsbn %jd%s", (intmax_t)sn, nl ? "\n" : "");
471 return;
472 }
473 if (blkdone >= 0) {
474 sn += blkdone;

--- 157 unchanged lines hidden ---