Compare commits

...

3 Commits

Author SHA1 Message Date
Oğuz Ersen 78d411cb97 Translated using Weblate (Turkish)
Currently translated at 100.0% (133 of 133 strings)

Co-authored-by: Oğuz Ersen <oguzersen@protonmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/tr/
Translation: systemd/master
2020-09-26 19:36:31 +02:00
Lennart Poettering 911ba62408 repart: use proper API to check if block device can do partition scanning
We have the API wrapper already, hence use it, instead of using a
limited version of it that only works for loopback devices.
2020-09-26 18:31:48 +02:00
huangyong 49580df38c Add Chinese translation 2020-09-26 18:23:05 +02:00
3 changed files with 8 additions and 35 deletions

View File

@ -10,7 +10,7 @@ msgstr ""
"Project-Id-Version: systemd master\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-19 18:02+0200\n"
"PO-Revision-Date: 2020-09-18 23:03+0000\n"
"PO-Revision-Date: 2020-09-26 06:29+0000\n"
"Last-Translator: Oğuz Ersen <oguzersen@protonmail.com>\n"
"Language-Team: Turkish <https://translate.fedoraproject.org/projects/systemd/"
"master/tr/>\n"
@ -156,8 +156,8 @@ msgid ""
"Authentication is required to set the statically configured local hostname, "
"as well as the pretty hostname."
msgstr ""
"Statik olarak yapılandırılmış konak makine adını ve yerel makine adını "
"ayarlamak kimlik doğrulaması gerektiriyor."
"Statik olarak yapılandırılmış yerel (ana) makine adını ve okunaklı (ana) "
"makine adını ayarlamak kimlik doğrulaması gerektiriyor."
#: src/hostname/org.freedesktop.hostname1.policy:41
msgid "Set machine information"

View File

@ -626,7 +626,7 @@ msgstr "管理本地的虚拟机和容器镜像需要认证。"
#: src/network/org.freedesktop.network1.policy:22
msgid "Set NTP servers"
msgstr ""
msgstr "设置 NTP 服务器"
#: src/network/org.freedesktop.network1.policy:23
#, fuzzy
@ -649,7 +649,7 @@ msgstr "设置系统时间需要认证。"
#: src/network/org.freedesktop.network1.policy:44
#: src/resolve/org.freedesktop.resolve1.policy:55
msgid "Set domains"
msgstr ""
msgstr "设置域名"
#: src/network/org.freedesktop.network1.policy:45
#: src/resolve/org.freedesktop.resolve1.policy:56
@ -661,7 +661,7 @@ msgstr "停止“$(unit)”需要认证。"
#: src/network/org.freedesktop.network1.policy:55
#: src/resolve/org.freedesktop.resolve1.policy:66
msgid "Set default route"
msgstr ""
msgstr "设置默认路由"
#: src/network/org.freedesktop.network1.policy:56
#: src/resolve/org.freedesktop.resolve1.policy:67

View File

@ -2995,33 +2995,6 @@ static int context_acquire_partition_uuids_and_labels(Context *context) {
return 0;
}
static int device_kernel_partitions_supported(int fd) {
struct loop_info64 info;
struct stat st;
assert(fd >= 0);
if (fstat(fd, &st) < 0)
return log_error_errno(fd, "Failed to fstat() image file: %m");
if (!S_ISBLK(st.st_mode))
return -ENOTBLK; /* we do not log in this one special case about errors */
if (ioctl(fd, LOOP_GET_STATUS64, &info) < 0) {
if (ERRNO_IS_NOT_SUPPORTED(errno) || errno == EINVAL)
return true; /* not a loopback device, let's assume partition are supported */
return log_error_errno(fd, "Failed to issue LOOP_GET_STATUS64 on block device: %m");
}
#if HAVE_VALGRIND_MEMCHECK_H
/* Valgrind currently doesn't know LOOP_GET_STATUS64. Remove this once it does */
VALGRIND_MAKE_MEM_DEFINED(&info, sizeof(info));
#endif
return FLAGS_SET(info.lo_flags, LO_FLAGS_PARTSCAN);
}
static int context_mangle_partitions(Context *context) {
Partition *p;
int r;
@ -3233,11 +3206,11 @@ static int context_write_partition_table(
if (r < 0)
return log_error_errno(r, "Failed to write partition table: %m");
capable = device_kernel_partitions_supported(fdisk_get_devfd(context->fdisk_context));
capable = blockdev_partscan_enabled(fdisk_get_devfd(context->fdisk_context));
if (capable == -ENOTBLK)
log_debug("Not telling kernel to reread partition table, since we are not operating on a block device.");
else if (capable < 0)
return capable;
return log_error_errno(capable, "Failed to check if block device supports partition scanning: %m");
else if (capable > 0) {
log_info("Telling kernel to reread partition table.");