From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] xencons missing string allocation Date: Tue, 13 Dec 2005 01:57:55 +0000 Message-ID: References: <1134153451.6136.14.camel@tdi> <20051209185448.GD9830@granada.merseine.nu> <1134160653.6463.6.camel@tdi> <1134172824.6952.6.camel@tdi> <1134232041.23367.21.camel@localhost.localdomain> <78ef4b0c9258d4fa7788fce3e3a5287b@cl.cam.ac.uk> <1134424851.5523.9.camel@localhost> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1134424851.5523.9.camel@localhost> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Alex Williamson Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On 12 Dec 2005, at 22:00, Alex Williamson wrote: > You're right, but it's not quite that easy. I think we need some > consistency checking here. The point of this function seems to be > determining if the driver owns the device. If so, set the index and > return the driver, otherwise pass. I think the patch below does a > better job of solving the problem. When xc_num == c->index, the device > is the port xencons created, so the index is 0 and we claim it. The > only slightly complicated one is when using the tty devices c->index is > zero when xc_num is 1. I believe this does the right thing in all > cases, let me know what you think. Thanks, What I would like to know is what the two index values actually mean. :-) That is, what is c->index, and what is the index value that is returned? Without knowing this I have no idea whether your patch is correct or not. Is the expected behaviour of that console driver hook function understood and/or documented? -- Keir