1/*-
2 * Copyright (c) 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley
6 * by Pace Willisson (pace@blitz.com). The Rock Ridge Extension
7 * Support code is derived from software contributed to Berkeley
8 * by Atsushi Murai (amurai@spec.co.jp).
--- 22 unchanged lines hidden (view full) ---
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)cd9660_bmap.c 8.3 (Berkeley) 1/23/94
39 * $Id$
40 */
41
42#include <sys/param.h>
43#include <sys/namei.h>
44#include <sys/buf.h>
45#include <sys/file.h>
46#include <sys/vnode.h>
47#include <sys/mount.h>
--- 9 unchanged lines hidden (view full) ---
57int
58cd9660_bmap(ap)
59 struct vop_bmap_args /* {
60 struct vnode *a_vp;
61 daddr_t a_bn;
62 struct vnode **a_vpp;
63 daddr_t *a_bnp;
64 int *a_runp;
65 } */ *ap;
66{
67 struct iso_node *ip = VTOI(ap->a_vp);
68 daddr_t lblkno = ap->a_bn;
69 long bsize;
70
71 /*
72 * Check for underlying vnode requests and ensure that logical
--- 21 unchanged lines hidden (view full) ---
94 if (nblk <= 0)
95 *ap->a_runp = 0;
96 else if (nblk >= MAXBSIZE/bsize)
97 *ap->a_runp = MAXBSIZE/bsize - 1;
98 else
99 *ap->a_runp = nblk;
100 }
101
102 return 0;
103}
2 * Copyright (c) 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley
6 * by Pace Willisson (pace@blitz.com). The Rock Ridge Extension
7 * Support code is derived from software contributed to Berkeley
8 * by Atsushi Murai (amurai@spec.co.jp).
--- 22 unchanged lines hidden (view full) ---
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)cd9660_bmap.c 8.3 (Berkeley) 1/23/94
39 * $Id$
40 */
41
42#include <sys/param.h>
43#include <sys/namei.h>
44#include <sys/buf.h>
45#include <sys/file.h>
46#include <sys/vnode.h>
47#include <sys/mount.h>
--- 9 unchanged lines hidden (view full) ---
57int
58cd9660_bmap(ap)
59 struct vop_bmap_args /* {
60 struct vnode *a_vp;
61 daddr_t a_bn;
62 struct vnode **a_vpp;
63 daddr_t *a_bnp;
64 int *a_runp;
65 } */ *ap;
66{
67 struct iso_node *ip = VTOI(ap->a_vp);
68 daddr_t lblkno = ap->a_bn;
69 long bsize;
70
71 /*
72 * Check for underlying vnode requests and ensure that logical
--- 21 unchanged lines hidden (view full) ---
94 if (nblk <= 0)
95 *ap->a_runp = 0;
96 else if (nblk >= MAXBSIZE/bsize)
97 *ap->a_runp = MAXBSIZE/bsize - 1;
98 else
99 *ap->a_runp = nblk;
100 }
101
102 return 0;
103}