From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kumar Gala Subject: generating a phandle w/libfdt? Date: Fri, 24 Oct 2008 08:11:33 -0500 Message-ID: <4BE3ADDA-362B-43AE-8D05-11260B94CD13@kernel.crashing.org> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-mnsaURCQ41sdnm+yROfE0A@public.gmane.org To: devicetree-discuss List-Id: devicetree@vger.kernel.org In some work I'm doing I noticed we don't have any APIs to generate a phandle via libfdt. was wondering if anyone had ideas on this. In first thought it seems we have to scan through the whole blob looking for the largest phandle id and than +1 it to generate the next "valid" id. Any other ideas on how to do this more efficiently? - k