2012/6/22 <kernelnewbies-request@kernelnewbies.org>
Send Kernelnewbies mailing list submissions to kernelnewbies@kernelnewbies.org
To subscribe or unsubscribe via the World Wide Web, visit http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies or, via email, send a message with subject or body 'help' to kernelnewbies-request@kernelnewbies.org
You can reach the person managing the list at kernelnewbies-owner@kernelnewbies.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Kernelnewbies digest..."
Today's Topics:
1. Re: download the source code of some commands (Greg Freemyer) 2. could some current.h files be simplified? (Robert P. J. Day) 3. Re: download the source code of some commands (Wang Lei) 4. Re: download the source code of some commands (??) 5. Re: Kernel Memory (michi1@michaelblizek.twilightparadox.com)
----------------------------------------------------------------------
Message: 1 Date: Thu, 21 Jun 2012 10:42:12 -0400 From: Greg Freemyer <greg.freemyer@gmail.com> Subject: Re: download the source code of some commands To: ?? <wangzhe5004@gmail.com> Cc: kernelnewbies <kernelnewbies@kernelnewbies.org> Message-ID: <CAGpXXZLM7s_=2xWcEDFtSrj_0-EjgP7aP7XNu1XEmZMEhXT53w@mail.gmail.com
Content-Type: text/plain; charset=UTF-8
On Thu, Jun 21, 2012 at 8:48 AM, ?? <wangzhe5004@gmail.com> wrote:
? Hi all: ? ? ?? I want to see some source code of some commands,for example,halt,reboot,uptime,and so on.
but i don't kown where to download??? can you give me some advice?
Thanks in advance!
You need to figure out how your distro of choice lets you query the filelist for packages.
I use openSUSE primarily and it has the Yast tool that lets you do that in the software management section.
uptime => coreutils reboot => aaa_base halt => aaa_base
Once you know the package your distro uses you can download the corresponding source package for it.
You will have better luck learning the process you need to know by asking on a distro specific mailing list.
Greg
hi, you can use the download tool to get the sources code. eg: apt-get source ssh (ubuntu) you can get ssh source code. but, not all !
------------------------------
Message: 2 Date: Thu, 21 Jun 2012 10:54:59 -0400 (EDT) From: "Robert P. J. Day" <rpjday@crashcourse.ca> Subject: could some current.h files be simplified? To: Kernel Newbies <kernelnewbies@kernelnewbies.org> Message-ID: <alpine.DEB.2.02.1206211048240.22454@oneiric> Content-Type: TEXT/PLAIN; charset=US-ASCII
it *seems* as if a number of current.h files from various architectures could be simplified. here's <asm-generic/current.h>, which gives any architecture a generic starting point in defining both get_current() and current:
#ifndef __ASM_GENERIC_CURRENT_H #define __ASM_GENERIC_CURRENT_H
#include <linux/thread_info.h>
#define get_current() (current_thread_info()->task) #define current get_current()
#endif /* __ASM_GENERIC_CURRENT_H */
and if that's acceptable, any architecture is welcome to simply include it as, for instance, mips does in <asm/current.h>:
#include <asm-generic/current.h>
but here's the current.h file for parisc:
#ifndef _PARISC_CURRENT_H #define _PARISC_CURRENT_H
#include <linux/thread_info.h>
struct task_struct;
static inline struct task_struct * get_current(void) { return current_thread_info()->task; }
#define current get_current()
#endif /* !(_PARISC_CURRENT_H) */
i'm not sure i see why the generic version wasn't adequate for parisc (apart from the explicit pointer casting). same thing with the cris architecture and, i'm sure, others.
is there any reason why some of those current.h files can't just include the generic one?
rday
--
======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca
Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ========================================================================
------------------------------
Message: 3 Date: Thu, 21 Jun 2012 23:22:49 +0800 From: Wang Lei <f3d27b@gmail.com> Subject: Re: download the source code of some commands To: ?? <wangzhe5004@gmail.com> Cc: kernelnewbies <kernelnewbies@kernelnewbies.org> Message-ID: <4fe33c55.83da440a.4026.ffffc75b@mx.google.com> Content-Type: text/plain; charset=utf-8
If you use Debian or other distribution with apt package system.
You can use whereis to locate this command. [~]$ whereis halt halt: /sbin/halt /usr/share/man/man5/halt.5.gz /usr/share/man/man8/halt.8.gz
Then, use dpkg -S to show which package it's included. This one is: sysvinit. [~]$ dpkg -S /sbin/halt sysvinit: /sbin/halt
Now, you can download the source from Debian source, use: [~]$ apt-get source sysvinit
Or if you want the original source, use aptitude (or apt-cache) find it's homepage. [~]$ aptitude show sysvinit Package: sysvinit ...... Homepage: http://savannah.nongnu.org/projects/sysvinit
At last, get it from there. As for other package systems, I think there should be a way too. Or you can google.
On 2012-06-21 20:48:48 +0800, ?? wrote:
Hi all: I want to see some source code of some commands,for example,halt,reboot,uptime,and so on.
but i don't kown where to download? can you give me some advice?
Thanks in advance! _______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- Regards, Lei
------------------------------
Message: 4 Date: Thu, 21 Jun 2012 23:46:21 +0800 From: ?? <wangzhe5004@gmail.com> Subject: Re: download the source code of some commands To: Wang Lei <f3d27b@gmail.com> Cc: kernelnewbies <kernelnewbies@kernelnewbies.org> Message-ID: <CAJrRU3XDpS620jOe+Q8W+siuGvR3CzzJOHZg3e+pWSSU5t0Tuw@mail.gmail.com
Content-Type: text/plain; charset="gb2312"
2012/6/21 Wang Lei <f3d27b@gmail.com>
If you use Debian or other distribution with apt package system.
You can use whereis to locate this command. [~]$ whereis halt halt: /sbin/halt /usr/share/man/man5/halt.5.gz /usr/share/man/man8/halt.8.gz
Then, use dpkg -S to show which package it's included. This one is: sysvinit. [~]$ dpkg -S /sbin/halt sysvinit: /sbin/halt
Now, you can download the source from Debian source, use: [~]$ apt-get source sysvinit
Or if you want the original source, use aptitude (or apt-cache) find it's homepage. [~]$ aptitude show sysvinit Package: sysvinit ...... Homepage: http://savannah.nongnu.org/projects/sysvinit
At last, get it from there. As for other package systems, I think there should be a way too. Or you can google.
Thank you very much ! i follow your steps, and download the source code successfully.
On 2012-06-21 20:48:48 +0800, ?? wrote:
Hi all: I want to see some source code of some commands,for example,halt,reboot,uptime,and so on.
but i don't kown where to download? can you give me some advice?
Thanks in advance!
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
-- Regards, Lei