On Mon, Jun 27, 2011 at 12:06:29PM -0400, Ted Unangst wrote: > On Mon, 27 Jun 2011, Kenneth R Westerback wrote: > > > On Mon, Jun 27, 2011 at 12:08:15AM -0400, Ted Unangst wrote: > > > Remove some words that are not typically found in OpenBSD mount man > > > pages. > > > Write support is simply not going to happen, so we can summarize that > > > situation much more succinctly. (and enforce readonly mounts in the > > > program.) > > > > Seems good to me, except for the mysterious admonition to start the > > NTFS partition at offset 63. I don't know what on the disklabel(8) > > page would provide support for, or info about this recommendation. > > And in the world of disks 64 is much more popular now, even in the > > Windows world. > > > > I suggest removing that text too. > > Deleted that whole section. User errors are not bugs. > > > On re-reading it I don't see any mention that -o ro is automatic and > > unchangeable. i.e. filesstems can only be mounted read only. I think > > that needs to be in there. Possibly in the first paragraph, and mentioned > > in the options sections (i.e. -o rw won't work, if that is true). > > Added a mention. New diff below.
Works for me. I'm sure jmc@ will have tweeks when he surfaces. :-) .... Ken > > Index: mount_ntfs.8 > =================================================================== > RCS file: /home/tedu/cvs/src/sbin/mount_ntfs/mount_ntfs.8,v > retrieving revision 1.11 > diff -u -r1.11 mount_ntfs.8 > --- mount_ntfs.8 13 Oct 2010 15:40:31 -0000 1.11 > +++ mount_ntfs.8 27 Jun 2011 16:05:26 -0000 > @@ -55,12 +55,14 @@ > to the global filesystem namespace at the location > indicated by > .Pa node . > -This command is normally executed by > +This command is invoked by > .Xr mount 8 > -at boot time, but can be used by any user to mount an > -NTFS file system on any directory that they own (provided, > -of course, that they have appropriate access to the device that > -contains the file system). > +when using the syntax > +.Bd -ragged -offset 4h > +.Nm mount Op options > +-t ntfs > +.Ar special Ar node > +.Ed > .Pp > The > .Ar special > @@ -80,6 +82,7 @@ > .Pp > The supported NTFS versions include both NTFS4, as used by Microsoft > Windows NT 4.0, and NTFS5, as used by Microsoft Windows 2000 and XP. > +Only read-only operation is permitted, this will be automatically enforced. > .Pp > The options are as follows: > .Bl -tag -width Ds > @@ -134,37 +137,12 @@ > .Bd -literal -offset indent > # cat /mnt/foodir:\e$INDEX_ROOT:\e$I30 > .Ed > -.Ss Limited support for writing > -There is limited writing ability for files. > -Limitations: > -.Pp > -.Bl -bullet -compact > -.It > -file must be non-resident > -.It > -file must > -.Em not > -contain any holes (uninitialized areas) > -.It > -file can't be compressed > -.El > -.Pp > -Note that it's not currently possible to create or remove files > -on NTFS filesystems. > -.Pp > -.Sy Warning : > -do not mount NTFS filesystems read-write. > -The write support is not very useful and is not tested well. > -It's not safe to write to any file on NTFS; you might damage the filesystem. > -Unless you want to debug NTFS filesystem code, mount the NTFS filesystem > -read-only. > .Sh SEE ALSO > .Xr mount 2 , > .Xr unmount 2 , > .Xr disklabel 5 , > .Xr fstab 5 , > .Xr disklabel 8 , > -.\" .Xr mbrlabel 8 , > .Xr mount 8 > .Sh HISTORY > Support for NTFS first appeared in > @@ -185,23 +163,7 @@ > port was done by > .An Julien Bordet Aq [email protected] . > .Sh BUGS > -The write support should be enhanced to actually be able to change > -file size, and to create and remove files and directories. > -It's not very useful right now. > -.Pp > -If the attempt to mount NTFS gives you an error like this: > -.Bd -literal -offset indent > -# mount -t ntfs /dev/wd0k /mnt > -mount_ntfs: /dev/wd0k on /mnt: Invalid argument > -.Ed > -.Pp > -make sure that the appropriate partition has the correct entry in the > -disk label, particularly that the partition offset is correct. > -If the NTFS partition is the first partition on the disk, the > -offset should be '63' (see > -.Xr disklabel 8 ) . > -.\" .Xr mbrlabel 8 > -.\" could help you to set up the disk label correctly. > +Only read support is enabled. > .Pp > If the NTFS partition is marked as > .Ql dynamic > Index: mount_ntfs.c > =================================================================== > RCS file: /home/tedu/cvs/src/sbin/mount_ntfs/mount_ntfs.c,v > retrieving revision 1.12 > diff -u -r1.12 mount_ntfs.c > --- mount_ntfs.c 14 Apr 2007 17:07:28 -0000 1.12 > +++ mount_ntfs.c 27 Jun 2011 04:05:37 -0000 > @@ -109,6 +109,8 @@ > } > } > > + mntflags |= MNT_RDONLY; > + > if (optind + 2 != argc) > usage();
