This email list is read-only.  Emails sent to this list will be discarded
----------------------------------
 moblin-system-daemon/touchscreen/calibrator.c |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

New commits:
commit ec9687746f39db654fabf535c25e134d63dd5e0f
Author: Todd Brandt <[EMAIL PROTECTED]>
Date:   Wed Aug 13 17:32:25 2008 -0700

    fixed a warning about ignoring the return from system calls


Diff in this email is a maximum of 400 lines.
diff --git a/moblin-system-daemon/touchscreen/calibrator.c 
b/moblin-system-daemon/touchscreen/calibrator.c
index 3bc2366..9503887 100644
--- a/moblin-system-daemon/touchscreen/calibrator.c
+++ b/moblin-system-daemon/touchscreen/calibrator.c
@@ -282,10 +282,22 @@ editxorgconf(
        }
 
        fclose(newxorg);
-       sprintf(cmd, "cp %s %s.backup", name, name);
-       system(cmd);
-       sprintf(cmd, "mv newxorg.conf %s", name);
-       system(cmd);
+       sprintf(cmd, "cp -f %s %s.backup", name, name);
+       if(system(cmd))
+       {
+               free(name);
+               g_set_error (error, error_quark, XORG_CHANGE_FAILED,
+                       _("Failed to change the xorg.conf file"));
+               return FALSE;
+       }
+       sprintf(cmd, "mv -f newxorg.conf %s", name);
+       if(system(cmd))
+       {
+               free(name);
+               g_set_error (error, error_quark, XORG_CHANGE_FAILED,
+                       _("Failed to change the xorg.conf file"));
+               return FALSE;
+       }
        free(name);
        return TRUE;
 }
_______________________________________________
Commits mailing list
[email protected]
https://www.moblin.org/mailman/listinfo/commits

Reply via email to