Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/rump/dev/lib/libdisk Satisfy yet another non-modular dri...



details:   https://anonhg.NetBSD.org/src/rev/778aecc61672
branches:  trunk
changeset: 338251:778aecc61672
user:      pooka <pooka%NetBSD.org@localhost>
date:      Sat May 16 13:59:00 2015 +0000

description:
Satisfy yet another non-modular driver still requiring a manual init call.

diffstat:

 sys/rump/dev/lib/libdisk/Makefile         |   5 ++-
 sys/rump/dev/lib/libdisk/disk_component.c |  43 +++++++++++++++++++++++++++++++
 2 files changed, 46 insertions(+), 2 deletions(-)

diffs (71 lines):

diff -r 71544db40ae4 -r 778aecc61672 sys/rump/dev/lib/libdisk/Makefile
--- a/sys/rump/dev/lib/libdisk/Makefile Sat May 16 12:12:46 2015 +0000
+++ b/sys/rump/dev/lib/libdisk/Makefile Sat May 16 13:59:00 2015 +0000
@@ -1,17 +1,18 @@
-#      $NetBSD: Makefile,v 1.7 2010/02/16 20:42:44 pooka Exp $
+#      $NetBSD: Makefile,v 1.8 2015/05/16 13:59:00 pooka Exp $
 #
 
 .PATH: ${.CURDIR}/../../../../kern                                     \
        ${.CURDIR}/../../../../dev ${.CURDIR}/../../../../dev/dkwedge
 
 LIB=   rumpdev_disk
+SRCS=  disk_component.c
 
 #
 # We use subr_disk_mbr on all platforms.  The current structure of
 # code allows us to pick only one readdisklabel() routine.  While
 # this is not the native one for all platforms, it's probably the
 # most common one in an image floating on the internetto.
-SRCS=  subr_disk_mbr.c
+SRCS+= subr_disk_mbr.c
 
 # sys/kern
 SRCS+= subr_disk.c subr_disk_open.c
diff -r 71544db40ae4 -r 778aecc61672 sys/rump/dev/lib/libdisk/disk_component.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/dev/lib/libdisk/disk_component.c Sat May 16 13:59:00 2015 +0000
@@ -0,0 +1,43 @@
+/*     $NetBSD: disk_component.c,v 1.1 2015/05/16 13:59:00 pooka Exp $ */
+
+/*
+ * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: disk_component.c,v 1.1 2015/05/16 13:59:00 pooka Exp $");
+
+#include <sys/param.h>
+#include <sys/conf.h>
+#include <sys/device.h>
+#include <sys/disk.h>
+
+#include "rump_private.h"
+#include "rump_dev_private.h"
+
+RUMP_COMPONENT(RUMP_COMPONENT_DEV)
+{
+
+       dkwedge_init();
+}



Home | Main Index | Thread Index | Old Index