[systemd-commits] 3 commits - src/libsystemd-bus src/python-systemd src/udev
Zbigniew JÄdrzejewski-Szmek
zbyszek at kemper.freedesktop.org
Sun Apr 14 15:53:16 PDT 2013
src/libsystemd-bus/test-bus-chat.c | 4 +---
src/python-systemd/_reader.c | 11 ++++++-----
src/udev/ata_id/ata_id.c | 7 +++----
3 files changed, 10 insertions(+), 12 deletions(-)
New commits:
commit 1e8e0a3221e27f7cc944dd6d734b95e86f67ce5c
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Sun Apr 14 18:48:45 2013 -0400
udev/ata_id: zero out variable properly
b8a2b0f76 'use initalization instead of explicit zeroing'
introduced a bug where only the first sizeof(uint_t*) bytes
would be zeroed out, instead of the whole array.
diff --git a/src/udev/ata_id/ata_id.c b/src/udev/ata_id/ata_id.c
index 4d30fd8..68a06b9 100644
--- a/src/udev/ata_id/ata_id.c
+++ b/src/udev/ata_id/ata_id.c
@@ -334,11 +334,10 @@ static int disk_identify(struct udev *udev,
int peripheral_device_type;
int all_nul_bytes;
int n;
- int is_packet_device;
+ int is_packet_device = 0;
/* init results */
- zero(out_identify);
- is_packet_device = 0;
+ memzero(out_identify, 512);
/* If we were to use ATA PASS_THROUGH (12) on an ATAPI device
* we could accidentally blank media. This is because MMC's BLANK
@@ -402,7 +401,7 @@ static int disk_identify(struct udev *udev,
out:
if (out_is_packet_device != NULL)
- *out_is_packet_device = is_packet_device;
+ *out_is_packet_device = is_packet_device;
return ret;
}
commit e9b807c1685568d8ed989c2d4c3dcd525ab5549d
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Sun Apr 14 18:42:44 2013 -0400
bus: remove two unused variables
diff --git a/src/libsystemd-bus/test-bus-chat.c b/src/libsystemd-bus/test-bus-chat.c
index 9f4a559..5f9a7ba 100644
--- a/src/libsystemd-bus/test-bus-chat.c
+++ b/src/libsystemd-bus/test-bus-chat.c
@@ -49,8 +49,6 @@ static int object_callback(sd_bus *bus, int error, sd_bus_message *m, void *user
return 0;
if (sd_bus_message_is_method_call(m, "org.object.test", "Foobar")) {
- _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
-
log_info("Invoked Foobar() on %s", sd_bus_message_get_path(m));
r = sd_bus_reply_method_return(bus, m, NULL);
@@ -260,7 +258,7 @@ fail:
}
static void* client1(void*p) {
- _cleanup_bus_message_unref_ sd_bus_message *m = NULL, *reply = NULL;
+ _cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
sd_bus *bus = NULL;
sd_bus_error error = SD_BUS_ERROR_NULL;
const char *hello;
commit ee6349a7264e36310bc3a33c889763b396f0d674
Author: Zbigniew JÄdrzejewski-Szmek <zbyszek at in.waw.pl>
Date: Sun Apr 14 18:37:38 2013 -0400
systemd-python: fix formatting in docstring
diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c
index a49527f..3b36634 100644
--- a/src/python-systemd/_reader.c
+++ b/src/python-systemd/_reader.c
@@ -175,10 +175,10 @@ static PyObject* Reader_close(Reader *self, PyObject *args)
PyDoc_STRVAR(Reader_get_usage__doc__,
"get_usage() -> int\n\n"
- "Returns the total disk space currently used by journal"
- "files (in bytes). If `SD_JOURNAL_LOCAL_ONLY` was"
- "passed when opening the journal this value will only reflect"
- "the size of journal files of the local host, otherwise"
+ "Returns the total disk space currently used by journal\n"
+ "files (in bytes). If `SD_JOURNAL_LOCAL_ONLY` was\n"
+ "passed when opening the journal this value will only reflect\n"
+ "the size of journal files of the local host, otherwise\n"
"of all hosts.\n\n"
"This method invokes sd_journal_get_usage().\n"
"See man:sd_journal_get_usage(3).");
@@ -628,7 +628,8 @@ PyDoc_STRVAR(Reader_wait__doc__,
"then block forever.\n\n"
"Will return constants: NOP if no change; APPEND if new\n"
"entries have been added to the end of the journal; and\n"
- "INVALIDATE if journal files have been added or removed.");
+ "INVALIDATE if journal files have been added or removed.\n\n"
+ "See man:sd_journal_wait(3) for further discussion.");
static PyObject* Reader_wait(Reader *self, PyObject *args)
{
int r;
More information about the systemd-commits
mailing list