Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /tools/generic-callout.c [c96207] .. [c4212c] Maximize Restore

  Switch to side-by-side view

--- a/tools/generic-callout.c
+++ b/tools/generic-callout.c
@@ -28,6 +28,7 @@
 #include "backends.h"
 
 #include <errno.h>
+
 #include <glib.h>
 #include <glib/gstdio.h>
 
@@ -42,6 +43,9 @@
 #include <sys/mount.h>
 #include <itdb.h>
 #include <itdb_device.h>
+
+#include "itdb-syslog.h"
+
 #ifdef HAVE_SGUTILS
 extern char *read_sysinfo_extended (const char *device);
 #endif
@@ -630,8 +634,8 @@
 
             controldirpath = itdb_get_control_dir (mountpoint);
             if (controldirpath == NULL) {
-                g_debug("failed to build path for control dir at %s",
-                        mountpoint);
+                itdb_syslog("failed to build path for control dir at %s",
+                            mountpoint);
                 return FALSE;
             }
             devdirpath = g_build_filename (controldirpath, "Device", NULL);
@@ -642,14 +646,14 @@
         filename = g_build_filename (devdirpath, "SysInfoExtended", NULL);
         g_free (devdirpath);
         if (filename == NULL) {
-                g_debug("failed to build path for SysInfoExtended at %s",
-                        mountpoint);
+                itdb_syslog("failed to build path for SysInfoExtended at %s",
+                            mountpoint);
                 return FALSE;
         }
 
         success = g_file_set_contents (filename, data, -1, &error);
         if (!success) {
-            g_debug("failed to write %s: %s", filename, error->message);
+            itdb_syslog("failed to write %s: %s", filename, error->message);
             g_clear_error(&error);
         } else {
             g_debug("successfully written SysInfoExtended at %s", filename);
@@ -706,7 +710,7 @@
 	}
 
         if (xml == NULL) {
-                g_debug("couldn't read SysInfoExtended from device");
+                itdb_syslog("couldn't read SysInfoExtended from device");
                 return -1;
         } else {
 		g_debug("iPod properties successfully read from SCSI");
@@ -714,8 +718,8 @@
 
         props = itdb_sysinfo_extended_parse_from_xml (xml, &error);
 	if (props == NULL) {
-		g_debug("failed to parse SysInfoExtended: %s",
-			error->message);
+		itdb_syslog("failed to parse SysInfoExtended: %s",
+			    error->message);
 		g_clear_error(&error);
 		g_debug("%s", xml);
 		return -1;
@@ -726,6 +730,7 @@
 
         ipod_mountpoint = mount_ipod (dev, fstype);
         if (ipod_mountpoint == NULL) {
+                itdb_syslog("failed to mount device");
                 g_free (xml);
                 return -1;
         }