[systemd-commits] 4 commits - man/hostname.xml man/localtime.xml man/machine-id.xml man/sd-readahead.xml man/sd_readahead.xml man/systemd-activate.xml man/systemd-update-utmp-runlevel.service.xml src/shared

Lennart Poettering lennart at kemper.freedesktop.org
Thu Mar 7 07:07:41 PST 2013


 man/hostname.xml                             |    2 +-
 man/localtime.xml                            |    2 +-
 man/machine-id.xml                           |    2 +-
 man/sd-readahead.xml                         |    2 +-
 man/sd_readahead.xml                         |    2 +-
 man/systemd-activate.xml                     |    2 +-
 man/systemd-update-utmp-runlevel.service.xml |    2 +-
 src/shared/util.c                            |    4 ++--
 src/shared/virt.c                            |   25 ++++++++++++++++++++-----
 9 files changed, 29 insertions(+), 14 deletions(-)

New commits:
commit 650001c6f7532601a9e5f685c348dae9541352cf
Author: Jan Janssen <medhefgo at web.de>
Date:   Thu Mar 7 15:12:46 2013 +0100

    util: Fix grammar in comment

diff --git a/src/shared/util.c b/src/shared/util.c
index b7ba7fb..c493a34 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -3607,8 +3607,8 @@ void execute_directory(const char *directory, DIR *d, char *argv[]) {
 
         assert(directory);
 
-        /* Executes all binaries in a directory in parallel and waits
-         * until all they all finished. */
+        /* Executes all binaries in a directory in parallel and
+         * waits for them to finish. */
 
         if (!d) {
                 if (!(_d = opendir(directory))) {

commit 7aa955af052f8e50bfdbf01f368317012775bc9f
Author: Jan Janssen <medhefgo at web.de>
Date:   Thu Mar 7 15:12:45 2013 +0100

    man: Unify title for configuration files

diff --git a/man/hostname.xml b/man/hostname.xml
index 84a2961..f89332e 100644
--- a/man/hostname.xml
+++ b/man/hostname.xml
@@ -24,7 +24,7 @@
 
 <refentry id="hostname">
         <refentryinfo>
-                <title>/etc/hostname</title>
+                <title>hostname</title>
                 <productname>systemd</productname>
 
                 <authorgroup>
diff --git a/man/localtime.xml b/man/localtime.xml
index 88c84a3..d3da4ed 100644
--- a/man/localtime.xml
+++ b/man/localtime.xml
@@ -25,7 +25,7 @@
 
 <refentry id="localtime">
         <refentryinfo>
-                <title>/etc/localtime</title>
+                <title>localtime</title>
                 <productname>systemd</productname>
 
                 <authorgroup>
diff --git a/man/machine-id.xml b/man/machine-id.xml
index 7d424b7..153ae4d 100644
--- a/man/machine-id.xml
+++ b/man/machine-id.xml
@@ -24,7 +24,7 @@
 
 <refentry id="machine-id">
         <refentryinfo>
-                <title>/etc/machine-id</title>
+                <title>machine-id</title>
                 <productname>systemd</productname>
 
                 <authorgroup>

commit ed1553a20d5bc73c1ae8e269d46ee24f80d259d4
Author: Jan Janssen <medhefgo at web.de>
Date:   Thu Mar 7 15:12:44 2013 +0100

    man: Fix id attributes

diff --git a/man/sd-readahead.xml b/man/sd-readahead.xml
index ee7c936..f8a0a0b 100644
--- a/man/sd-readahead.xml
+++ b/man/sd-readahead.xml
@@ -21,7 +21,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd-daemon" conditional='ENABLE_READAHEAD'>
+<refentry id="sd-readahead" conditional='ENABLE_READAHEAD'>
 
         <refentryinfo>
                 <title>sd-readahead</title>
diff --git a/man/sd_readahead.xml b/man/sd_readahead.xml
index 39e3469..c26d5c6 100644
--- a/man/sd_readahead.xml
+++ b/man/sd_readahead.xml
@@ -21,7 +21,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="sd_notify" conditional='ENABLE_READAHEAD'>
+<refentry id="sd_readahead" conditional='ENABLE_READAHEAD'>
 
         <refentryinfo>
                 <title>sd_readahead</title>
diff --git a/man/systemd-activate.xml b/man/systemd-activate.xml
index 6949731..a5cab8e 100644
--- a/man/systemd-activate.xml
+++ b/man/systemd-activate.xml
@@ -21,7 +21,7 @@ You should have received a copy of the GNU Lesser General Public License
 along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
 
-<refentry id="systemd-journal-gatewayd.service">
+<refentry id="systemd-activate">
 
   <refentryinfo>
     <title>systemd-activate</title>
diff --git a/man/systemd-update-utmp-runlevel.service.xml b/man/systemd-update-utmp-runlevel.service.xml
index 0e19581..867b958 100644
--- a/man/systemd-update-utmp-runlevel.service.xml
+++ b/man/systemd-update-utmp-runlevel.service.xml
@@ -19,7 +19,7 @@
   You should have received a copy of the GNU Lesser General Public License
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 -->
-<refentry id="systemd-user-sessions.service">
+<refentry id="systemd-update-utmp-runlevel.service">
 
         <refentryinfo>
                 <title>systemd-update-utmp-runlevel.service</title>

commit b1b8e8169496d3c4f991de9a9d2975ffada6fa0f
Author: Lennart Poettering <lennart at poettering.net>
Date:   Thu Mar 7 15:59:26 2013 +0100

    virt: check for /sys/hypervisor/type for detecting xen PV
    
    https://bugs.freedesktop.org/show_bug.cgi?id=61491

diff --git a/src/shared/virt.c b/src/shared/virt.c
index eed3210..78016ee 100644
--- a/src/shared/virt.c
+++ b/src/shared/virt.c
@@ -66,6 +66,22 @@ int detect_vm(const char **id) {
         unsigned i;
         const char *j, *k;
         bool hypervisor;
+        _cleanup_free_ char *hvtype = NULL;
+        int r;
+
+        /* Try high-level hypervisor sysfs file first:
+         *
+         * https://bugs.freedesktop.org/show_bug.cgi?id=61491 */
+        r = read_one_line_file("/sys/hypervisor/type", &hvtype);
+        if (r >= 0) {
+                if (streq(hvtype, "xen")) {
+                        if (id)
+                                *id = "xen";
+
+                        return 1;
+                }
+        } else if (r != -ENOENT)
+                return r;
 
         /* http://lwn.net/Articles/301888/ */
         zero(sig);
@@ -118,11 +134,11 @@ int detect_vm(const char **id) {
         }
 
         for (i = 0; i < ELEMENTSOF(dmi_vendors); i++) {
-                char *s;
-                int r;
+                _cleanup_free_ char *s = NULL;
                 const char *found = NULL;
 
-                if ((r = read_one_line_file(dmi_vendors[i], &s)) < 0) {
+                r = read_one_line_file(dmi_vendors[i], &s);
+                if (r < 0) {
                         if (r != -ENOENT)
                                 return r;
 
@@ -132,7 +148,6 @@ int detect_vm(const char **id) {
                 NULSTR_FOREACH_PAIR(j, k, dmi_vendor_table)
                         if (startswith(s, j))
                                 found = k;
-                free(s);
 
                 if (found) {
                         if (id)
@@ -142,7 +157,7 @@ int detect_vm(const char **id) {
                 }
         }
 
-        if (hypervisor) {
+        if (hypervisor || hvtype) {
                 if (id)
                         *id = "other";
 



More information about the systemd-commits mailing list