ntfs-3g support for pmount
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pmount (Ubuntu) |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
Hi,
Since now ntfs-3g is in the repo, it's could be nice if pmount could support it. I wrote a little patch to add this support :
diff -Nur pmount-
--- pmount-
+++ pmount-
@@ -23,6 +23,7 @@
{ "iso9660", "nosuid,
{ "vfat", "nosuid,
{ "ntfs", "nosuid,
+ { "ntfs-3g", "nosuid,
{ "hfsplus", "nosuid,
{ "hfs", "nosuid,
{ "ext3", "nodev,
diff -Nur pmount-
--- pmount-
+++ pmount-
@@ -286,6 +286,11 @@
return -1;
}
snprintf( iocharset_opt, sizeof( iocharset_opt ), ",iocharset=%s", iocharset );
+ /* for ntfs-3g we will use the locale= option */
+ if (strcmp (fsname, "ntfs-3g") == 0) {
+ debug( "filesystem is ntfs-3g. Setting locale to %s\n", setlocale( LC_ALL, "" ));
+ snprintf( iocharset_opt, sizeof( iocharset_opt ), ",locale=%s", setlocale( LC_ALL, "" ));
+ }
}
Basically, it consist just of adding ntfs-3g to fs.c & add a little thing to handle the special locale= option of ntfs-3g which replace the iocharset stuff.
The main issue is that i have to add an nonempty option otherwise it fails to mount, and i don't know actually what's the cause. Since pmount itself check also if the directory is empty or not, that's not really an issue, but it's quite silly.
This patch don't replace the ntfs driver which is still default, but it allow to mount easily an ntfs USB disk in the user space with read/write support quite easily, with a simple command :
pmount -t ntfs-3g /dev/sda1.
And it's also could be use with a nautilus script which remount the drive with the -t ntfs-3g option (i'm trying to make such script)
Consider this bug as a wish.
Thanks
Changed in pmount: | |
importance: | Undecided → Wishlist |
status: | Unconfirmed → Confirmed |
Excuse the rant, but what gives? As of 2007-05-19, this bug has been here for more than 6 months, Feisty has been released with ntfs-3g right in its repositories and we're still stuck on being unable to automount removable ntfs volumes with it. A possible solution is right in the bug report. Since ntfs-3g is supposed to be supported, I'm increasing the importance.
Looking forward to a fix. Thanks.