brasero r1481 - in trunk: . src src/plugins/cdrdao src/plugins/cdrkit src/plugins/cdrtools src/plugins/checksum src/plugins/dvdcss src/plugins/libburnia src/plugins/local-track src/plugins/transcode
- From: philippr svn gnome org
- To: svn-commits-list gnome org
- Subject: brasero r1481 - in trunk: . src src/plugins/cdrdao src/plugins/cdrkit src/plugins/cdrtools src/plugins/checksum src/plugins/dvdcss src/plugins/libburnia src/plugins/local-track src/plugins/transcode
- Date: Thu, 6 Nov 2008 14:15:14 +0000 (UTC)
Author: philippr
Date: Thu Nov 6 14:15:13 2008
New Revision: 1481
URL: http://svn.gnome.org/viewvc/brasero?rev=1481&view=rev
Log:
Fix #559427 â uses strerror
Patch by Christian Persch
* src/brasero-audio-disc.c (brasero_audio_disc_init),
(brasero_audio_disc_start_monitoring):
* src/brasero-burn-dialog.c (brasero_burn_dialog_show_log):
* src/brasero-file-monitor.c
(brasero_file_monitor_start_monitoring_real),
(brasero_file_monitor_init):
* src/brasero-io.c (brasero_io_xfer_start):
* src/brasero-sum-check.c (brasero_sum_check_get_line_num),
(brasero_sum_check_thread):
* src/brasero-sum-dialog.c (brasero_sum_dialog_get_file_checksum):
* src/burn-image-format.c (brasero_image_format_get_DATAFILE_info),
(brasero_image_format_get_FILE_info),
(brasero_image_format_get_cdrdao_size),
(brasero_image_format_get_cue_size),
(brasero_image_format_get_iso_size),
(brasero_image_format_get_clone_size):
* src/burn-job.c (brasero_job_item_start):
* src/burn-process.c (brasero_process_setup),
(brasero_process_stop):
* src/burn-session.c (brasero_burn_session_get_tmp_dir),
(brasero_burn_session_get_tmp_file), (brasero_burn_session_clean):
* src/burn-volume-source.c (brasero_volume_source_seek_fd),
(brasero_volume_source_read_fd), (brasero_volume_source_open_file),
(brasero_volume_source_open_fd):
* src/plugins/cdrdao/burn-toc2cue.c (brasero_toc2cue_read_stderr):
* src/plugins/cdrkit/burn-wodim.c (brasero_wodim_write_inf):
* src/plugins/cdrtools/burn-cdrecord.c
(brasero_cdrecord_write_inf):
* src/plugins/checksum/burn-checksum-files.c
(brasero_checksum_files_get_file_checksum),
(brasero_checksum_files_add_file_checksum),
(brasero_checksum_files_create_checksum):
* src/plugins/checksum/burn-checksum-image.c
(brasero_checksum_image_read), (brasero_checksum_image_write),
(brasero_checksum_image_checksum_file_input):
* src/plugins/dvdcss/burn-dvdcss.c
(brasero_dvdcss_write_sector_to_fd),
(brasero_dvdcss_write_image_thread):
* src/plugins/libburnia/burn-libisofs.c
(brasero_libisofs_write_sector_to_fd),
(brasero_libisofs_write_image_to_file_thread):
* src/plugins/local-track/burn-local-image.c
(brasero_local_track_recursive_transfer),
(brasero_local_track_transfer):
* src/plugins/transcode/burn-transcode.c
(brasero_transcode_create_sibling_image),
(brasero_transcode_pad_real), (brasero_transcode_pad_file):
* src/scsi-error.c (brasero_scsi_strerror):
* src/scsi-utils.h:
Modified:
trunk/ChangeLog
trunk/src/brasero-audio-disc.c
trunk/src/brasero-burn-dialog.c
trunk/src/brasero-file-monitor.c
trunk/src/brasero-io.c
trunk/src/brasero-sum-check.c
trunk/src/brasero-sum-dialog.c
trunk/src/burn-image-format.c
trunk/src/burn-job.c
trunk/src/burn-process.c
trunk/src/burn-session.c
trunk/src/burn-volume-source.c
trunk/src/plugins/cdrdao/burn-toc2cue.c
trunk/src/plugins/cdrkit/burn-wodim.c
trunk/src/plugins/cdrtools/burn-cdrecord.c
trunk/src/plugins/checksum/burn-checksum-files.c
trunk/src/plugins/checksum/burn-checksum-image.c
trunk/src/plugins/dvdcss/burn-dvdcss.c
trunk/src/plugins/libburnia/burn-libisofs.c
trunk/src/plugins/local-track/burn-local-image.c
trunk/src/plugins/transcode/burn-transcode.c
trunk/src/scsi-error.c
trunk/src/scsi-utils.h
Modified: trunk/src/brasero-audio-disc.c
==============================================================================
--- trunk/src/brasero-audio-disc.c (original)
+++ trunk/src/brasero-audio-disc.c Thu Nov 6 14:15:13 2008
@@ -802,7 +802,7 @@
}
else
g_warning ("Failed to open /dev/inotify: %s\n",
- strerror (errno));
+ g_strerror (errno));
#endif
}
@@ -3569,7 +3569,7 @@
if (wd == -1) {
g_warning ("ERROR creating watch for local file %s : %s\n",
parent,
- strerror (errno));
+ g_strerror (errno));
g_free (parent);
g_free (dir);
Modified: trunk/src/brasero-burn-dialog.c
==============================================================================
--- trunk/src/brasero-burn-dialog.c (original)
+++ trunk/src/brasero-burn-dialog.c Thu Nov 6 14:15:13 2008
@@ -1455,18 +1455,22 @@
file = g_fopen (logfile, "r");
if (!file) {
+ int errsv = errno;
+
brasero_utils_message_dialog (GTK_WIDGET (dialog),
_("The session log cannot be displayed:"),
- strerror (errno),
+ g_strerror (errsv),
GTK_MESSAGE_ERROR);
gtk_widget_destroy (message);
return;
}
if (fread (contents, 1, sizeof (contents), file) != sizeof (contents)) {
+ int errsv = errno;
+
brasero_utils_message_dialog (GTK_WIDGET (dialog),
_("The session log cannot be displayed:"),
- strerror (errno),
+ g_strerror (errsv),
GTK_MESSAGE_ERROR);
gtk_widget_destroy (message);
return;
Modified: trunk/src/brasero-file-monitor.c
==============================================================================
--- trunk/src/brasero-file-monitor.c (original)
+++ trunk/src/brasero-file-monitor.c Thu Nov 6 14:15:13 2008
@@ -600,7 +600,7 @@
if (wd == -1) {
BRASERO_BURN_LOG ("ERROR creating watch for local file %s : %s\n",
path,
- strerror (errno));
+ g_strerror (errno));
g_free (path);
return 0;
}
@@ -852,7 +852,7 @@
g_io_channel_unref (priv->notify);
}
else
- g_warning ("Failed to open inotify: %s\n", strerror (errno));
+ g_warning ("Failed to open inotify: %s\n", g_strerror (errno));
}
static void
Modified: trunk/src/brasero-io.c
==============================================================================
--- trunk/src/brasero-io.c (original)
+++ trunk/src/brasero-io.c Thu Nov 6 14:15:13 2008
@@ -2328,13 +2328,15 @@
/* start the downloading */
if (g_file_info_get_file_type (data->info) == G_FILE_TYPE_DIRECTORY) {
if (g_mkdir_with_parents (data->dest_path, 700)) {
+ int errsv = errno;
+
g_object_unref (file);
g_set_error (error,
BRASERO_ERROR,
BRASERO_ERROR_GENERAL,
_("a directory couldn't be created (%s)"),
- strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
Modified: trunk/src/brasero-sum-check.c
==============================================================================
--- trunk/src/brasero-sum-check.c (original)
+++ trunk/src/brasero-sum-check.c Thu Nov 6 14:15:13 2008
@@ -82,9 +82,9 @@
}
if (!feof (file)) {
- ctx->error = g_error_new (BRASERO_BURN_ERROR,
- BRASERO_BURN_ERROR_GENERAL,
- strerror (errno));
+ ctx->error = g_error_new_literal (BRASERO_BURN_ERROR,
+ BRASERO_BURN_ERROR_GENERAL,
+ g_strerror (errno));
return FALSE;
}
@@ -109,18 +109,18 @@
strcpy (filename + root_len, BRASERO_CHECKSUM_FILE);
file = fopen (filename, "r");
if (!file) {
- ctx->error = g_error_new (BRASERO_BURN_ERROR,
- BRASERO_BURN_ERROR_GENERAL,
- strerror (errno));
+ ctx->error = g_error_new_literal (BRASERO_BURN_ERROR,
+ BRASERO_BURN_ERROR_GENERAL,
+ g_strerror (errno));
goto end;
}
/* we need to get the number of files at this time and rewind */
ctx->file_nb = 0;
if (!brasero_sum_check_get_line_num (ctx, file)) {
- ctx->error = g_error_new (BRASERO_BURN_ERROR,
- BRASERO_BURN_ERROR_GENERAL,
- strerror (errno));
+ ctx->error = g_error_new_literal (BRASERO_BURN_ERROR,
+ BRASERO_BURN_ERROR_GENERAL,
+ g_strerror (errno));
goto end;
}
@@ -137,9 +137,9 @@
if (fread (checksum_file, 1, 32, file) != 32) {
if (!feof (file))
- ctx->error = g_error_new (BRASERO_BURN_ERROR,
- BRASERO_BURN_ERROR_GENERAL,
- strerror (errno));
+ ctx->error = g_error_new_literal (BRASERO_BURN_ERROR,
+ BRASERO_BURN_ERROR_GENERAL,
+ g_strerror (errno));
break;
}
@@ -158,9 +158,9 @@
if (errno == EAGAIN || errno == EINTR)
continue;
- ctx->error = g_error_new (BRASERO_BURN_ERROR,
- BRASERO_BURN_ERROR_GENERAL,
- strerror (errno));
+ ctx->error = g_error_new_literal (BRASERO_BURN_ERROR,
+ BRASERO_BURN_ERROR_GENERAL,
+ g_strerror (errno));
goto end;
}
@@ -181,9 +181,9 @@
if (errno == EAGAIN || errno == EINTR)
continue;
- ctx->error = g_error_new (BRASERO_BURN_ERROR,
- BRASERO_BURN_ERROR_GENERAL,
- strerror (errno));
+ ctx->error = g_error_new_literal (BRASERO_BURN_ERROR,
+ BRASERO_BURN_ERROR_GENERAL,
+ g_strerror (errno));
goto end;
}
Modified: trunk/src/brasero-sum-dialog.c
==============================================================================
--- trunk/src/brasero-sum-dialog.c (original)
+++ trunk/src/brasero-sum-dialog.c Thu Nov 6 14:15:13 2008
@@ -398,6 +398,8 @@
/* now get the md5 sum from the file */
file = fopen (src, "r");
if (!file) {
+ int errsv = errno;
+
if (tmppath)
g_remove (tmppath);
@@ -407,7 +409,7 @@
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
"%s",
- strerror (errno));
+ g_strerror (errsv));
return BRASERO_BURN_ERR;
}
Modified: trunk/src/burn-image-format.c
==============================================================================
--- trunk/src/burn-image-format.c (original)
+++ trunk/src/burn-image-format.c Thu Nov 6 14:15:13 2008
@@ -301,11 +301,13 @@
g_free (path);
if (res == -1) {
+ int errsv = errno;
+
g_set_error (error,
BRASERO_BURN_ERR,
BRASERO_BURN_ERROR_GENERAL,
_("size can't be retrieved (%s)"),
- strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
@@ -386,11 +388,13 @@
g_free (path);
if (res == -1) {
+ int errsv = errno;
+
g_set_error (error,
BRASERO_BURN_ERR,
BRASERO_BURN_ERROR_GENERAL,
_("size can't be retrieved (%s)"),
- strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
@@ -415,11 +419,13 @@
* multiple files. Which is great but not for us ... */
file = fopen (path, "r");
if (!file) {
+ int errsv = errno;
+
g_set_error (error,
BRASERO_BURN_ERR,
BRASERO_BURN_ERROR_GENERAL,
_("size can't be retrieved (%s)"),
- strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
@@ -542,11 +548,13 @@
* multiple files. Which is great but not for us ... */
file = fopen (path, "r");
if (!file) {
+ int errsv = errno;
+
g_set_error (error,
BRASERO_BURN_ERR,
BRASERO_BURN_ERROR_GENERAL,
_("size can't be retrieved (%s)"),
- strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
@@ -584,12 +592,14 @@
/* NOTE: follow symlink if any */
res = g_stat (path, &buffer);
if (res == -1) {
+ int errsv = errno;
+
g_set_error (error,
BRASERO_BURN_ERR,
BRASERO_BURN_ERROR_GENERAL,
_("size can't be retrieved for %s: %s"),
file_path,
- strerror (errno));
+ g_strerror (errsv));
g_free (file_path);
return FALSE;
}
@@ -743,11 +753,13 @@
/* NOTE: follow symlink if any */
res = g_stat (path, &buffer);
if (res == -1) {
+ int errsv = errno;
+
g_set_error (error,
BRASERO_BURN_ERR,
BRASERO_BURN_ERROR_GENERAL,
_("size can't be retrieved (%s)"),
- strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
@@ -785,11 +797,13 @@
/* NOTE: follow symlink if any */
res = g_stat (path, &buffer);
if (res == -1) {
+ int errsv = errno;
+
g_set_error (error,
BRASERO_BURN_ERR,
BRASERO_BURN_ERROR_GENERAL,
_("size can't be retrieved (%s)"),
- strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
Modified: trunk/src/burn-job.c
==============================================================================
--- trunk/src/burn-job.c (original)
+++ trunk/src/burn-job.c Thu Nov 6 14:15:13 2008
@@ -727,11 +727,13 @@
/* setup a pipe */
if (pipe (fd)) {
+ int errsv = errno;
+
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("the pipe couldn't be created (%s)"),
- strerror (errno));
+ g_strerror (errsv));
return BRASERO_BURN_ERR;
}
Modified: trunk/src/burn-process.c
==============================================================================
--- trunk/src/burn-process.c (original)
+++ trunk/src/burn-process.c Thu Nov 6 14:15:13 2008
@@ -580,13 +580,13 @@
fd = -1;
if (brasero_job_get_fd_in (BRASERO_JOB (process), &fd) == BRASERO_BURN_OK) {
if (dup2 (fd, 0) == -1)
- BRASERO_JOB_LOG (process, "Dup2 failed: %s", strerror (errno));
+ BRASERO_JOB_LOG (process, "Dup2 failed: %s", g_strerror (errno));
}
fd = -1;
if (brasero_job_get_fd_out (BRASERO_JOB (process), &fd) == BRASERO_BURN_OK) {
if (dup2 (fd, 1) == -1)
- BRASERO_JOB_LOG (process, "Dup2 failed: %s", strerror (errno));
+ BRASERO_JOB_LOG (process, "Dup2 failed: %s", g_strerror (errno));
}
}
@@ -683,7 +683,7 @@
if (kill (pid, SIGTERM) == -1 && errno != ESRCH) {
BRASERO_JOB_LOG (process,
"process (%s) couldn't be killed: terminating",
- strerror (errno));
+ g_strerror (errno));
kill (pid, SIGKILL);
}
else
Modified: trunk/src/burn-session.c
==============================================================================
--- trunk/src/burn-session.c (original)
+++ trunk/src/burn-session.c Thu Nov 6 14:15:13 2008
@@ -745,12 +745,14 @@
*path = mkdtemp (tmp);
if (*path == NULL) {
+ int errsv = errno;
+
g_free (tmp);
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("a temporary directory could not be created (%s)"),
- strerror (errno));
+ g_strerror (errsv));
return BRASERO_BURN_ERR;
}
@@ -793,12 +795,14 @@
fd = g_mkstemp (tmp);
if (fd == -1) {
+ int errsv = errno;
+
g_free (tmp);
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("a temporary file can't be created: %s"),
- strerror (errno));
+ g_strerror (errsv));
return BRASERO_BURN_ERR;
}
@@ -1533,7 +1537,7 @@
/* NOTE : we don't follow paths as certain files are simply linked */
if (g_remove (path)) {
- BRASERO_BURN_LOG ("Cannot remove file %s (%s)", path, strerror (errno));
+ BRASERO_BURN_LOG ("Cannot remove file %s (%s)", path, g_strerror (errno));
result = FALSE;
}
Modified: trunk/src/burn-volume-source.c
==============================================================================
--- trunk/src/burn-volume-source.c (original)
+++ trunk/src/burn-volume-source.c Thu Nov 6 14:15:13 2008
@@ -66,15 +66,17 @@
oldpos = ftello (src->data);
if (fseeko (src->data, (guint64) (block * ISO9660_BLOCK_SIZE), whence) == -1) {
+ int errsv = errno;
+
BRASERO_BURN_LOG ("fseeko () failed at block %i (= %lli bytes) (%s)",
block,
(guint64) (block * ISO9660_BLOCK_SIZE),
- strerror (errno));
+ g_strerror (errsv));
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
"%s",
- strerror (errno));
+ g_strerror (errsv));
return -1;
}
@@ -93,12 +95,14 @@
bytes_read = fread (buffer, 1, ISO9660_BLOCK_SIZE * blocks, src->data);
if (bytes_read != ISO9660_BLOCK_SIZE * blocks) {
- BRASERO_BURN_LOG ("fread () failed (%s)", strerror (errno));
+ int errsv = errno;
+
+ BRASERO_BURN_LOG ("fread () failed (%s)", g_strerror (errsv));
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
"%s",
- strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
@@ -227,12 +231,14 @@
file = fopen (path, "r");
if (!file) {
- BRASERO_BURN_LOG ("open () failed (%s)", strerror (errno));
+ int errsv = errno;
+
+ BRASERO_BURN_LOG ("open () failed (%s)", g_strerror (errsv));
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
"%s",
- strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
@@ -254,25 +260,29 @@
dup_fd = dup (fd);
if (dup_fd == -1) {
- BRASERO_BURN_LOG ("dup () failed (%s)", strerror (errno));
+ int errsv = errno;
+
+ BRASERO_BURN_LOG ("dup () failed (%s)", g_strerror (errsv));
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
"%s",
- strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
file = fdopen (dup_fd, "r");
if (!file) {
+ int errsv = errno;
+
close (dup_fd);
- BRASERO_BURN_LOG ("fdopen () failed (%s)", strerror (errno));
+ BRASERO_BURN_LOG ("fdopen () failed (%s)", g_strerror (errsv));
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
"%s",
- strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
Modified: trunk/src/plugins/cdrdao/burn-toc2cue.c
==============================================================================
--- trunk/src/plugins/cdrdao/burn-toc2cue.c (original)
+++ trunk/src/plugins/cdrdao/burn-toc2cue.c Thu Nov 6 14:15:13 2008
@@ -104,6 +104,8 @@
output = fopen (toc_path, "w");
if (!output) {
+ int errsv = errno;
+
g_io_channel_unref (source);
g_free (img_path);
@@ -112,7 +114,7 @@
brasero_job_error (BRASERO_JOB (process),
g_error_new_literal (BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
- g_strerror (errno)));
+ g_strerror (errsv)));
return BRASERO_BURN_OK;
}
@@ -139,6 +141,8 @@
}
if (!fwrite (buffer, strlen (buffer), 1, output)) {
+ int errsv = errno;
+
g_free (buffer);
fclose (output);
@@ -152,7 +156,7 @@
brasero_job_error (BRASERO_JOB (process),
g_error_new_literal (BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
- g_strerror (errno)));
+ g_strerror (errsv)));
return BRASERO_BURN_OK;
}
@@ -174,18 +178,22 @@
/* the previous track image path will now be a link pointing to the
* image path of the new track just created */
if (g_rename (tmp_img_path, img_path)) {
+ int errsv = errno;
+
brasero_job_error (BRASERO_JOB (self),
g_error_new_literal (BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
- g_strerror (errno)));
+ g_strerror (errsv)));
return BRASERO_BURN_OK;
}
if (link (img_path, tmp_img_path)) {
+ int errsv = errno;
+
brasero_job_error (BRASERO_JOB (self),
g_error_new_literal (BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
- g_strerror (errno)));
+ g_strerror (errsv)));
return BRASERO_BURN_OK;
} /* symlink () could also be used */
Modified: trunk/src/plugins/cdrkit/burn-wodim.c
==============================================================================
--- trunk/src/plugins/cdrkit/burn-wodim.c (original)
+++ trunk/src/plugins/cdrkit/burn-wodim.c Thu Nov 6 14:15:13 2008
@@ -384,6 +384,7 @@
gchar buffer [128];
BraseroSongInfo *info;
BraseroWodimPrivate *priv;
+ int errsv;
priv = BRASERO_WODIM_PRIVATE (wodim);
@@ -577,6 +578,8 @@
error:
+ errsv = errno;
+
g_remove (path);
g_free (path);
@@ -584,7 +587,7 @@
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("the inf file can't be written : %s"),
- strerror (errno));
+ g_strerror (errsv));
return BRASERO_BURN_ERR;
}
Modified: trunk/src/plugins/cdrtools/burn-cdrecord.c
==============================================================================
--- trunk/src/plugins/cdrtools/burn-cdrecord.c (original)
+++ trunk/src/plugins/cdrtools/burn-cdrecord.c Thu Nov 6 14:15:13 2008
@@ -386,6 +386,7 @@
gchar buffer [128];
BraseroSongInfo *info;
BraseroCDRecordPrivate *priv;
+ int errsv;
priv = BRASERO_CD_RECORD_PRIVATE (cdrecord);
@@ -582,6 +583,8 @@
error:
+ errsv = errno;
+
g_remove (path);
g_free (path);
@@ -589,7 +592,7 @@
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("the inf file can't be written : %s"),
- strerror (errno));
+ g_strerror (errsv));
return BRASERO_BURN_ERR;
}
Modified: trunk/src/plugins/checksum/burn-checksum-files.c
==============================================================================
--- trunk/src/plugins/checksum/burn-checksum-files.c (original)
+++ trunk/src/plugins/checksum/burn-checksum-files.c Thu Nov 6 14:15:13 2008
@@ -96,6 +96,7 @@
file = fopen (path, "r");
if (!file) {
+ int errsv;
gchar *name = NULL;
/* If the file doesn't exist carry on with next */
@@ -104,12 +105,13 @@
name = g_path_get_basename (path);
+ errsv = errno;
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("the file %s couldn't be read (%s)"),
name,
- strerror (errno));
+ g_strerror (errsv));
g_free (name);
return BRASERO_BURN_ERR;
@@ -165,11 +167,12 @@
g_free (checksum_string);
if (written != 1) {
+ int errsv = errno;
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("the md5 file couldn't be written to (%s)"),
- strerror (errno));
+ g_strerror (errsv));
return BRASERO_BURN_ERR;
}
@@ -187,11 +190,12 @@
priv->file);
if (written != 1) {
+ int errsv = errno;
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("the md5 file couldn't be written to (%s)"),
- strerror (errno));
+ g_strerror (errsv));
return BRASERO_BURN_ERR;
}
@@ -542,11 +546,12 @@
priv->file = fopen (priv->sums_path, "w");
if (!priv->file) {
+ int errsv = errno;
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("md5 file couldn't be opened (%s)"),
- strerror (errno));
+ g_strerror (errsv));
return BRASERO_BURN_ERR;
}
Modified: trunk/src/plugins/checksum/burn-checksum-image.c
==============================================================================
--- trunk/src/plugins/checksum/burn-checksum-image.c (original)
+++ trunk/src/plugins/checksum/burn-checksum-image.c Thu Nov 6 14:15:13 2008
@@ -101,12 +101,14 @@
/* ... or an error =( */
if (read_bytes == -1) {
if (errno != EAGAIN && errno != EINTR) {
+ int errsv = errno;
+
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("data could not be read from the pipe (%i: %s)"),
- errno,
- strerror (errno));
+ errsv,
+ g_strerror (errsv));
return -1;
}
}
@@ -149,13 +151,15 @@
if (written != bytes_remaining) {
if (errno != EINTR && errno != EAGAIN) {
+ int errsv = errno;
+
/* unrecoverable error */
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("the data couldn't be written to the pipe (%i: %s)"),
- errno,
- strerror (errno));
+ errsv,
+ g_strerror (errsv));
return BRASERO_BURN_ERR;
}
}
@@ -278,6 +282,7 @@
fd_in = open (path, O_RDONLY);
if (!fd_in) {
+ int errsv;
gchar *name = NULL;
if (errno == ENOENT)
@@ -285,12 +290,13 @@
name = g_path_get_basename (path);
+ errsv = errno;
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("the file %s couldn't be read (%s)"),
name,
- strerror (errno));
+ g_strerror (errsv));
g_free (name);
g_free (path);
Modified: trunk/src/plugins/dvdcss/burn-dvdcss.c
==============================================================================
--- trunk/src/plugins/dvdcss/burn-dvdcss.c (original)
+++ trunk/src/plugins/dvdcss/burn-dvdcss.c Thu Nov 6 14:15:13 2008
@@ -206,12 +206,14 @@
if (written != bytes_remaining) {
if (errno != EINTR && errno != EAGAIN) {
+ int errsv = errno;
+
/* unrecoverable error */
priv->error = g_error_new (BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("the data couldn't be written to the pipe (%i: %s)"),
- errno,
- strerror (errno));
+ errsv,
+ g_strerror (errsv));
return BRASERO_BURN_ERR;
}
@@ -456,11 +458,13 @@
data_size = num_blocks * DVDCSS_BLOCK_SIZE;
if (output_fd) {
if (fwrite (buf, 1, data_size, output_fd) != data_size) {
+ int errsv = errno;
+
priv->error = g_error_new (BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("the data couldn't be written to the file (%i: %s)"),
- errno,
- strerror (errno));
+ errsv,
+ g_strerror (errsv));
break;
}
}
Modified: trunk/src/plugins/libburnia/burn-libisofs.c
==============================================================================
--- trunk/src/plugins/libburnia/burn-libisofs.c (original)
+++ trunk/src/plugins/libburnia/burn-libisofs.c Thu Nov 6 14:15:13 2008
@@ -139,12 +139,14 @@
if (written != bytes_remaining) {
if (errno != EINTR && errno != EAGAIN) {
+ int errsv = errno;
+
/* unrecoverable error */
priv->error = g_error_new (BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("the data couldn't be written to the pipe (%i: %s)"),
- errno,
- strerror (errno));
+ errsv,
+ g_strerror (errsv));
return BRASERO_BURN_ERR;
}
@@ -212,9 +214,9 @@
brasero_job_get_image_output (BRASERO_JOB (self), &output, NULL);
file = fopen (output, "w");
if (!file) {
- priv->error = g_error_new (BRASERO_BURN_ERROR,
- BRASERO_BURN_ERROR_GENERAL,
- strerror (errno));
+ priv->error = g_error_new_literal (BRASERO_BURN_ERROR,
+ BRASERO_BURN_ERROR_GENERAL,
+ g_strerror (errno));
return;
}
@@ -233,11 +235,13 @@
break;
if (fwrite (buf, 1, sector_size, file) != sector_size) {
+ int errsv = errno;
+
priv->error = g_error_new (BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("the data couldn't be written to the file (%i: %s)"),
- errno,
- strerror (errno));
+ errsv,
+ g_strerror (errsv));
break;
}
Modified: trunk/src/plugins/local-track/burn-local-image.c
==============================================================================
--- trunk/src/plugins/local-track/burn-local-image.c (original)
+++ trunk/src/plugins/local-track/burn-local-image.c Thu Nov 6 14:15:13 2008
@@ -222,11 +222,12 @@
/* create a directory with the same name and explore it */
if (g_mkdir (path, S_IRWXU)) {
+ int errsv = errno;
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("a directory couldn't be created (%s)"),
- strerror (errno));
+ g_strerror (errsv));
result = BRASERO_BURN_ERR;
}
else {
@@ -307,6 +308,8 @@
/* remove the temporary file that was created */
g_remove (dest_path);
if (g_mkdir_with_parents (dest_path, S_IRWXU)) {
+ int errsv = errno;
+
g_free (dest_path);
g_object_unref (info);
@@ -314,7 +317,7 @@
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("a directory couldn't be created (%s)"),
- strerror (errno));
+ g_strerror (errsv));
return BRASERO_BURN_ERR;
}
Modified: trunk/src/plugins/transcode/burn-transcode.c
==============================================================================
--- trunk/src/plugins/transcode/burn-transcode.c (original)
+++ trunk/src/plugins/transcode/burn-transcode.c Thu Nov 6 14:15:13 2008
@@ -577,11 +577,13 @@
brasero_job_get_audio_output (BRASERO_JOB (transcode), &path_dest);
if (symlink (path_src, path_dest) == -1) {
+ int errsv = errno;
+
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("a symlink could not be created (%s)"),
- strerror (errno));
+ g_strerror (errsv));
goto error;
}
@@ -833,11 +835,13 @@
}
if (size != b_written) {
+ int errsv = errno;
+
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("error padding (%s)"),
- strerror (errno));
+ g_strerror (errsv));
return -1;
}
}
@@ -1023,11 +1027,13 @@
g_free (output);
if (fd == -1) {
+ int errsv = errno;
+
g_set_error (error,
BRASERO_BURN_ERROR,
BRASERO_BURN_ERROR_GENERAL,
_("error opening file for padding : %s"),
- strerror (errno));
+ g_strerror (errsv));
return FALSE;
}
Modified: trunk/src/scsi-error.c
==============================================================================
--- trunk/src/scsi-error.c (original)
+++ trunk/src/scsi-error.c Thu Nov 6 14:15:13 2008
@@ -51,7 +51,7 @@
return NULL;
if (code == BRASERO_SCSI_ERRNO)
- return strerror (errno);
+ return g_strerror (errno);
return _(error_string [code]);
}
Modified: trunk/src/scsi-utils.h
==============================================================================
--- trunk/src/scsi-utils.h (original)
+++ trunk/src/scsi-utils.h Thu Nov 6 14:15:13 2008
@@ -54,8 +54,9 @@
#define BRASERO_SCSI_SET_ERRCODE(err, code) \
{ \
if (code == BRASERO_SCSI_ERRNO) { \
+ int errsv = errno; \
BRASERO_BURN_LOG ("SCSI command error: %s", \
- strerror (errno)); \
+ g_strerror (errsv)); \
} else { \
BRASERO_BURN_LOG ("SCSI command error: %s", \
brasero_scsi_strerror (code)); \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]