geom_disk.c (93776) | geom_disk.c (93778) |
---|---|
1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 18 unchanged lines hidden (view full) --- 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * | 1/*- 2 * Copyright (c) 2002 Poul-Henning Kamp 3 * Copyright (c) 2002 Networks Associates Technology, Inc. 4 * All rights reserved. 5 * 6 * This software was developed for the FreeBSD Project by Poul-Henning Kamp 7 * and NAI Labs, the Security Research Division of Network Associates, Inc. 8 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the --- 18 unchanged lines hidden (view full) --- 27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * |
35 * $FreeBSD: head/sys/geom/geom_disk.c 93776 2002-04-04 09:54:13Z phk $ | 35 * $FreeBSD: head/sys/geom/geom_disk.c 93778 2002-04-04 09:58:20Z phk $ |
36 */ 37 38#include "opt_geom.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/kernel.h> 43#include <sys/sysctl.h> --- 44 unchanged lines hidden (view full) --- 88 mtx_lock(&Giant); 89 error = devsw(dev)->d_close(dev, 3, 0, NULL); 90 if (error != 0) 91 printf("Closed disk %s -> %d\n", pp->name, error); 92 mtx_unlock(&Giant); 93 } else { 94 error = 0; 95 } | 36 */ 37 38#include "opt_geom.h" 39 40#include <sys/param.h> 41#include <sys/systm.h> 42#include <sys/kernel.h> 43#include <sys/sysctl.h> --- 44 unchanged lines hidden (view full) --- 88 mtx_lock(&Giant); 89 error = devsw(dev)->d_close(dev, 3, 0, NULL); 90 if (error != 0) 91 printf("Closed disk %s -> %d\n", pp->name, error); 92 mtx_unlock(&Giant); 93 } else { 94 error = 0; 95 } |
96 pp->mediasize = 97 dp->d_label.d_secsize * (off_t)dp->d_label.d_secperunit; |
|
96 return (error); 97} 98 99static void 100g_disk_done(struct bio *bp) 101{ 102 103 mtx_unlock(&Giant); --- 135 unchanged lines hidden --- | 98 return (error); 99} 100 101static void 102g_disk_done(struct bio *bp) 103{ 104 105 mtx_unlock(&Giant); --- 135 unchanged lines hidden --- |