1fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes/* $NetBSD: dd_hostops.c,v 1.1 2011/02/04 19:42:12 pooka Exp $ */ 2fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes 3fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes/*- 4fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * Copyright (c) 2010 The NetBSD Foundation, Inc. 5fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * All rights reserved. 6fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * 7fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * Redistribution and use in source and binary forms, with or without 8fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * modification, are permitted provided that the following conditions 9fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * are met: 10fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * 1. Redistributions of source code must retain the above copyright 11fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * notice, this list of conditions and the following disclaimer. 12fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * 2. Redistributions in binary form must reproduce the above copyright 13fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * notice, this list of conditions and the following disclaimer in the 14fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * documentation and/or other materials provided with the distribution. 15fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * 16fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 17fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 18fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 19fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 20fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes * POSSIBILITY OF SUCH DAMAGE. 27fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes */ 28fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes 29fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes#include <sys/cdefs.h> 30fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes#ifndef lint 31fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes__RCSID("$NetBSD: dd_hostops.c,v 1.1 2011/02/04 19:42:12 pooka Exp $"); 32fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes#endif /* !lint */ 33fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes 34fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes#include <sys/types.h> 35fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes#include <sys/ioctl.h> 36fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes 37fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes#include <fcntl.h> 38fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes#include <unistd.h> 39fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes 40fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes#include "dd.h" 41fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes 42fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughesconst struct ddfops ddfops_prog = { 43fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes .op_open = open, 44fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes .op_close = close, 45fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes .op_fcntl = fcntl, 46fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes .op_ioctl = ioctl, 47fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes .op_fstat = fstat, 48fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes .op_fsync = fsync, 49fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes .op_ftruncate = ftruncate, 50fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes .op_lseek = lseek, 51fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes .op_read = read, 52fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes .op_write = write, 53fd4c6b0a3a25921a9fe24691a695d715aecb6afeElliott Hughes}; 54