View | Details | Raw Unified | Return to bug 53149
Collapse All | Expand All

(-)lib/libufs/bread.3 (-3 / +30 lines)
Lines 1-3 Link Here
1
.\" Copyright (c) 2003 Juli Mallett
2
.\" All rights reserved.
3
.\"
4
.\" Redistribution and use in source and binary forms, with or without
5
.\" modification, are permitted provided that the following conditions
6
.\" are met:
7
.\" 1. Redistributions of source code must retain the above copyright
8
.\"    notice, this list of conditions and the following disclaimer.
9
.\" 2. Redistributions in binary form must reproduce the above copyright
10
.\"    notice, this list of conditions and the following disclaimer in the
11
.\"    documentation and/or other materials provided with the distribution.
12
.\" 3. The names of the authors may not be used to endorse or promote
13
.\"    products derived from this software without specific prior written
14
.\"    permission.
15
.\"
16
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26
.\" SUCH DAMAGE.
27
.\"
1
.\" Author:	Juli Mallett <jmallett@FreeBSD.org>
28
.\" Author:	Juli Mallett <jmallett@FreeBSD.org>
2
.\" Date:	June 04, 2003
29
.\" Date:	June 04, 2003
3
.\" Description:
30
.\" Description:
Lines 32-38 Link Here
32
.Fn bread
59
.Fn bread
33
and
60
and
34
.Fn bwrite
61
.Fn bwrite
35
functions provide a block read and write api for
62
functions provide a block read and write API for
36
.Xr libufs 3
63
.Xr libufs 3
37
consumers.
64
consumers.
38
They operate on a userland UFS disk structure, and perform the read
65
They operate on a userland UFS disk structure, and perform the read
Lines 44-50 Link Here
44
.Fn bread
71
.Fn bread
45
and
72
and
46
.Fn bwrite
73
.Fn bwrite
47
functions return the amount written, or -1 in case of any error,
74
functions return the amount read or written, or -1 in case of any error,
48
including short read.
75
including short read.
49
.Sh ERRORS
76
.Sh ERRORS
50
The function
77
The function
Lines 52-58 Link Here
52
may fail and set
79
may fail and set
53
.Va errno
80
.Va errno
54
for any of the errors specified for the library functions
81
for any of the errors specified for the library functions
55
.Xr ufs_disk_write
82
.Xr ufs_disk_write 3
56
or
83
or
57
.Xr pread 2 .
84
.Xr pread 2 .
58
Additionally, it may follow the
85
Additionally, it may follow the
(-)lib/libufs/cgread.3 (-1 / +28 lines)
Lines 1-3 Link Here
1
.\" Copyright (c) 2003 Juli Mallett
2
.\" All rights reserved.
3
.\"
4
.\" Redistribution and use in source and binary forms, with or without
5
.\" modification, are permitted provided that the following conditions
6
.\" are met:
7
.\" 1. Redistributions of source code must retain the above copyright
8
.\"    notice, this list of conditions and the following disclaimer.
9
.\" 2. Redistributions in binary form must reproduce the above copyright
10
.\"    notice, this list of conditions and the following disclaimer in the
11
.\"    documentation and/or other materials provided with the distribution.
12
.\" 3. The names of the authors may not be used to endorse or promote
13
.\"    products derived from this software without specific prior written
14
.\"    permission.
15
.\"
16
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26
.\" SUCH DAMAGE.
27
.\"
1
.\" Author:	Juli Mallett <jmallett@FreeBSD.org>
28
.\" Author:	Juli Mallett <jmallett@FreeBSD.org>
2
.\" Date:	June 04, 2003
29
.\" Date:	June 04, 2003
3
.\" Description:
30
.\" Description:
Lines 44-50 Link Here
44
field of a userland UFS disk structure.
71
field of a userland UFS disk structure.
45
It sets the
72
It sets the
46
.Fa d_lcg
73
.Fa d_lcg
47
field to the cylinger group number
74
field to the cylinder group number
48
.Fa c .
75
.Fa c .
49
.Pp
76
.Pp
50
The
77
The
(-)lib/libufs/libufs.3 (-6 / +33 lines)
Lines 1-3 Link Here
1
.\" Copyright (c) 2003 Juli Mallett
2
.\" All rights reserved.
3
.\"
4
.\" Redistribution and use in source and binary forms, with or without
5
.\" modification, are permitted provided that the following conditions
6
.\" are met:
7
.\" 1. Redistributions of source code must retain the above copyright
8
.\"    notice, this list of conditions and the following disclaimer.
9
.\" 2. Redistributions in binary form must reproduce the above copyright
10
.\"    notice, this list of conditions and the following disclaimer in the
11
.\"    documentation and/or other materials provided with the distribution.
12
.\" 3. The names of the authors may not be used to endorse or promote
13
.\"    products derived from this software without specific prior written
14
.\"    permission.
15
.\"
16
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26
.\" SUCH DAMAGE.
27
.\"
1
.\" Author:	Juli Mallett <jmallett@FreeBSD.org>
28
.\" Author:	Juli Mallett <jmallett@FreeBSD.org>
2
.\" Date:	June 04, 2003
29
.\" Date:	June 04, 2003
3
.\" Description:
30
.\" Description:
Lines 6-16 Link Here
6
.\" $FreeBSD: src/lib/libufs/libufs.3,v 1.1 2003/06/09 09:59:11 jmallett Exp $
33
.\" $FreeBSD: src/lib/libufs/libufs.3,v 1.1 2003/06/09 09:59:11 jmallett Exp $
7
.\"
34
.\"
8
.Dd June 04, 2003
35
.Dd June 04, 2003
9
.Dt SBREAD 3
36
.Dt LIBUFS 3
10
.Os
37
.Os
11
.Sh NAME
38
.Sh NAME
12
.Nm libufs
39
.Nm libufs
13
.Nd operate on UFS disks from userland
40
.Nd operate on UFS filesystems from userland
14
.Sh LIBRARY
41
.Sh LIBRARY
15
.Lb libufs
42
.Lb libufs
16
.Sh SYNOPSIS
43
.Sh SYNOPSIS
Lines 33-39 Link Here
33
.Xr dumpfs 8 .
60
.Xr dumpfs 8 .
34
The
61
The
35
.Nm
62
.Nm
36
library is designed to be simple, and provide functions that are
63
library is designed to be simple, and to provide functions that are
37
traditionally useful to have.
64
traditionally useful to have.
38
.Pp
65
.Pp
39
A disk is represented as the type
66
A disk is represented as the type
Lines 48-61 Link Here
48
return -1 in every functional error situation.
75
return -1 in every functional error situation.
49
They also set the
76
They also set the
50
.Fa d_error
77
.Fa d_error
51
field to a string describing the error.
78
field of
79
.Dq struct uufsd
80
to a string describing the error.
52
.Sh SEE ALSO
81
.Sh SEE ALSO
53
.Xr bread 3 ,
82
.Xr bread 3 ,
54
.Xr bwrite 3 ,
83
.Xr bwrite 3 ,
55
.Xr cgread 3 ,
84
.Xr cgread 3 ,
56
.Xr cgread1 3 ,
85
.Xr cgread1 3 ,
57
.Xr getino 3 ,
58
.Xr putino 3 ,
59
.Xr sbread 3 ,
86
.Xr sbread 3 ,
60
.Xr sbwrite 3 ,
87
.Xr sbwrite 3 ,
61
.Xr ufs_disk_close 3 ,
88
.Xr ufs_disk_close 3 ,
(-)lib/libufs/sbread.3 (+27 lines)
Lines 1-3 Link Here
1
.\" Copyright (c) 2003 Juli Mallett
2
.\" All rights reserved.
3
.\"
4
.\" Redistribution and use in source and binary forms, with or without
5
.\" modification, are permitted provided that the following conditions
6
.\" are met:
7
.\" 1. Redistributions of source code must retain the above copyright
8
.\"    notice, this list of conditions and the following disclaimer.
9
.\" 2. Redistributions in binary form must reproduce the above copyright
10
.\"    notice, this list of conditions and the following disclaimer in the
11
.\"    documentation and/or other materials provided with the distribution.
12
.\" 3. The names of the authors may not be used to endorse or promote
13
.\"    products derived from this software without specific prior written
14
.\"    permission.
15
.\"
16
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26
.\" SUCH DAMAGE.
27
.\"
1
.\" Author:	Juli Mallett <jmallett@FreeBSD.org>
28
.\" Author:	Juli Mallett <jmallett@FreeBSD.org>
2
.\" Date:	June 04, 2003
29
.\" Date:	June 04, 2003
3
.\" Description:
30
.\" Description:
(-)lib/libufs/ufs_disk_close.3 (-1 / +28 lines)
Lines 1-3 Link Here
1
.\" Copyright (c) 2003 Juli Mallett
2
.\" All rights reserved.
3
.\"
4
.\" Redistribution and use in source and binary forms, with or without
5
.\" modification, are permitted provided that the following conditions
6
.\" are met:
7
.\" 1. Redistributions of source code must retain the above copyright
8
.\"    notice, this list of conditions and the following disclaimer.
9
.\" 2. Redistributions in binary form must reproduce the above copyright
10
.\"    notice, this list of conditions and the following disclaimer in the
11
.\"    documentation and/or other materials provided with the distribution.
12
.\" 3. The names of the authors may not be used to endorse or promote
13
.\"    products derived from this software without specific prior written
14
.\"    permission.
15
.\"
16
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26
.\" SUCH DAMAGE.
27
.\"
1
.\" Author:	Juli Mallett <jmallett@FreeBSD.org>
28
.\" Author:	Juli Mallett <jmallett@FreeBSD.org>
2
.\" Date:	June 04, 2003
29
.\" Date:	June 04, 2003
3
.\" Description:
30
.\" Description:
Lines 82-88 Link Here
82
.Va errno
109
.Va errno
83
for any of the errors specified for the library functions
110
for any of the errors specified for the library functions
84
.Xr open 2 ,
111
.Xr open 2 ,
85
.Xr strdup 3 
112
.Xr strdup 3 .
86
Additionally, it may follow the
113
Additionally, it may follow the
87
.Xr libufs 3
114
.Xr libufs 3
88
error methodologies in situations where no device could be found to
115
error methodologies in situations where no device could be found to

Return to bug 53149