[systemd-commits] 5 commits - po/ru.po src/bootchart src/fstab-generator src/shared

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Mon Mar 23 21:12:20 PDT 2015


 po/ru.po                              |   16 ++++++++++++----
 src/bootchart/bootchart.c             |    9 ---------
 src/bootchart/store.c                 |    2 +-
 src/fstab-generator/fstab-generator.c |   21 +++++++++++++--------
 src/shared/generator.c                |    5 +++++
 src/shared/util.c                     |   29 +++++++++++++++++++++++++++++
 src/shared/util.h                     |    1 +
 7 files changed, 61 insertions(+), 22 deletions(-)

New commits:
commit c03d5c8e766792a298d8bcdf550c2fd01dd7b959
Author: Sergey Ptashnick <0comffdiz at inbox.ru>
Date:   Sun Mar 22 22:00:13 2015 +0300

    po: update Russian translation
    
    Add strings for importd, following 587fec427c.

diff --git a/po/ru.po b/po/ru.po
index 00e8d32..7682513 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: systemd\n"
 "Report-Msgid-Bugs-To: 0comffdiz at inbox.ru\n"
 "POT-Creation-Date: 2013-03-24 19:22+0300\n"
-"PO-Revision-Date: 2015-03-08 17:15+0300\n"
+"PO-Revision-Date: 2015-03-22 21:53+0300\n"
 "Last-Translator: Sergey Ptashnick <0comffdiz at inbox.ru>\n"
 "Language: ru\n"
 "MIME-Version: 1.0\n"
@@ -88,10 +88,18 @@ msgid "Authentication is required to import a VM or container image"
 msgstr "Чтобы импортировать образ виртуальной машины или контейнера, необходимо пройти аутентификацию."
 
 #: ../src/import/org.freedesktop.import1.policy.in.h:3
+msgid "Export a VM or container image"
+msgstr "Экспортировать образ виртуальной машины или контейнера"
+
+#: ../src/import/org.freedesktop.import1.policy.in.h:4
+msgid "Authentication is required to export a VM or container image"
+msgstr "Чтобы экспортировать образ виртуальной машины или контейнера, необходимо пройти аутентификацию."
+
+#: ../src/import/org.freedesktop.import1.policy.in.h:5
 msgid "Download a VM or container image"
 msgstr "Загрузить образ виртуальной машины или контейнера"
 
-#: ../src/import/org.freedesktop.import1.policy.in.h:4
+#: ../src/import/org.freedesktop.import1.policy.in.h:6
 msgid "Authentication is required to download a VM or container image"
 msgstr "Чтобы загрузить образ виртуальной машины или контейнера, необходимо пройти аутентификацию."
 
@@ -375,12 +383,12 @@ msgstr "Включить или выключить синхронизацию в
 msgid "Authentication is required to control whether network time synchronization shall be enabled."
 msgstr "Чтобы включить или выключить синхронизацию времени по сети, необходимо пройти аутентификацию."
 
-#: ../src/fsckd/fsckd.c:186
+#: ../src/fsckd/fsckd.c:297
 msgid "Press Ctrl+C to cancel all filesystem checks in progress"
 msgstr "Чтобы прервать все запущенные проверки файловых систем, нажмите Ctrl+C"
 
 # There is no difference between "на 2 дисках" (plural==1) and "на 5 дисках" (plural==2)
-#: ../src/fsckd/fsckd.c:227
+#: ../src/fsckd/fsckd.c:343
 #, c-format
 msgid "Checking in progress on %d disk (%3.1f%% complete)"
 msgid_plural "Checking in progress on %d disks (%3.1f%% complete)"

commit de49f273e20bd37a5644f58175fe66203c9e4b04
Author: Shawn Landden <shawn at churchofgit.com>
Date:   Mon Mar 23 03:51:35 2015 -0700

    bootchart: more useful error message for common error
    
    Reported-by: tfirg_ on IRC

diff --git a/src/bootchart/store.c b/src/bootchart/store.c
index 607cc5e..dfa681f 100644
--- a/src/bootchart/store.c
+++ b/src/bootchart/store.c
@@ -176,7 +176,7 @@ vmstat_next:
                 /* overall CPU utilization */
                 schedstat = openat(procfd, "schedstat", O_RDONLY);
                 if (schedstat == -1) {
-                        log_error_errno(errno, "Failed to open /proc/schedstat: %m");
+                        log_error_errno(errno, "Failed to open /proc/schedstat (requires CONFIG_SCHEDSTATS=y in kernel config): %m");
                         exit(EXIT_FAILURE);
                 }
         }

commit b53a2485a43a59f3a8e45baabac6fc84a53cb3e6
Author: Shawn Landden <shawn at churchofgit.com>
Date:   Mon Mar 23 03:48:41 2015 -0700

    bootchart: remove duplicated code, prevent creating empty files
    
    In Debian and rawhide Fedora, which have CONFIG_SCHEDSTATS=n,
    bootchart creates empty files in /run/log before printing an error.
    Stop doing that.
    
    Moreover this duplicated part of the code doesn't even have error checking
    so there is no error avoided by doing this early.
    
    Reported-by: tfirg_ on IRC

diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c
index 99ffb86..71dffc9 100644
--- a/src/bootchart/bootchart.c
+++ b/src/bootchart/bootchart.c
@@ -395,15 +395,6 @@ int main(int argc, char *argv[]) {
                 sampledata->sampletime = gettime_ns();
                 sampledata->counter = samples;
 
-                if (!of && (access(arg_output_path, R_OK|W_OK|X_OK) == 0)) {
-                        t = time(NULL);
-                        r = strftime(datestr, sizeof(datestr), "%Y%m%d-%H%M", localtime(&t));
-                        assert_se(r > 0);
-
-                        snprintf(output_file, PATH_MAX, "%s/bootchart-%s.svg", arg_output_path, datestr);
-                        of = fopen(output_file, "we");
-                }
-
                 if (sysfd < 0)
                         sysfd = open("/sys", O_RDONLY|O_CLOEXEC);
 

commit fb02a2775a65198db606d8fc3a03852ce843378f
Author: Tobias Hunger <tobias.hunger at gmail.com>
Date:   Tue Mar 24 00:53:00 2015 +0100

    fstab-generator: Do not check deviceless filesystems
    
    There is no need to check those.

diff --git a/src/shared/generator.c b/src/shared/generator.c
index 569b25b..c348ca2 100644
--- a/src/shared/generator.c
+++ b/src/shared/generator.c
@@ -42,6 +42,11 @@ int generator_write_fsck_deps(
         assert(what);
         assert(where);
 
+        if (fstype_is_deviceless(fstype)) {
+                log_debug("Not checking deviceless filesystem \"%s\".", fstype);
+                return 0;
+        }
+
         if (!is_device_path(what)) {
                 log_warning("Checking was requested for \"%s\", but it is not a device.", what);
                 return 0;

commit b0438462089d1e1460429a57718305de08985908
Author: Tobias Hunger <tobias.hunger at gmail.com>
Date:   Tue Mar 24 00:52:59 2015 +0100

    fstab-generator: Support root on tmpfs (or other deviceless FS)
    
    This allows for stateless systems.

diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index 2ece12f..77c97fd 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -397,15 +397,20 @@ static int add_root_mount(void) {
         _cleanup_free_ char *what = NULL;
         const char *opts;
 
-        if (isempty(arg_root_what)) {
-                log_debug("Could not find a root= entry on the kernel command line.");
-                return 0;
-        }
+        if (fstype_is_deviceless(arg_root_fstype)) {
+                if (free_and_strdup(&what, arg_root_what) < 0)
+                        return log_oom();
+        } else {
+                if (isempty(arg_root_what)) {
+                        log_debug("Could not find a root= entry on the kernel command line.");
+                        return 0;
+                }
 
-        what = fstab_node_to_udev_node(arg_root_what);
-        if (!path_is_absolute(what)) {
-                log_debug("Skipping entry what=%s where=/sysroot type=%s", what, strna(arg_root_fstype));
-                return 0;
+                what = fstab_node_to_udev_node(arg_root_what);
+                if (!path_is_absolute(what)) {
+                        log_debug("Skipping entry what=%s where=/sysroot type=%s", what, strna(arg_root_fstype));
+                        return 0;
+                }
         }
 
         if (!arg_root_options)
diff --git a/src/shared/util.c b/src/shared/util.c
index ad548da..2d50f73 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -1713,6 +1713,35 @@ bool fstype_is_network(const char *fstype) {
         return nulstr_contains(table, fstype);
 }
 
+bool fstype_is_deviceless(const char *fstype) {
+        static const char table[] =
+                "autofs\0"
+                "bdev\0"
+                "cgroup\0"
+                "configfs\0"
+                "cpuset\0"
+                "debugfs\0"
+                "devpts\0"
+                "devtmpfs\0"
+                "efivarfs\0"
+                "hugetlbfs\0"
+                "mqueue\0"
+                "overlayfs\0"
+                "pipefs\0"
+                "proc\0"
+                "pstore\0"
+                "ramfs\0"
+                "rootfs\0"
+                "rpc_pipefs\0"
+                "securityfs\0"
+                "sockfs\0"
+                "sysfs\0"
+                "tmpfs\0";
+
+        return !isempty(fstype) && (
+                nulstr_contains(table, fstype) || fstype_is_network(fstype));
+}
+
 int chvt(int vt) {
         _cleanup_close_ int fd;
 
diff --git a/src/shared/util.h b/src/shared/util.h
index 29e85bb..b5f44b8 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -409,6 +409,7 @@ int fd_cloexec(int fd, bool cloexec);
 int close_all_fds(const int except[], unsigned n_except);
 
 bool fstype_is_network(const char *fstype);
+bool fstype_is_deviceless(const char *fstype);
 
 int chvt(int vt);
 



More information about the systemd-commits mailing list