X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C77879.0EB0375B@onstor-exch02.onstor.net>; Fri, 6 Apr 2007 11:26:13 -0700
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-class: urn:content-classes:message
Subject: RE: how to find the source
Date: Fri, 6 Apr 2007 11:26:13 -0700
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E02215707@onstor-exch02.onstor.net>
In-Reply-To: <20070406112416.32337b1b@ripper.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: how to find the source
Thread-Index: Acd4eMiziIV/vSCyRNOZxBUOnKjHOQAACKnw
From: "Larry Scheer" <larry.scheer@onstor.com>
To: "Andy Sharp" <andy.sharp@onstor.com>,
	"Maxim Kozlovsky" <maxim.kozlovsky@onstor.com>

getopt() is part of util-linux

apt-get source util-linux

-----Original Message-----
From: Andy Sharp=20
Sent: Friday, April 06, 2007 11:24 AM
To: Maxim Kozlovsky
Cc: Larry Scheer
Subject: Re: how to find the source

On Fri, 6 Apr 2007 11:15:26 -0700 "Maxim Kozlovsky"
<maxim.kozlovsky@onstor.com> wrote:

> What is the general algorithm for getting the source of some linux
> library function or utility? In the current case, I want to look at
> the source for getopt(), how would I find out which package it
> belongs to and what is the command to get the source for it?

Eventually, Larry will have the source for everything we use checked
into the branch, but in the meantime you can use the apt-get source
command:

getopt is standard C library, so you would get the source for glibc.  i
believe the command would be

apt-get source libc6

In general, you have to know what package/library that function is in,
sometimes determinable from the man page, and get the source for that
package with apt-get source command.
