From owner-cvs-all@FreeBSD.ORG Fri May 5 16:10:46 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6643016A413; Fri, 5 May 2006 16:10:46 +0000 (UTC) (envelope-from ambrisko@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 12A3A43D49; Fri, 5 May 2006 16:10:46 +0000 (GMT) (envelope-from ambrisko@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k45GAjmY030199; Fri, 5 May 2006 16:10:45 GMT (envelope-from ambrisko@repoman.freebsd.org) Received: (from ambrisko@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k45GAjdo030198; Fri, 5 May 2006 16:10:45 GMT (envelope-from ambrisko) Message-Id: <200605051610.k45GAjdo030198@repoman.freebsd.org> From: Doug Ambrisko Date: Fri, 5 May 2006 16:10:45 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/alpha/linux linux_sysvec.c src/sys/compat/linux linux_stats.c linux_util.c linux_util.h src/sys/i386/linux linux_sysvec.c src/sys/modules/linux Makefile src/sys/compat/linprocfs linprocfs.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 May 2006 16:10:47 -0000 ambrisko 2006-05-05 16:10:45 UTC FreeBSD src repository Modified files: sys/alpha/linux linux_sysvec.c sys/compat/linux linux_stats.c linux_util.c linux_util.h sys/i386/linux linux_sysvec.c sys/modules/linux Makefile sys/compat/linprocfs linprocfs.c Log: Enhance the Linux emulation layer to make MegaRAID SAS managements tool happy. Add back in a scheme to emulate old type major/minor numbers via hooks into stat, linprocfs to return major/minors that Linux app's expect. Currently only /dev/null is always registered. Drivers can register via the Linux type shim similar to the ioctl shim but by using linux_device_register_handler/linux_device_unregister_handler functions. The structure is: struct linux_device_handler { char *bsd_driver_name; char *linux_driver_name; char *bsd_device_name; char *linux_device_name; int linux_major; int linux_minor; int linux_char_device; }; Linprocfs uses this to display the major number of the driver. The soon to be available linsysfs will use it to fill in the driver name. Linux_stat uses it to translate the major/minor into Linux type values. Note major numbers are dynamically assigned via passing in a -1 for the major number so we don't need to keep track of them. This is somewhat needed due to us switching to our devfs. MegaCli will not run until I add in the linsysfs and mfi Linux compat changes. Sponsored by: IronPort Systems Revision Changes Path 1.100 +6 -0 src/sys/alpha/linux/linux_sysvec.c 1.92 +37 -11 src/sys/compat/linprocfs/linprocfs.c 1.80 +59 -5 src/sys/compat/linux/linux_stats.c 1.30 +137 -0 src/sys/compat/linux/linux_util.c 1.27 +17 -0 src/sys/compat/linux/linux_util.h 1.144 +6 -0 src/sys/i386/linux/linux_sysvec.c 1.67 +1 -1 src/sys/modules/linux/Makefile