浏览代码

kernel-doc: fix leading dot in man-mode output

If a parameter description begins with a '.', this indicates a "request"
for "man" mode output (*roff), so it needs special handling.

Problem case is in include/asm-i386/atomic.h for function
atomic_add_unless():
 * @u: ...unless v is equal to u.
This parameter description is currently not printed in man mode output.

[akpm@linux-foundation.org: cleanup]
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Randy Dunlap 18 年之前
父节点
当前提交
cdccb316c0
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      scripts/kernel-doc

+ 5 - 1
scripts/kernel-doc

@@ -404,7 +404,11 @@ sub output_highlight {
 	    print $lineprefix, $blankline;
 	    print $lineprefix, $blankline;
 	} else {
 	} else {
 	    $line =~ s/\\\\\\/\&/g;
 	    $line =~ s/\\\\\\/\&/g;
-	    print $lineprefix, $line;
+	    if ($output_mode eq "man" && substr($line, 0, 1) eq ".") {
+		print "\\&$line";
+	    } else {
+		print $lineprefix, $line;
+	    }
 	}
 	}
 	print "\n";
 	print "\n";
     }
     }