Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
systemd
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
steam
systemd
Commits
7211f918
Commit
7211f918
authored
Apr 12, 2013
by
Lennart Poettering
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bus: make the kdbus code valgrind clean
parent
acb5a3cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
configure.ac
configure.ac
+2
-0
src/libsystemd-bus/bus-kernel.c
src/libsystemd-bus/bus-kernel.c
+9
-2
No files found.
configure.ac
View file @
7211f918
...
@@ -693,6 +693,8 @@ AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
...
@@ -693,6 +693,8 @@ AC_DEFINE_UNQUOTED(TELINIT, ["$TELINIT"], [Path to telinit])
AC_SUBST(TELINIT)
AC_SUBST(TELINIT)
AC_CHECK_HEADERS_ONCE([valgrind/memcheck.h])
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
have_myhostname=no
have_myhostname=no
AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
AC_ARG_ENABLE(myhostname, AS_HELP_STRING([--disable-myhostname], [disable nss-myhostname support]))
...
...
src/libsystemd-bus/bus-kernel.c
View file @
7211f918
...
@@ -19,6 +19,10 @@
...
@@ -19,6 +19,10 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
***/
#ifdef HAVE_VALGRIND_MEMCHECK_H
#include <valgrind/memcheck.h>
#endif
#include <fcntl.h>
#include <fcntl.h>
#include "util.h"
#include "util.h"
...
@@ -32,8 +36,6 @@
...
@@ -32,8 +36,6 @@
(uint8_t*) (d) < (uint8_t*) (k) + (k)->size; \
(uint8_t*) (d) < (uint8_t*) (k) + (k)->size; \
(d) = (struct kdbus_msg_data*) ((uint8_t*) (d) + ALIGN8((d)->size)))
(d) = (struct kdbus_msg_data*) ((uint8_t*) (d) + ALIGN8((d)->size)))
static
int
parse_unique_name
(
const
char
*
s
,
uint64_t
*
id
)
{
static
int
parse_unique_name
(
const
char
*
s
,
uint64_t
*
id
)
{
int
r
;
int
r
;
...
@@ -353,6 +355,11 @@ int bus_kernel_read_message(sd_bus *bus, sd_bus_message **m) {
...
@@ -353,6 +355,11 @@ int bus_kernel_read_message(sd_bus *bus, sd_bus_message **m) {
k
=
bus
->
rbuffer
=
q
;
k
=
bus
->
rbuffer
=
q
;
k
->
size
=
sz
;
k
->
size
=
sz
;
/* Let's tell valgrind that there's really no need to
* initialize this fully. This should be removed again
* when valgrind learned the kdbus ioctls natively. */
VALGRIND_MAKE_MEM_DEFINED
(
k
,
sz
);
r
=
ioctl
(
bus
->
input_fd
,
KDBUS_CMD_MSG_RECV
,
bus
->
rbuffer
);
r
=
ioctl
(
bus
->
input_fd
,
KDBUS_CMD_MSG_RECV
,
bus
->
rbuffer
);
if
(
r
>=
0
)
if
(
r
>=
0
)
break
;
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment