leftovers in fs/msdosfs/msdosfsmount.h

Chris Torek chris.torek at gmail.com
Fri Mar 20 03:49:34 UTC 2015


I was poking at the kernel-side msdosfs code for reasons too boring :-) to
go into here and found some stuff that should be safe to remove, based on
the fact that there are no references to these names anywhere in the rest
of the entire source tree.

I've built a kernel with this patch in it (as a double check) but have not
tested it on anything else.  I don't really care if it goes in or not, I'm
just providing it since I got misled slightly (in terms of how the UTF-16
en- and de-coding was to be done) when I was looking at the header.

(In case gmail eats the straight text patch below, it's here as an
attachment too.  I'd send from a better mail system but my regular home
FreeBSD system is still not quite up yet...)

(A more interesting question is: when can the old compat mount stuff go
away?)

Chris

commit 591612326e9c7ae2f12ad7d215a15cbefae0ff9a
Author: Chris Torek <chris.torek at gmail.com>
Date:   Thu Mar 19 19:30:02 2015 -0700

    msdosfs: mark unused compat-mount fields

    The magic number MSDOSFS_ARGSMAGIC, which used to distinguish
    "old" vs "new" msdosfs mount arguments, has not been used since
    2005; it should just go away now.

    Likewise, the local-to-Unicode table that changed at the same
    time is unused.

    Leave the space reserved in the old style mount arguments, though,
    since we still support the old mount call (via the cmount entry
    point).

diff --git a/sys/fs/msdosfs/msdosfsmount.h b/sys/fs/msdosfs/msdosfsmount.h
index 10ed95b..9446a3e 100644
--- a/sys/fs/msdosfs/msdosfsmount.h
+++ b/sys/fs/msdosfs/msdosfsmount.h
@@ -239,8 +239,8 @@ struct msdosfs_args {
        gid_t   gid;            /* gid that owns msdosfs files */
        mode_t  mask;           /* file mask to be applied for msdosfs
perms */
        int     flags;          /* see below */
-       int magic;              /* version number */
-       u_int16_t u2w[128];     /* Local->Unicode table */
+       int     unused1;        /* unused, was version number */
+       u_int16_t unused2[128]; /* no longer used, was Local->Unicode table
*/
        char    *cs_win;        /* Windows(Unicode) Charset */
        char    *cs_dos;        /* DOS Charset */
        char    *cs_local;      /* Local Charset */
@@ -264,6 +264,4 @@ struct msdosfs_args {
 #define        MSDOSFS_LARGEFS         0x10000000      /* perform fileno
mapping */
 #define        MSDOSFS_FSIMOD          0x01000000

-#define MSDOSFS_ARGSMAGIC      0xe4eff300
-
 #endif /* !_MSDOSFS_MSDOSFSMOUNT_H_ */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msdosfsmount.h.patch
Type: application/octet-stream
Size: 1517 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20150319/bb6e3dbb/attachment.obj>


More information about the freebsd-fs mailing list