Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/fs/hfs remove comments about needing to encode : since t...



details:   https://anonhg.NetBSD.org/src/rev/70f441b4b7f8
branches:  trunk
changeset: 761875:70f441b4b7f8
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Feb 10 03:30:29 2011 +0000

description:
remove comments about needing to encode : since the on disk format does
not allow them. Also fix reversed encoding in lookup. From Taylor R Campbell.

diffstat:

 sys/fs/hfs/hfs_vnops.c |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (39 lines):

diff -r a1ebe7a2441d -r 70f441b4b7f8 sys/fs/hfs/hfs_vnops.c
--- a/sys/fs/hfs/hfs_vnops.c    Thu Feb 10 02:28:20 2011 +0000
+++ b/sys/fs/hfs/hfs_vnops.c    Thu Feb 10 03:30:29 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hfs_vnops.c,v 1.21 2011/02/10 01:49:51 christos Exp $  */
+/*     $NetBSD: hfs_vnops.c,v 1.22 2011/02/10 03:30:29 christos Exp $  */
 
 /*-
  * Copyright (c) 2005, 2007 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hfs_vnops.c,v 1.21 2011/02/10 01:49:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hfs_vnops.c,v 1.22 2011/02/10 03:30:29 christos Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ipsec.h"
@@ -418,10 +418,9 @@
                    M_TEMP, M_WAITOK);
                len = utf8_to_utf16(unicn, cnp->cn_namelen,
                    cnp->cn_nameptr, cnp->cn_namelen, 0, NULL);
-               /* XXX: perhaps check for colons too, and encode them? */
                for (ni = 0; ni < len; ni++)
-                       if (unicn[ni] == (unichar_t)'/')
-                               unicn[ni] = (unichar_t)':';
+                       if (unicn[ni] == (unichar_t)':')
+                               unicn[ni] = (unichar_t)'/';
                /* XXX: check conversion errors? */
                if (hfslib_make_catalog_key(VTOH(vdp)->h_rec.u.cnid, len, unicn,
                    &key) == 0) {
@@ -932,7 +931,6 @@
                        /* XXX: how to handle name too long? */
                        continue;
                }
-               /* XXX: perhaps check for colons too, and encode them? */
                for (ni = 0; ni < namlen; ni++)
                        if (curent.d_name[ni] == '/')
                                curent.d_name[ni] = ':';



Home | Main Index | Thread Index | Old Index