Lines 34-39
Link Here
|
34 |
#include <unistd.h> |
34 |
#include <unistd.h> |
35 |
#endif |
35 |
#endif |
36 |
|
36 |
|
|
|
37 |
#include <langinfo.h> |
38 |
|
37 |
#include <libhal-storage.h> |
39 |
#include <libhal-storage.h> |
38 |
|
40 |
|
39 |
#include <exo-hal/exo-hal.h> |
41 |
#include <exo-hal/exo-hal.h> |
Lines 616-621
oom: g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_NOMEM, g_strerror (ENOMEM))
Link Here
|
616 |
|
618 |
|
617 |
|
619 |
|
618 |
/** |
620 |
/** |
|
|
621 |
* exo_mount_hal_iocharset: |
622 |
* |
623 |
* Determines the preferred iocharset for filesystems |
624 |
* that support it. |
625 |
* |
626 |
* Return value: iocharset string or %NULL if none. |
627 |
**/ |
628 |
static const gchar* |
629 |
exo_mount_hal_iocharset () |
630 |
{ |
631 |
const gchar* cs = g_getenv("EXO_MOUNT_IOCHARSET"); |
632 |
if (cs != NULL) |
633 |
return cs; |
634 |
|
635 |
const char* codeset = nl_langinfo (CODESET); |
636 |
if (codeset && !strcmp (codeset, "UTF-8")) |
637 |
return "utf8"; |
638 |
|
639 |
return NULL; |
640 |
} |
641 |
|
642 |
|
643 |
|
644 |
/** |
619 |
* exo_mount_hal_device_mount: |
645 |
* exo_mount_hal_device_mount: |
620 |
* @device : an #ExoMountHalDevice. |
646 |
* @device : an #ExoMountHalDevice. |
621 |
* @error : return location for errors or %NULL. |
647 |
* @error : return location for errors or %NULL. |
Lines 676-681
exo_mount_hal_device_mount (ExoMountHalDevice *device,
Link Here
|
676 |
/* however this one is FreeBSD specific */ |
702 |
/* however this one is FreeBSD specific */ |
677 |
options[n++] = g_strdup ("longnames"); |
703 |
options[n++] = g_strdup ("longnames"); |
678 |
} |
704 |
} |
|
|
705 |
else if (strcmp (device->fsoptions[m], "iocharset=") == 0) |
706 |
{ |
707 |
const gchar* iocharset = exo_mount_hal_iocharset(); |
708 |
if (iocharset != NULL) |
709 |
options[n++] = g_strdup_printf ("iocharset=%s", iocharset); |
710 |
} |
679 |
} |
711 |
} |
680 |
} |
712 |
} |
681 |
|
713 |
|