Module Name: src Committed By: yamt Date: Wed Jan 20 00:50:09 UTC 2010
Modified Files: src/external/bsd/iscsi/dist/src/lib: disk.c Log Message: disk_write: report an error from target_transfer_data instead of silently write garbage to the storage. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/external/bsd/iscsi/dist/src/lib/disk.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/bsd/iscsi/dist/src/lib/disk.c diff -u src/external/bsd/iscsi/dist/src/lib/disk.c:1.2 src/external/bsd/iscsi/dist/src/lib/disk.c:1.3 --- src/external/bsd/iscsi/dist/src/lib/disk.c:1.2 Tue Jun 30 02:44:52 2009 +++ src/external/bsd/iscsi/dist/src/lib/disk.c Wed Jan 20 00:50:09 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: disk.c,v 1.2 2009/06/30 02:44:52 agc Exp $ */ +/* $NetBSD: disk.c,v 1.3 2010/01/20 00:50:09 yamt Exp $ */ /*- * Copyright (c) 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -1398,6 +1398,7 @@ if (target_transfer_data(sess, args, &sg, 1) != 0) { iscsi_err(__FILE__, __LINE__, "target_transfer_data() failed\n"); + return -1; } /* Finish up write */ if (de_lseek(&disks.v[sess->d].lunv->v[lun].de, (off_t)byte_offset,