hal/hald device_info.c, 1.29, 1.30 hald.c, 1.44, 1.45 hald_dbus.c,
1.47, 1.48
Danny Kukawka
dkukawka at freedesktop.org
Thu Jan 12 09:48:46 PST 2006
Update of /cvs/hal/hal/hald
In directory gabe:/tmp/cvs-serv7533/hald
Modified Files:
device_info.c hald.c hald_dbus.c
Log Message:
2006-01-12 Danny Kukawka <danny.kukawka at web.de>
Fixed compiler warnings if compile with flag warn_unused_result.
* hald/device_info.c: (process_fdi_file):
* hald/hald.c: (handle_sigterm), (main), (osspec_probe_done):
* hald/hald_dbus.c: (hald_exec_method):
* hald/linux2/osspec.c: (set_suspend_hibernate_keys):
* hald/linux2/probing/probe-smbios.c: (main):
* tools/linux/hal_hotplug.c: (main):
Index: device_info.c
===================================================================
RCS file: /cvs/hal/hal/hald/device_info.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- device_info.c 2 Nov 2005 15:38:13 -0000 1.29
+++ device_info.c 12 Jan 2006 17:48:44 -0000 1.30
@@ -1213,6 +1213,7 @@
char buf[512];
FILE *file;
int filesize;
+ size_t read;
char *filebuf;
dbus_bool_t device_matched;
XML_Parser parser;
@@ -1244,7 +1245,7 @@
HAL_ERROR (("Could not allocate %d bytes for file %s", filesize, buf));
goto out;
}
- fread (filebuf, sizeof (char), filesize, file);
+ read = fread (filebuf, sizeof (char), filesize, file);
/* initialize parsing context */
parsing_context =
Index: hald.c
===================================================================
RCS file: /cvs/hal/hal/hald/hald.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- hald.c 29 Nov 2005 17:57:19 -0000 1.44
+++ hald.c 12 Jan 2006 17:48:44 -0000 1.45
@@ -4,6 +4,7 @@
* hald.c : main startup for HAL daemon
*
* Copyright (C) 2003 David Zeuthen, <david at fubar.dk>
+ * Copyright (C) 2005 Danny Kukawka, <danny.kukawka at web.de>
*
* Licensed under the Academic Free License version 2.1
*
@@ -240,6 +241,7 @@
static void
handle_sigterm (int value)
{
+ ssize_t written;
static char marker[1] = {'S'};
/* write a 'S' character to the other end to tell about
@@ -248,7 +250,7 @@
* defer this since UNIX signal handlers are evil
*
* Oh, and write(2) is indeed reentrant */
- write (sigterm_unix_signal_pipe_fds[1], marker, 1);
+ written = write (sigterm_unix_signal_pipe_fds[1], marker, 1);
}
static gboolean
@@ -516,6 +518,7 @@
int child_pid;
int dev_null_fd;
int pf;
+ ssize_t written;
char pid[9];
HAL_INFO (("Will daemonize"));
@@ -569,7 +572,7 @@
/* Make a new one */
if ((pf= open (HALD_PID_FILE, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0644)) > 0) {
snprintf (pid, sizeof(pid), "%lu\n", (long unsigned) getpid ());
- write (pf, pid, strlen(pid));
+ written = write (pf, pid, strlen(pid));
close (pf);
atexit (delete_pid);
}
@@ -650,6 +653,7 @@
void
osspec_probe_done (void)
{
+ ssize_t written;
char buf[1] = {0};
HAL_INFO (("Device probing completed"));
@@ -660,7 +664,7 @@
}
/* tell parent to exit */
- write (startup_daemonize_pipe[1], buf, sizeof (buf));
+ written = write (startup_daemonize_pipe[1], buf, sizeof (buf));
close (startup_daemonize_pipe[0]);
close (startup_daemonize_pipe[1]);
Index: hald_dbus.c
===================================================================
RCS file: /cvs/hal/hal/hald/hald_dbus.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- hald_dbus.c 6 Jan 2006 20:45:14 -0000 1.47
+++ hald_dbus.c 12 Jan 2006 17:48:44 -0000 1.48
@@ -2577,6 +2577,7 @@
DBusMessageIter iter;
int stdin_fd;
int *stderr_fd;
+ ssize_t written;
const char *sender;
char *extra_env[2];
char uid_export[128];
@@ -2707,7 +2708,7 @@
if (hal_util_helper_invoke_with_pipes (execpath, extra_env, d,
(gpointer) message, (gpointer) stderr_fd,
hald_exec_method_cb, 0, &stdin_fd, NULL, stderr_fd) != NULL) {
- write (stdin_fd, stdin, strlen (stdin));
+ written = write (stdin_fd, stdin, strlen (stdin));
close (stdin_fd);
}
More information about the hal-commit
mailing list