summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-04 13:56:19 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-06-04 13:56:19 +0200
commitcffa5b78387e28b1a5b1d1674ec7854f6ebd8246 (patch)
treea36fd0fbb24604e749c16ae21e8280fe652e684c
parentdosfs: Documentation (diff)
downloadrtems-cffa5b78387e28b1a5b1d1674ec7854f6ebd8246.tar.bz2
libblock: Use UTF-8 converter in media manager
-rw-r--r--cpukit/libblock/src/media.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/cpukit/libblock/src/media.c b/cpukit/libblock/src/media.c
index e533ec4db0..c4415e4c5a 100644
--- a/cpukit/libblock/src/media.c
+++ b/cpukit/libblock/src/media.c
@@ -7,10 +7,10 @@
*/
/*
- * Copyright (c) 2009-2012 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2009-2013 embedded brains GmbH. All rights reserved.
*
* embedded brains GmbH
- * Obere Lagerstr. 30
+ * Dornierstr. 4
* 82178 Puchheim
* Germany
* <rtems@embedded-brains.de>
@@ -29,6 +29,7 @@
#include <rtems/blkdev.h>
#include <rtems/bdpart.h>
#include <rtems/libio.h>
+#include <rtems/dosfs.h>
#include <rtems/media.h>
@@ -472,6 +473,7 @@ static rtems_status_code mount_worker(
int rv = 0;
if (state == RTEMS_MEDIA_STATE_READY) {
+ rtems_dosfs_mount_options mount_options;
char *mount_path = NULL;
if (worker_arg == NULL) {
@@ -491,12 +493,17 @@ static rtems_status_code mount_worker(
return RTEMS_IO_ERROR;
}
+ memset(&mount_options, 0, sizeof(mount_options));
+
+ /* In case this fails, we fall back to use the default converter */
+ mount_options.converter = rtems_dosfs_create_utf8_converter("CP850");
+
rv = mount(
src,
mount_path,
RTEMS_FILESYSTEM_TYPE_DOSFS,
RTEMS_FILESYSTEM_READ_WRITE,
- NULL
+ &mount_options
);
if (rv != 0) {
rmdir(mount_path);