secondary.c (221899) | secondary.c (222164) |
---|---|
1/*- 2 * Copyright (c) 2009-2010 The FreeBSD Foundation 3 * Copyright (c) 2010 Pawel Jakub Dawidek <pjd@FreeBSD.org> 4 * All rights reserved. 5 * 6 * This software was developed by Pawel Jakub Dawidek under sponsorship from 7 * the FreeBSD Foundation. 8 * --- 15 unchanged lines hidden (view full) --- 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2009-2010 The FreeBSD Foundation 3 * Copyright (c) 2010 Pawel Jakub Dawidek <pjd@FreeBSD.org> 4 * All rights reserved. 5 * 6 * This software was developed by Pawel Jakub Dawidek under sponsorship from 7 * the FreeBSD Foundation. 8 * --- 15 unchanged lines hidden (view full) --- 24 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 */ 30 31#include <sys/cdefs.h> |
32__FBSDID("$FreeBSD: head/sbin/hastd/secondary.c 221899 2011-05-14 17:02:03Z pjd $"); | 32__FBSDID("$FreeBSD: head/sbin/hastd/secondary.c 222164 2011-05-21 20:21:20Z pjd $"); |
33 34#include <sys/param.h> 35#include <sys/time.h> 36#include <sys/bio.h> 37#include <sys/disk.h> 38#include <sys/stat.h> 39 40#include <err.h> --- 468 unchanged lines hidden (view full) --- 509 510 hio->hio_cmd = nv_get_uint8(hio->hio_nv, "cmd"); 511 if (hio->hio_cmd == 0) { 512 pjdlog_error("Header contains no 'cmd' field."); 513 hio->hio_error = EINVAL; 514 goto end; 515 } 516 switch (hio->hio_cmd) { | 33 34#include <sys/param.h> 35#include <sys/time.h> 36#include <sys/bio.h> 37#include <sys/disk.h> 38#include <sys/stat.h> 39 40#include <err.h> --- 468 unchanged lines hidden (view full) --- 509 510 hio->hio_cmd = nv_get_uint8(hio->hio_nv, "cmd"); 511 if (hio->hio_cmd == 0) { 512 pjdlog_error("Header contains no 'cmd' field."); 513 hio->hio_error = EINVAL; 514 goto end; 515 } 516 switch (hio->hio_cmd) { |
517 case HIO_FLUSH: |
|
517 case HIO_KEEPALIVE: 518 break; 519 case HIO_READ: 520 case HIO_WRITE: 521 case HIO_DELETE: 522 hio->hio_offset = nv_get_uint64(hio->hio_nv, "offset"); 523 if (nv_error(hio->hio_nv) != 0) { 524 pjdlog_error("Header is missing 'offset' field."); --- 269 unchanged lines hidden --- | 518 case HIO_KEEPALIVE: 519 break; 520 case HIO_READ: 521 case HIO_WRITE: 522 case HIO_DELETE: 523 hio->hio_offset = nv_get_uint64(hio->hio_nv, "offset"); 524 if (nv_error(hio->hio_nv) != 0) { 525 pjdlog_error("Header is missing 'offset' field."); --- 269 unchanged lines hidden --- |