[systemd-commits] 2 commits - Makefile.am configure.ac src/shared

Lennart Poettering lennart at kemper.freedesktop.org
Tue Aug 19 13:45:58 PDT 2014


 Makefile.am        |   10 +++++-----
 configure.ac       |    2 +-
 src/shared/memfd.c |   21 ++++++++++-----------
 3 files changed, 16 insertions(+), 17 deletions(-)

New commits:
commit d5a169aaee81246262a83cef2a0295ea5d1e7e40
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Aug 19 22:45:53 2014 +0200

    build-sys: update versions for upcoming release

diff --git a/Makefile.am b/Makefile.am
index d4d5775..4028112 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -35,17 +35,17 @@ SUBDIRS = . po
 # Keep the test-suite.log
 .PRECIOUS: $(TEST_SUITE_LOG) Makefile
 
-LIBUDEV_CURRENT=6
+LIBUDEV_CURRENT=7
 LIBUDEV_REVISION=0
-LIBUDEV_AGE=5
+LIBUDEV_AGE=6
 
 LIBGUDEV_CURRENT=2
 LIBGUDEV_REVISION=0
 LIBGUDEV_AGE=2
 
-LIBSYSTEMD_CURRENT=3
-LIBSYSTEMD_REVISION=1
-LIBSYSTEMD_AGE=3
+LIBSYSTEMD_CURRENT=4
+LIBSYSTEMD_REVISION=0
+LIBSYSTEMD_AGE=4
 
 # The following four libraries only exist for compatibility reasons,
 # their version info should not be bumped anymore
diff --git a/configure.ac b/configure.ac
index 83ba33d..18b7198 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
 AC_PREREQ([2.64])
 
 AC_INIT([systemd],
-        [215],
+        [216],
         [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
         [systemd],
         [http://www.freedesktop.org/wiki/Software/systemd])

commit 5755381f53ab52d22d20a711c219f7de3ba62397
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Aug 19 22:35:04 2014 +0200

    memfd: escape the comm field we get from PR_GET_NAME, but assume everything else is proper UTF8

diff --git a/src/shared/memfd.c b/src/shared/memfd.c
index c21642f..1feca0c 100644
--- a/src/shared/memfd.c
+++ b/src/shared/memfd.c
@@ -32,17 +32,10 @@
 #include "utf8.h"
 
 int memfd_new(const char *name) {
-
         _cleanup_free_ char *g = NULL;
         int fd;
 
-        if (name) {
-                g = utf8_escape_invalid(name);
-                if (!g)
-                        return -ENOMEM;
-
-                name = g;
-        } else {
+        if (!name) {
                 char pr[17] = {};
 
                 /* If no name is specified we generate one. We include
@@ -54,7 +47,13 @@ int memfd_new(const char *name) {
                 if (isempty(pr))
                         name = "sd";
                 else {
-                        g = strappend("sd-", pr);
+                        _cleanup_free_ char *e = NULL;
+
+                        e = utf8_escape_invalid(pr);
+                        if (!e)
+                                return -ENOMEM;
+
+                        g = strappend("sd-", e);
                         if (!g)
                                 return -ENOMEM;
 
@@ -130,7 +129,7 @@ int memfd_get_size(int fd, uint64_t *sz) {
                 return -errno;
 
         *sz = stat.st_size;
-        return r;
+        return 0;
 }
 
 int memfd_set_size(int fd, uint64_t sz) {
@@ -142,7 +141,7 @@ int memfd_set_size(int fd, uint64_t sz) {
         if (r < 0)
                 return -errno;
 
-        return r;
+        return 0;
 }
 
 int memfd_new_and_map(const char *name, size_t sz, void **p) {



More information about the systemd-commits mailing list