Use g_strerror() instead of strerror() - we want UTF-8.
authorTim-Philipp Müller <tim@centricular.net>
Mon, 6 Nov 2006 17:53:24 +0000 (17:53 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Mon, 6 Nov 2006 17:53:24 +0000 (17:53 +0000)
Original commit message from CVS:
* gst/gstplugin.c: (gst_plugin_load_file):
* plugins/elements/gstfilesrc.c: (gst_mmap_buffer_finalize),
(gst_file_src_map_region), (gst_file_src_start):
* plugins/indexers/gstfileindex.c: (gst_file_index_load),
(gst_file_index_commit):
Use g_strerror() instead of strerror() - we want UTF-8.

ChangeLog
gst/gstplugin.c
plugins/elements/gstfilesrc.c
plugins/indexers/gstfileindex.c

index d4a1dd7..7be006d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2006-11-06  Tim-Philipp Müller  <tim at centricular dot net>
 
+       * gst/gstplugin.c: (gst_plugin_load_file):
+       * plugins/elements/gstfilesrc.c: (gst_mmap_buffer_finalize),
+       (gst_file_src_map_region), (gst_file_src_start):
+       * plugins/indexers/gstfileindex.c: (gst_file_index_load),
+       (gst_file_index_commit):
+         Use g_strerror() instead of strerror() - we want UTF-8.
+
+2006-11-06  Tim-Philipp Müller  <tim at centricular dot net>
+
        Patch by: Peter Kjellerstedt <pkj at axis com>
 
        * plugins/elements/gstfdsrc.c: (gst_fd_src_create):
index b59350e..64e4ee9 100644 (file)
@@ -403,8 +403,8 @@ gst_plugin_load_file (const gchar * filename, GError ** error)
     GST_CAT_DEBUG (GST_CAT_PLUGIN_LOADING, "problem accessing file");
     g_set_error (error,
         GST_PLUGIN_ERROR,
-        GST_PLUGIN_ERROR_MODULE, "Problem accessing file %s: %s\n", filename,
-        strerror (errno));
+        GST_PLUGIN_ERROR_MODULE, "Problem accessing file %s: %s", filename,
+        g_strerror (errno));
     goto return_error;
   }
 
index 6ba26a4..3dae638 100644 (file)
@@ -513,13 +513,13 @@ gst_mmap_buffer_finalize (GstMmapBuffer * mmap_buffer)
 #ifdef MADV_DONTNEED
   /* madvise to tell the kernel what to do with it */
   if (madvise (data, size, MADV_DONTNEED) < 0) {
-    GST_WARNING_OBJECT (src, "warning: madvise failed: %s", strerror (errno));
+    GST_WARNING_OBJECT (src, "warning: madvise failed: %s", g_strerror (errno));
   }
 #endif
 
   /* now unmap the memory */
   if (munmap (data, size) < 0) {
-    GST_WARNING_OBJECT (src, "warning: munmap failed: %s", strerror (errno));
+    GST_WARNING_OBJECT (src, "warning: munmap failed: %s", g_strerror (errno));
   }
 
   /* cast to unsigned long, since there's no gportable way to print
@@ -558,7 +558,8 @@ gst_file_src_map_region (GstFileSrc * src, off_t offset, size_t size,
   if (src->sequential) {
     /* madvise to tell the kernel what to do with it */
     if (madvise (mmapregion, size, MADV_SEQUENTIAL) < 0) {
-      GST_WARNING_OBJECT (src, "warning: madvise failed: %s", strerror (errno));
+      GST_WARNING_OBJECT (src, "warning: madvise failed: %s",
+          g_strerror (errno));
     }
   }
 #endif
@@ -577,7 +578,7 @@ mmap_failed:
     if (!testonly) {
       GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL),
           ("mmap (0x%08lx, %d, 0x%llx) failed: %s",
-              (gulong) size, src->fd, offset, strerror (errno)));
+              (gulong) size, src->fd, offset, g_strerror (errno)));
     }
     return NULL;
   }
@@ -946,7 +947,7 @@ gst_file_src_start (GstBaseSrc * basesrc)
 
     if (res < 0) {
       GST_LOG_OBJECT (src, "disabling seeking, not in mmap mode and lseek "
-          "failed: %s", strerror (errno));
+          "failed: %s", g_strerror (errno));
       src->seekable = FALSE;
     } else {
       src->seekable = TRUE;
index d9a7699..4d5bbe7 100644 (file)
@@ -395,7 +395,7 @@ gst_file_index_load (GstFileIndex * index)
         g_free (path);
         if (fd < 0) {
           GST_ERROR_OBJECT (index,
-              "Can't open '%s': %s", path, strerror (errno));
+              "Can't open '%s': %s", path, g_strerror (errno));
           continue;
         }
 
@@ -441,7 +441,7 @@ gst_file_index_load (GstFileIndex * index)
         close (fd);
         if (array_data == MAP_FAILED) {
           GST_ERROR_OBJECT (index,
-              "mmap %s failed: %s", path, strerror (errno));
+              "mmap %s failed: %s", path, g_strerror (errno));
           continue;
         }
 
@@ -601,7 +601,8 @@ gst_file_index_commit (GstIndex * _index, gint _writer_id)
       (GHFunc) _file_index_id_save_xml, writers);
 
   if (mkdir (index->location, 0777) && errno != EEXIST) {
-    GST_ERROR_OBJECT (index, "mkdir %s: %s", index->location, strerror (errno));
+    GST_ERROR_OBJECT (index, "mkdir %s: %s", index->location,
+        g_strerror (errno));
     return;
   }