Date: Fri, 6 Apr 2007 08:57:16 -0700 From: Alfred Perlstein <alfred@freebsd.org> To: Howard Su <howard0su@gmail.com> Cc: current@freebsd.org Subject: Re: [Review] Remove procfs dependency of truss Message-ID: <20070406155716.GO2382@elvis.mu.org> In-Reply-To: <f126fae00704060756r404f5414pb1e111be847c02a6@mail.gmail.com> References: <f126fae00704040118w25a7b291xdcf1b6300bab1ceb@mail.gmail.com> <f126fae00704060104w1fd4b060w35f2073eced93f57@mail.gmail.com> <20070406125940.GN2382@elvis.mu.org> <f126fae00704060756r404f5414pb1e111be847c02a6@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
* Howard Su <howard0su@gmail.com> [070406 08:00] wrote: > On 4/6/07, Alfred Perlstein <alfred@freebsd.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070406155716.GO2382>