2 .\" Copyright (c) 2004-2005 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
15 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
18 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 .Nd "read/write data from/to GEOM consumer"
38 .Fa "struct g_consumer *cp" "off_t offset" "off_t length" "int *error"
42 .Fa "struct g_consumer *cp" "off_t offset" "void *ptr" "off_t length"
49 bytes of data from the provider attached to consumer
53 The buffer returned from
57 so it should be freed by the caller with
60 If the operation fails, an error value will be stored in the
69 bytes of data from the buffer pointed to by
71 to the provider attached to consumer
75 .Sh RESTRICTIONS/CONDITIONS
79 should be a multiple of the provider's sectorsize
80 and less than or equal to
86 The topology lock must not be held.
90 function returns a pointer to a data buffer or
93 In that case an error value is stored in the
100 function returns 0 if successful; otherwise an error code is returned.
105 An I/O error occurred while reading from or writing to the consumer.
109 .Xr DECLARE_GEOM_CLASS 9 ,
117 .Xr g_provider_by_name 9 ,
121 This manual page was written by
122 .An Pawel Jakub Dawidek Aq pjd@FreeBSD.org .