代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/attr 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From e4c006f07f050e0af08602d0064c3420080b7313 Mon Sep 17 00:00:00 2001
From: Jeff Layton <jlayton@kernel.org>
Date: Thu, 13 Jun 2019 10:55:35 -0400
Subject: [PATCH 4/7] getfattr: don't count terminating NULL in
well_enough_printable
If the value is a string with the terminating NUL included in the
length, then don't count that terminating NUL when determining whether
the string is printable. This is consistent with the fact that getfattr
doesn't print the terminating NUL character in --encoding=text (commit
7fed4441e12d).
Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
tools/getfattr.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/getfattr.c b/tools/getfattr.c
index 72a8852..0ba5781 100644
--- a/tools/getfattr.c
+++ b/tools/getfattr.c
@@ -110,6 +110,10 @@ int well_enough_printable(const char *value, size_t size)
{
size_t n, nonpr = 0;
+ /* Don't count the NULL terminator if there is one */
+ if (size && !value[size - 1])
+ size--;
+
for (n=0; n < size; n++)
if (!isprint(*value++))
nonpr++;
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。