From cffa5b78387e28b1a5b1d1674ec7854f6ebd8246 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 4 Jun 2013 13:56:19 +0200 Subject: libblock: Use UTF-8 converter in media manager --- cpukit/libblock/src/media.c | 13 ++++++++++--- 1 file 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 * @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -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); -- cgit v1.2.3