 |
|
Page 1 of 1
|
[ 7 posts ] |
|
accepting -n/no-mtab so ntfs-3g can be automounted
| Author |
Message |
|
jasiu
Joined: Wed Sep 15, 2010 00:34 Posts: 4
|
 accepting -n/no-mtab so ntfs-3g can be automounted
automount from recent autofs versions (5.0.5) passes '-n' option to mount.* when /etc/mtab is a link to /proc/mounts; mount.ntfs-3g should ignore it, but for now it exits with an error instead.
I attached a patch for ntfs-3g.c, so it silently ignores '-n' = 'no-mtab' passed by automount. It applies to 2010.8.8 and works like magic on my Gentoo (-:
/etc/auto.m ewa -fstype=ntfs-3g,rw,noexec,nodev,umask=0007 :/dev/disk/by-label/ewa
I can not attach a file ("The extension [any I've tried] is not allowed." Why!?), so here it is:
--- src/ntfs-3g.c.orig 2010-08-07 02:28:01.000000000 +0200 +++ src/ntfs-3g.c 2010-09-15 00:24:52.800395630 +0200 @@ -3993,10 +3993,11 @@ { int c; - static const char *sopt = "-o:hvV"; + static const char *sopt = "-o:hnvV"; static const struct option lopt[] = { { "options", required_argument, NULL, 'o' }, { "help", no_argument, NULL, 'h' }, + { "no-mtab", no_argument, NULL, 'n' }, { "verbose", no_argument, NULL, 'v' }, { "version", no_argument, NULL, 'V' }, { NULL, 0, NULL, 0 } @@ -4039,6 +4040,11 @@ case 'h': usage(); exit(9); + case 'n': + /* + * no effect - automount passes it meaning 'no-mtab' + */ + break; case 'v': /* * We must handle the 'verbose' option even if
|
| Wed Sep 15, 2010 01:08 |
|
 |
|
jpa
NTFS-3G Lead Developer
Joined: Tue Sep 04, 2007 17:22 Posts: 1008
|
 Re: accepting -n/no-mtab so ntfs-3g can be automounted
Hi, Quote: I attached a patch for ntfs-3g.c, so it silently ignores '-n' = 'no-mtab' Thank you for the proposal. Actually this patch is included in all Fedora builds (and probably others). Quote: I can not attach a file ("The extension [any I've tried] is not allowed." Why!?), Because this forum only accepts compressed attachments (should accept extensions gz, zip, bz2, rar, etc.) Regards Jean-Pierre
|
| Wed Sep 15, 2010 08:16 |
|
 |
|
jasiu
Joined: Wed Sep 15, 2010 00:34 Posts: 4
|
 Re: accepting -n/no-mtab so ntfs-3g can be automounted
Compressed... So here it goes  (but .xz nor .lzma do not work!) I was looking for a resolution before I posted it to you, but didn't found. Fedora did not broadcast it... So I'll add it to my overlay and send to Gentoo developers and maybe in new ntfs-3g release there will be no need to apply it  Thank you all for ntfs-3g! Repairing Windows would be impossible without it.
Attachments:
File comment: proposed change to ntfs-3g.c so mount.ntfs-3g won't abort seeing '-n' option
ntfs-3g-n.patch.bz2 [476 Bytes]
Downloaded 119 times
|
| Wed Sep 15, 2010 11:36 |
|
 |
|
jpa
NTFS-3G Lead Developer
Joined: Tue Sep 04, 2007 17:22 Posts: 1008
|
 Re: accepting -n/no-mtab so ntfs-3g can be automounted
Hi, Quote: Fedora did not broadcast it... But it is included in for instance http://download.fedora.redhat.com/pub/f ... 13.src.rpm I see however a difference : Code: # Fedora : { "nomtab", no_argument, NULL, 'n' }, # your proposal : { "no-mtab", no_argument, NULL, 'n' }, Are these the same ? Regards Jean-Pierre
|
| Wed Sep 15, 2010 12:05 |
|
 |
|
jasiu
Joined: Wed Sep 15, 2010 00:34 Posts: 4
|
 Re: accepting -n/no-mtab so ntfs-3g can be automounted
Of course! Of course both patches do the same in the same way, I mean. The only difference is that in my no-mtab is spelled correctly (and my comment is shorter, as I see). So if any program would call Fedora patched mount.ntfs-3g with long --no-mtab option - it won't run. (automount use "-n")
Why didn't they told you about it long ago? Did they? And if they did - why wasn't it released?...
|
| Wed Sep 15, 2010 17:50 |
|
 |
|
jpa
NTFS-3G Lead Developer
Joined: Tue Sep 04, 2007 17:22 Posts: 1008
|
 Re: accepting -n/no-mtab so ntfs-3g can be automounted
Hi, Quote: The only difference is that in my no-mtab is spelled correctly (and my comment is shorter, as I see). Thank you for the clarification. Quote: Why didn't they told you about it long ago? Did they? Maybe they did, I do not know, this patch has existed for years. Quote: And if they did - why wasn't it released?... I did not have the rationale, and I thought it was specific to their bundling. Now, I flag it for future releases. Regards Jean-Pierre
|
| Wed Sep 15, 2010 18:18 |
|
 |
|
jasiu
Joined: Wed Sep 15, 2010 00:34 Posts: 4
|
 Re: accepting -n/no-mtab so ntfs-3g can be automounted
Thank you! I would feel honoured 
|
| Thu Sep 16, 2010 16:34 |
|
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Who is online |
Users browsing this forum: Google [Bot] and 1 guest |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|
 |