From owner-freebsd-current Thu Mar 21 09:25:06 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id JAA04163 for current-outgoing; Thu, 21 Mar 1996 09:25:06 -0800 (PST) Received: from ref.tfs.com (ref.tfs.com [140.145.254.251]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id JAA04150 for ; Thu, 21 Mar 1996 09:25:02 -0800 (PST) Received: (from julian@localhost) by ref.tfs.com (8.7.3/8.6.9) id NAA17420; Wed, 20 Mar 1996 13:59:19 -0800 (PST) Message-Id: <199603202159.NAA17420@ref.tfs.com> Subject: Re: PATCH: small, syntax changes for devfs To: scrappy@ki.net (Marc G. Fournier) Date: Wed, 20 Mar 1996 13:59:19 -0800 (PST) From: "JULIAN Elischer" Cc: current@freebsd.org In-Reply-To: from "Marc G. Fournier" at Mar 20, 96 04:29:10 pm X-Mailer: ELM [version 2.4 PL25 ME8b] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > > Hi again... > [...] > Question...is it safe to put "printf" statements inside of the > kernel in arbitrary places? I'm trying to figure out why set_ds_labeldevs() > isn't creating slice devices in /devfs, and figure that putting in a few > extra printf's might help figure it out, but just wondering if this would > break anything. :) you can put printf's almost anywhere. set_ds_labeldevs doesn't make nodes? I seem to have all the nodes on my systems... > > > > if (slice >= BASE_SLICE && sp->ds_bdev == NULL && sp->ds_size != 0) { > mynor = minor(dkmodpart(dev, RAW_PART)); > ! sp->ds_bdev = > ! devfs_add_devswf(bdevsw, mynor, DV_BLK, 0, 0, 0640, > ! dsname(dname, unit, slice, RAW_PART, > ! partname)); better to use %s than just the string.. (what if we want a device with a % in it ? :) > ! sp->ds_cdev = > ! devfs_add_devswf(cdevsw, mynor, DV_CHR, 0, 0, 0640, > ! "r%s", dsname(dname, unit, slice, > ! RAW_PART, partname)); > } > #endif > if (sp->ds_label == NULL) { looks great..