1 Star 0 Fork 91

wuzx / systemd

forked from src-openEuler / systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-dns-domain-re-introduce-dns_name_is_empty.patch 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
From 435a9af906c02d8024811311b012c9d7a2400009 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Mon, 24 Jan 2022 06:06:55 +0900
Subject: [PATCH] dns-domain: re-introduce dns_name_is_empty()
(cherry picked from commit 7bdf41983044268b4bc2f9d34462db7f89ba284a)
(cherry picked from commit df08c12062dfd9903edec371598412a47a3055e0)
Conflict:NA
Reference:https://github.com/systemd/systemd/commit/435a9af906c02d8024811311b012c9d7a2400009
---
src/shared/dns-domain.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/shared/dns-domain.h b/src/shared/dns-domain.h
index c25fcaacc2..24bf00bd58 100644
--- a/src/shared/dns-domain.h
+++ b/src/shared/dns-domain.h
@@ -60,6 +60,10 @@ static inline int dns_name_is_valid_ldh(const char *s) {
return 1;
}
+static inline bool dns_name_is_empty(const char *s) {
+ return isempty(s) || streq(s, ".");
+}
+
void dns_name_hash_func(const char *s, struct siphash *state);
int dns_name_compare_func(const char *a, const char *b);
extern const struct hash_ops dns_name_hash_ops;
--
2.33.0
1
https://gitee.com/wuzx065891/systemd.git
git@gitee.com:wuzx065891/systemd.git
wuzx065891
systemd
systemd
master

搜索帮助