/* $NetBSD: pwrite.c,v 1.9 2007/11/22 21:11:32 dsl Exp $ */ /* * Copyright (c) 1992, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #if defined(LIBC_SCCS) && !defined(lint) __RCSID("$NetBSD: pwrite.c,v 1.9 2007/11/22 21:11:32 dsl Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" #include #include #include #ifdef __weak_alias __weak_alias(pwrite,_sys_pwrite) __weak_alias(_pwrite,_sys_pwrite) #endif #ifdef __lint__ #define _sys_pwrite pwrite #endif ssize_t _sys_pwrite(int, const void *, size_t, off_t); ssize_t __pwrite(int, const void *, size_t, int, off_t); /* * This function provides 64-bit offset padding that * is not supplied by GCC 1.X but is supplied by GCC 2.X. */ ssize_t _sys_pwrite(int fd, const void *buf, size_t nbyte, off_t offset) { return __pwrite(fd, buf, nbyte, 0, offset); } /a>/ldvar.h
AgeCommit message (Expand)Author
2017-08-20make the sc_discard interface for the ld backend asynchronous andmlelstv
2017-08-09While ld(4) is MP safe, many backends are not.mlelstv
2017-04-27do not attach nvme ld as randomness source - device is too fast, it overwhelmsjdolecek
2017-02-27refactor the ld(4) DIOCCACHESYNC hook into general ioctl hook, so that attach...jdolecek
2016-09-16modify ldattach() to have default strategy as a parameterjdolecek
2015-08-28move entropy gathering into dksubr.mlelstv
2015-08-17Add support for implementing discard functionality with ld(4)jakllsch
2015-08-16replace spl and tsleep with mutex and condvar.mlelstv
2015-07-26Whitespaceskrll
2015-05-02Merge dk_intf and dkdriver interfaces.mlelstv
2015-04-13Convert sys/dev to use <sys/rndsource.h>.riastradh
2012-05-03use uint64_t for sc_disksize512.bsh
2012-02-02Entropy-pool implementation move and cleanup.tls
2011-11-19First step of random number subsystem rework described intls
2010-09-20Check disk bounds, in RAW_PART.kiyohara
2009-12-18Use "rnd.h" and <sys/rnd.h> to ensure that struct ld_softcjakllsch
2009-05-07struct device * -> device_t, no functional changes intended.cegger
2008-09-09Complete device_t/softc split for the ld(4) attachments. This shouldtron
2008-08-11Add a flags argument to the ld(4) flush handlers, and call these with asimonb
2008-04-28Remove clause 3 and 4 from TNF licensesmartin
2007-02-09Merge newlock2 to head.ad
2005-12-11merge ktrace-lwp.christos
2005-10-15- change the way to specify a bufq strategy. (by string rather than by number)yamt
2004-09-25Add support for wedges to the logical disk driver.thorpej
2004-07-20use uint64 instead of int for sc_secperunitdbj
2003-05-17Add DIOCKLABEL support. Fixes PR kern/21605 (Luke Mewburn).thorpej
2002-07-20Convert to new device buffer queue interface.hannken
2001-06-10Centralise the geometry fudge.ad
2001-02-04Allow for draining/adjusting the queue.ad
2001-01-03Make dumps work, and put the first part of detach into ld.c.ad
2000-12-03Make it possible to detach ld devices.ad
2000-11-26lsu -> ld, by popular request.ad