Deleted Added
full compact
kern_physio.c (12662) kern_physio.c (12813)
1/*
2 * Copyright (c) 1994 John S. Dyson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice immediately at the beginning of the file, without modification,
10 * this list of conditions, and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. Absolutely no warranty of function or purpose is made by the author
15 * John S. Dyson.
16 * 4. Modifications may be freely made to this file if the above conditions
17 * are met.
18 *
1/*
2 * Copyright (c) 1994 John S. Dyson
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice immediately at the beginning of the file, without modification,
10 * this list of conditions, and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. Absolutely no warranty of function or purpose is made by the author
15 * John S. Dyson.
16 * 4. Modifications may be freely made to this file if the above conditions
17 * are met.
18 *
19 * $Id: kern_physio.c,v 1.14 1995/12/02 18:58:48 bde Exp $
19 * $Id: kern_physio.c,v 1.15 1995/12/07 12:46:46 davidg Exp $
20 */
21
22#include <sys/param.h>
23#include <sys/systm.h>
24#include <sys/buf.h>
25#include <sys/conf.h>
26#include <sys/proc.h>
27#include <vm/vm.h>

--- 141 unchanged lines hidden (view full) ---

169 bp->b_bcount = MAXPHYS;
170 }
171 return bp->b_bcount;
172}
173
174int
175rawread(dev_t dev, struct uio *uio, int ioflag)
176{
20 */
21
22#include <sys/param.h>
23#include <sys/systm.h>
24#include <sys/buf.h>
25#include <sys/conf.h>
26#include <sys/proc.h>
27#include <vm/vm.h>

--- 141 unchanged lines hidden (view full) ---

169 bp->b_bcount = MAXPHYS;
170 }
171 return bp->b_bcount;
172}
173
174int
175rawread(dev_t dev, struct uio *uio, int ioflag)
176{
177 return (physio(cdevsw[major(dev)].d_strategy, (struct buf *)NULL,
177 return (physio(cdevsw[major(dev)]->d_strategy, (struct buf *)NULL,
178 dev, 1, minphys, uio));
179}
180
181int
182rawwrite(dev_t dev, struct uio *uio, int ioflag)
183{
178 dev, 1, minphys, uio));
179}
180
181int
182rawwrite(dev_t dev, struct uio *uio, int ioflag)
183{
184 return (physio(cdevsw[major(dev)].d_strategy, (struct buf *)NULL,
184 return (physio(cdevsw[major(dev)]->d_strategy, (struct buf *)NULL,
185 dev, 0, minphys, uio));
186}
187
188static void
189physwakeup(bp)
190 struct buf *bp;
191{
192 wakeup((caddr_t) bp);
193 bp->b_flags &= ~B_CALL;
194}
185 dev, 0, minphys, uio));
186}
187
188static void
189physwakeup(bp)
190 struct buf *bp;
191{
192 wakeup((caddr_t) bp);
193 bp->b_flags &= ~B_CALL;
194}