From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jul 10 19:06:14 2014 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BFA32D8 for ; Thu, 10 Jul 2014 19:06:14 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D6A429F0 for ; Thu, 10 Jul 2014 19:06:14 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s6AJ6D2L063899 for ; Thu, 10 Jul 2014 19:06:13 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 191781] [patch] multimedia/webcamd - much improved rc.d script Date: Thu, 10 Jul 2014 19:06:14 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dreamcat4@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jul 2014 19:06:14 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=191781 --- Comment #11 from dreamcat4@gmail.com --- (In reply to Hans Petter Selasky from comment #10) > Hi, > > You can override the "unit" allocation which is used when creating the > devices using the "-v" parameter. Maybe not that well documented, and then > you don't need any delay between the invokations. Hmm. Unfortunately I am not sure yet how rc.d script can be smart enough to automatically know from just a "ugenN.n" device number if it is going to appear as /dev/video{n} or /dev/dvb/adaptor{n} in devfs. We could say reserve *both*. Which then lead to not-used device numbers. Or some other switching around going on. For example if 2 identical devices are swapped then ugen2.2 become ugen4.4 and visa-versa. Then /dev/dvb numbers will become swapped over too. (since simple counter, and which appear first in the grep list from usbconfig command). Wheras if we instead use the USB serial number**, then that can correspond to the rc.conf variable's unique index number e.g.: webcamd_device_0_serial="XXXXX-XXXXXX" webcamd_device_1_serial="YYYYY-YYYYYY" Then '-v' flag can be set with index number for consistent device ordering (no matter which is the ugenN.n number). Unfortunately this situation is not very simple. When a SINGLE dual-Tuner device (like mine) will create: freenas // root^> webcamd -d 7.2 Attached to ugen7.2[0] Creating /dev/dvb/adapter0/demux0 Creating /dev/dvb/adapter1/demux0 Creating /dev/dvb/adapter0/dvr0 Creating /dev/dvb/adapter1/dvr0 Creating /dev/dvb/adapter0/frontend0 Creating /dev/dvb/adapter1/frontend0 Creating /dev/input/event0 When all these doubled up devices cannot match up cleanly to a single index number. From rc.conf variable {0,1,2,n} as suggested before. Maybe we can still guarantee the general ordering. I am guessing a little bit here because I don't have 2x identical 'dual tuner device' to try it with. Sorry if it all sounds pretty complicated. Suggestions welcome! A possible way to make simpler for user, is to automatically generate and keep some local cache file. Which specify the list of all detected USB serial numbers, just to know their relative positions. Then the /dev/ ordering is kept consistent. But the user never to need to know or find out the USB device serial numbers. ** The USB Serial number can be grepped for, individually 1 device, with the following command: usbconfig -u 7 -a 2 dump_device_desc > --HPS -- You are receiving this mail because: You are the assignee for the bug.