編譯linux核心 Documentation 為man手冊

來源:互聯網
上載者:User

 編譯linux核心 Documentation 為man手冊 收藏
對每一個linux核心以及驅動開發人員來說,核心內建的 Documentation目錄無疑是一個非常非常有用的參考資料和學習資料。建議多讀~

當我們在寫驅動或者修改核心的時候,可能需要用到某些kernel api,我們也想能夠像libc api那樣可以通過man手冊查看其使用方法,毫無疑問,直接到核心 source code 裡面去尋找到相關的函數定義是一種方法,但是顯得比較麻煩。你可以將核心api安裝為man手冊,然後你就可以很方便的 man  xxx-kernel-api  了。具體步驟如下(based on FC6 ):

(1)在kernel source的頂層目錄,執行make installmandocs就可以將man 手冊安裝到 /usr/local/man/man9下面了。

    NOTES: 注意,如果在執行make installmandocs的時候需要其他的一些工具程式,可以使用yum工具來進行線上安裝,比如,我的系統在make installmandocs時報缺少xmlto,所以執行yum install xmlto安裝好需要的工具之後再執行make installmandocs就可以了。

 自此,已經安裝好了。下面show一段: man copy_from_user

COPY_FROM_USER(9)          User Space Memory Access          COPY_FROM_USER(9)

 

NAME
       copy_from_user - Copy a block of data from user space.

SYNOPSIS
       unsigned long copy_from_user (void * to, const void __user * from,
                                    unsigned long n);

ARGUMENTS
       to     Destination address, in kernel space.

       from   Source address, in user space.

       n      Number of bytes to copy.

CONTEXT
       User context only. This function may sleep.

DESCRIPTION
       Copy data from user space to kernel space.

       Returns number of bytes that could not be copied. On success, this will
       be zero.

       If some data could not be copied, this function will pad the copied
       data to the requested size using zero bytes.

 

Kernel Hackers Manual            January 2008                COPY_FROM_USER(9)

本文來自CSDN部落格,轉載請標明出處:http://blog.csdn.net/bshawk/archive/2008/01/27/2068676.aspx

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.