Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp302844ybg; Wed, 18 Mar 2020 23:28:13 -0700 (PDT) X-Google-Smtp-Source: ADFU+vspmNuOTAim9Dt0NeT+PjvUfEACp95qDA9/3aR6NDkR1JzTLlWI3J21wJWKlQ1ehiF435mE X-Received: by 2002:aca:4d86:: with SMTP id a128mr1244859oib.96.1584599293484; Wed, 18 Mar 2020 23:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584599293; cv=none; d=google.com; s=arc-20160816; b=TNURSEQf2nq11WzTbuJihKWJoBZ2wc35UEuTKhKilsljwDD9LxW/FhUkF6hDrBRrMz Sh5o6pKpXTdHh3EDIEUPde6zpNvSmvUOsfL9L0Di5K6VPb35JEM3ZDADcC6PyYjnAFR5 XJKyb3I4RT85syZekztmfw0eE6cvInIlAnKf9SZ5QNZAenFsolw2XVfyCjyVoZh2fXkE CImyuu1P9lvYBjBesM+aoPNG7FqA5m5I1i9bP5IYG8tfoVHe5mZokJL+7XG2w/IyzIR0 JcDvK2wZIkjApXIQUkUyHbrAuxDZVhKMH75eN1LtNKdLF9tyHdkDsGyPIeqxfPDt1CN0 XiXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=7r1NAJVroLlQ2f5/34ec0etZo3ip8EzvHMoBTd4gPmE=; b=II7+qS0YmXTCu3F3h4JJsFsxkiVtj3YvhPM9ZSvOdNYGCTqA6Ef7L/9hzPpBZK0rDD o66VOqVJBKbbQBS4C+Uep3z71PGI2iA0cNcOxW6GQu6fTVFW+JtUPg9egdOflToX5M+b c1t5Rsy8fINivdlGUvmw8lKyYpLYZPWJmtCoifXHULh/BKlp0tPtCTiv4Bz9jVMveAEW doHwzjmc/tPsuy+jWt+Ayrw6PbKrW4uIW76tfJHr2dDjBOnquA6cZaVydXiG9ilxqvsG zfniCxLQf1G05cOTyK1LBCZf0cZ1jTAXTnVvIod834w1Taxii8U57ffMItyfPINLCAMh bY+w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n7si864519otf.266.2020.03.18.23.28.00; Wed, 18 Mar 2020 23:28:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727009AbgCSG0i (ORCPT + 99 others); Thu, 19 Mar 2020 02:26:38 -0400 Received: from out30-131.freemail.mail.aliyun.com ([115.124.30.131]:39896 "EHLO out30-131.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725767AbgCSG0h (ORCPT ); Thu, 19 Mar 2020 02:26:37 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R291e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04391;MF=alex.shi@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0Tt04BxJ_1584599154; Received: from IT-FVFX43SYHV2H.local(mailfrom:alex.shi@linux.alibaba.com fp:SMTPD_---0Tt04BxJ_1584599154) by smtp.aliyun-inc.com(127.0.0.1); Thu, 19 Mar 2020 14:25:54 +0800 Subject: Re: [PATCH v2] Translate Documentation/filesystems/debugfs.txt into Chinese To: Chucheng Luo , Harry Wei , Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kernel@vivo.com References: <20200319030039.29006-1-luochucheng@vivo.com> From: Alex Shi Message-ID: <21d534e9-e7f6-f3ed-c7cc-0fd3691ad679@linux.alibaba.com> Date: Thu, 19 Mar 2020 14:25:54 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200319030039.29006-1-luochucheng@vivo.com> Content-Type: text/plain; charset=gbk Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2020/3/19 ????11:00, Chucheng Luo д??: > Translate debugfs.txt into Chinese and link it to the index. > > Signed-off-by: Chucheng Luo > Acked-by: Jonathan Corbet > --- > .../zh_CN/filesystems/debugfs.rst | 257 ++++++++++++++++++ > .../translations/zh_CN/filesystems/index.rst | 19 ++ > Documentation/translations/zh_CN/index.rst | 1 + > 3 files changed, 277 insertions(+) > create mode 100755 Documentation/translations/zh_CN/filesystems/debugfs.rst > create mode 100755 Documentation/translations/zh_CN/filesystems/index.rst > > diff --git a/Documentation/translations/zh_CN/filesystems/debugfs.rst b/Documentation/translations/zh_CN/filesystems/debugfs.rst > new file mode 100755 > index 000000000000..02f639445d3d > --- /dev/null > +++ b/Documentation/translations/zh_CN/filesystems/debugfs.rst > @@ -0,0 +1,257 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +.. include:: ../disclaimer-zh_CN.rst > + > +:Original: :ref:`Documentation/filesystems/debugfs.txt` > + > +========================== > +Debugfs > +========================== > + > +???? > +:: > + > + ???Ä°?ά???ߣ? ?Þ³??? Chucheng Luo > + ???Ä°æ·­???ߣ? ?Þ³??? Chucheng Luo > + ???Ä°?У????: ?Þ³??? Chucheng Luo > + > + > + > + > +??Ȩ????2009 Jonathan Corbet > + > +???? > +==== > + > +Debugfs???ں˿?????Ô±???û??Õ¼???È¡??Ï¢?ļ????????? > +??/proc??ͬ??procÖ»?ṩ??????Ï¢??Ò²????sysfs,?????ϸ??Ä¡?ÿ???ļ?Ò»??Öµ???Ĺ????? > +debugfs????û?й???????????Ô±???Ô·?????????Òª???κ???Ï¢?????ï¡£ > +debugfs?ļ?ϵͳҲ?????????ȶ??? Could we follow 80 chars rule here and all following? > +ABI?Ó¿Úµ??û??ռ䣻???????Ͻ????ļ???debugfs?ïµ¼??û???κ??ȶ??Ôµ?Ô¼???? > +????[1]??ʵ???ç²¢????????ô?????? > +??ʹ??debugfs?Ó¿Ú£?Ò²???ø?????Òª???????? > +??Ô¶??????È¥?? It's hard to understand in Chinese here. > + > +?÷? > +==== > + > +Debugfsͨ??ʹ?????????î°²×°:: > + > + mount -t debugfs none /sys/kernel/debug > + > +??????Ч??/etc/fstab?У??? > +debugfs??Ŀ¼Ĭ?Ͻ?????root?û????Ê¡? > +Òª???Ķ????Ä·??Ê£???ʹ?á? uid?????? gid???Í¡? mode??????Ñ¡?î¡£ > + > +??×¢?⣬debugfs API??????ΪGPL??Ä£?é¡£ > + > +ʹ??debugfs?Ä´???Ó¦??????È»??????Ò»?? > +Òµ?????Ç´???????Ò»??Ŀ¼??????Ò»??debugfs?ļ?:: > + > + struct dentry *debugfs_create_dir(const char *name, struct dentry *parent); > + > +?????ɹ????˵??ý???Ö¸???ĸ?Ŀ¼Ŀ¼?´???Ò»????Ϊname??Ŀ¼?? > +????parentΪNULL????Ŀ¼Ϊ > +??debugfs??Ŀ¼?д??????ɹ?ʱ??????Öµ??Ò»???á¹¹ > +dentryÖ¸?룬????????Ŀ¼?д????ļ????Ô¼? > +?????????????ɾ????? ERR_PTR??-ERROR??????Öµ???????í¡£????????ERR_PTR??-ENODEV??????Ϊ > +?????Úº?????û??debugfsÖ§?Öµ??????¹????Ä£????????????????????????á? > + > +??debugfsĿ¼?д????ļ?????ͨ?÷?????:: > + > + struct dentry *debugfs_create_file(const char *name, umode_t mode, > + struct dentry *parent, void *data, > + const struct file_operations *fops); > + > +?????name??Òª???????ļ??????Æ£?mode?????Ë·??? > +?ļ?Ó¦???е?Ȩ?Þ£?parentÖ¸??Ó¦?ñ????ļ???Ŀ¼ > +??data???æ´¢?Ú²?????inode?á¹¹??i_private?Ö¶??? > +????fops??Ò»???ļ??????????? > +ʵ???ļ?????Ϊ?????Ù£?read??????/??write???? > +????Ó¦?ṩ?????????Ô¸?????Òª???????Ú¡??ٴΣ? > +????Öµ????Ö¸???????ļ???dentryÖ¸?룬 > +????ʱ??ʾERR_PTR??-ERROR??????Ö§??debugfsʱ????ֵΪERR_PTR??-ENODEV???? > + > +????Ò»????ʼ??С???ļ???????ʹ?????º???????:: > + > + struct dentry *debugfs_create_file_size(const char *name, umode_t mode, > + struct dentry *parent, void *data, > + const struct file_operations *fops, > + loff_t file_size); > + > +file_size?dz?ʼ?ļ???С????????????????debugfs_create_file????ͬ?? > + > +???????????£?????Ò»???ļ????????? > +ʵ?ʱ?Òª?Ä£? Change to "û??ʵ?ʱ?Ҫȥ????Ò»???ļ?????" ? Chinese often has different words sequence from English in sentence. Please pay attention on this. ???Ú¼???????????debugfs?????ṩ?????????????? > +??????????????Öµ???ļ?????ʹ???????κ?Ò»?î´´??:: > + > + void debugfs_create_u8(const char *name, umode_t mode, > + struct dentry *parent, u8 *value); > + void debugfs_create_u16(const char *name, umode_t mode, > + struct dentry *parent, u16 *value); > + struct dentry *debugfs_create_u32(const char *name, umode_t mode, > + struct dentry *parent, u32 *value); > + void debugfs_create_u64(const char *name, umode_t mode, > + struct dentry *parent, u64 *value); > + > +??Щ?ļ?Ö§?Ö¶?È¡??д??????Öµ?????????? > +??Ӧд???ļ???Ö»????Ó¦??????ģʽλ???? > +??Щ?ļ??е?Öµ??Ê®???Ʊ?ʾ??????Ê®?????Ƹ????Ê£? > +????ʹ?????¹???:: > + > + void debugfs_create_x8(const char *name, umode_t mode, > + struct dentry *parent, u8 *value); > + void debugfs_create_x16(const char *name, umode_t mode, > + struct dentry *parent, u16 *value); > + void debugfs_create_x32(const char *name, umode_t mode, > + struct dentry *parent, u32 *value); > + void debugfs_create_x64(const char *name, umode_t mode, > + struct dentry *parent, u64 *value); > + > +Ö»Òª??????Ô±Öª??????Öµ?Ä´?С????Щ???ܾͺ????á? > +ijЩ?????Ú²?ͬ?ļܹ??Ï¿??Ô¾??в?ͬ?Ä¿??? > +???Ç£???????ʹ??????????Щ???Ó¡??? > +???????????????¿????ṩ?????Ĺ???:: > + > + void debugfs_create_size_t(const char *name, umode_t mode, > + struct dentry *parent, size_t *value); > + > +???????Ï£??˺?????????Ò»??debugfs?ļ?????ʾ > +????Ϊsize_t?ı????? > + > +ͬ???Ø£?Ò²???Þ·??ų??????ͱ????????Ö£???Ê®???Ʊ?ʾ > +??Ê®??????:: > + > + struct dentry *debugfs_create_ulong(const char *name, umode_t mode, > + struct dentry *parent, > + unsigned long *value); > + void debugfs_create_xul(const char *name, umode_t mode, > + struct dentry *parent, unsigned long *value); > + > +????Öµ????ͨ?????·?ʽ??????debugfs??:: > + > + struct dentry *debugfs_create_bool(const char *name, umode_t mode, > + struct dentry *parent, bool *value); > + > + > +??È¡?????ļ???????Y?????Ú·???Öµ???? > +N?????????з???????д?룬???????Ü´?д?? > +Сдֵ??1??0???κ????????뽫?????Ô¡? > + > +ͬ????????ʹ?????????atomic_tÖµ??????debugfs??:: > + > + void debugfs_create_atomic_t(const char *name, umode_t mode, > + struct dentry *parent, atomic_t *value) > + > +??È¡???ļ???????atomic_tÖµ????д?????ļ? > +??????atomic_tÖµ?? > + > +??Ò»??Ñ¡???ǵ???Ò»???????????????ݿ飬 > +?????á¹¹?͹???:: > + > + struct debugfs_blob_wrapper { > + void *data; > + unsigned long size; > + }; > + > + struct dentry *debugfs_create_blob(const char *name, umode_t mode, > + struct dentry *parent, > + struct debugfs_blob_wrapper *blob); > + > +??È¡???ļ?????????Ö¸??Ö¸??debugfs_blob_wrapper?á¹¹ > +?????Ý¡?һЩ????ʹ?á?blobs????Ϊһ?Ö¼????Ä·??? > +???ؼ??У???̬????ʽ???ı??????????????? > +?????Úµ???????????Ï¢?????ƺ?û?? > +????????Ö´?д˲??????κδ??ë¡£??×¢?⣬ʹ??debugfs_create_blob???????î´´?????????ļ? > +??Ö»???Ä¡? > + > +??????Ҫת??Ò»???Ä´????飨???????????൱ > +ͨ???Ú¿????????У???ʹ???????????Ä´??ëµ½?????ß¡? > +Debugfs?ṩ???????Ü£?Ò»?????Ú´??????Ä´????ļ?????Ò»?? > +??Ò»???Ä´?????????Ò»??˳???ļ???:: > + > + struct debugfs_reg32 { > + char *name; > + unsigned long offset; > + }; > + > + struct debugfs_regset32 { > + struct debugfs_reg32 *regs; > + int nregs; > + void __iomem *base; > + }; > + > + struct dentry *debugfs_create_regset32(const char *name, umode_t mode, > + struct dentry *parent, > + struct debugfs_regset32 *regset); > + > + void debugfs_print_regs32(struct seq_file *s, struct debugfs_reg32 *regs, > + int nregs, void __iomem *base, char *prefix); > + > +??base??????????Ϊ0????????????Òª????reg32???? > +ʹ??__stringify??ʵ???????????Ä´??????Æ£??꣩ > +?Ä´??????Ä»?Ö·?ϵ??Ö½?Æ«?????? > + > +????Òª??debugfs??ת??u32???飬????ʹ?????????î´´???ļ?:: > + > + void debugfs_create_u32_array(const char *name, umode_t mode, > + struct dentry *parent, > + u32 *array, u32 elements); > + > +??array???????ṩ???Ý£?????elements??????Ϊ > +??????Ôª?ص???????×¢?⣺???????????? > +??С?Þ·????Ä¡? > + > +??Ò»???????????????????豸???ص?seq_file:: > + > + struct dentry *debugfs_create_devm_seqfile(struct device *dev, > + const char *name, > + struct dentry *parent, > + int (*read_fn)(struct seq_file *s, > + void *data)); > + > +??dev????????????debugfs?ļ????ص??豸?????? > +??read_fn????Ò»??????Ö¸?룬?????????Ô´?Ó¡ > +seq_file???Ý¡? > + > +????һЩ??????????Ŀ¼?Ä°?????????:: > + > + struct dentry *debugfs_rename(struct dentry *old_dir, > + struct dentry *old_dentry, > + struct dentry *new_dir, > + const char *new_name); > + > + struct dentry *debugfs_create_symlink(const char *name, > + struct dentry *parent, > + const char *target); > + > +????debugfs_rename()??Ϊ???е?debugfs?ļ??ṩһ???????Æ£? > +??????????Ŀ¼?С? new_name????????֮ǰ???Ü´??Ú£? > +????ֵΪold_dentry?????а??????µ???Ï¢?? > +????ʹ??debugfs_create_symlink???????????????Ó¡? > + > +????debugfs?û????뿼?ǵ?Ò»?????Ç£? > +û???Ô¶???????debugfs?д??????κ?Ŀ¼??????Ò»?? > +?Ú²???ʽɾ??debugfs??Ä¿????????ж??Ä£?飬???? > +?????кܶ??¾ɵ?Ö¸?룬??û??û?˵ĸ߶ȷ???????Ϊ?? it's hard to understand. > +???Ë£?????debugfs?û?-????????Щ??????Ϊģ?é¹¹?????û?-???? > +×¼??ɾ???Ú´Ë´??????????ļ???Ŀ¼??Ò»???ļ? > +????ͨ?????·?ʽɾ??:: > + > + void debugfs_remove(struct dentry *dentry); > + > +dentryÖµ????ΪNULL??????Öµ?????????????£????????κν??? > +??ɾ???? > + > +??Ç°??debugfs?û???Òª??ס??dentry > +???Ç´?????ÿ??debugfs?ļ???Ö¸?룬?Ô±??????ļ??????? Could you understand this? > +???í¡£???Ç£??????????????Ú¸?????????ʱ????????debugfs?û? > +?ܵ???:: > + > + void debugfs_remove_recursive(struct dentry *dentry); > + > +?????????˴˺?????????Ó¦?? > +????Ŀ¼????Ŀ¼?µ????????νṹ???ᱻɾ???? > + > +×¢?⣺ > +[1] http://lwn.net/Articles/309298/ > diff --git a/Documentation/translations/zh_CN/filesystems/index.rst b/Documentation/translations/zh_CN/filesystems/index.rst > new file mode 100755 > index 000000000000..79b6c20f9575 > --- /dev/null > +++ b/Documentation/translations/zh_CN/filesystems/index.rst > @@ -0,0 +1,19 @@ > +=============================== > +Linux ?Úº??е??ļ?ϵͳ > +=============================== > + > +????????????Ö¸????ijһ?콫???ṩ????Linux ?????ļ?ϵͳ(VFS)?????ι????? > +??????Ï¢???Ô¼?VFS???µĵ??ļ?ϵͳ??ĿǰΪֹ???????ṩ????????Ï¢?? > + > + > + > + > +?ļ?ϵͳ > +=========== > + > +?????ļ?ϵͳʵ?Öµ??ĵ?. > + > +.. toctree:: > + :maxdepth: 2 > + > + debugfs > diff --git a/Documentation/translations/zh_CN/index.rst b/Documentation/translations/zh_CN/index.rst > index d3165535ec9e..76850a5dd982 100644 > --- a/Documentation/translations/zh_CN/index.rst > +++ b/Documentation/translations/zh_CN/index.rst > @@ -14,6 +14,7 @@ > :maxdepth: 2 > > process/index > + filesystems/index > > Ŀ¼?ͱ??? > ---------- >