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: cd9660_bmap.c,v 1.2 1994/08/02 07:41:15 davidg Exp $ |
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 int *a_runb; |
66 } */ *ap; 67{ 68 struct iso_node *ip = VTOI(ap->a_vp); 69 daddr_t lblkno = ap->a_bn; 70 long bsize; 71 72 /* 73 * Check for underlying vnode requests and ensure that logical --- 21 unchanged lines hidden (view full) --- 95 if (nblk <= 0) 96 *ap->a_runp = 0; 97 else if (nblk >= MAXBSIZE/bsize) 98 *ap->a_runp = MAXBSIZE/bsize - 1; 99 else 100 *ap->a_runp = nblk; 101 } 102 |
103 if (ap->a_runb) { 104 *ap->a_runb = 0; 105 } 106 |
107 return 0; 108} |