From owner-freebsd-current@FreeBSD.ORG Fri Apr 6 15:57:15 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DA60616A402 for ; Fri, 6 Apr 2007 15:57:15 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id CBB8813C455 for ; Fri, 6 Apr 2007 15:57:15 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id 47DF01A4D82; Fri, 6 Apr 2007 08:57:16 -0700 (PDT) Date: Fri, 6 Apr 2007 08:57:16 -0700 From: Alfred Perlstein To: Howard Su Message-ID: <20070406155716.GO2382@elvis.mu.org> References: <20070406125940.GN2382@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i Cc: current@freebsd.org Subject: Re: [Review] Remove procfs dependency of truss X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2007 15:57:15 -0000 * Howard Su [070406 08:00] wrote: > On 4/6/07, Alfred Perlstein wrote: > > > >nit: you have new functions like this "void fun(args)", they should > >be in the form of "void\nfun(args)" (newline after return type) > I will do a style cleanup. > > > >possible issue: is get_string equivelant to the procfs version? > >meaning, if there's a string that ends at a strange place in the > >address space will it work any differently? > I uses a different way. I preallocate a buf to use ptrace to fill it > once. I limit the size to 1024 as a magic number. if the actual string > length is smaller than 1024 and has a NUL teminate character, we will > ignore the left chars. (little performance issue). if the actual > length is larger than 1024, i place a NUL at 1024. so it will be also > safe. I think you'll want to preserve the existing behavior, which is not to hard limit the max to 1024. Otherwise along with the style fixes, it looks good! -- - Alfred Perlstein