Module Name: src Committed By: christos Date: Thu Feb 10 03:30:30 UTC 2011
Modified Files: src/sys/fs/hfs: hfs_vnops.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/fs/hfs/hfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/fs/hfs/hfs_vnops.c diff -u src/sys/fs/hfs/hfs_vnops.c:1.21 src/sys/fs/hfs/hfs_vnops.c:1.22 --- src/sys/fs/hfs/hfs_vnops.c:1.21 Wed Feb 9 20:49:51 2011 +++ src/sys/fs/hfs/hfs_vnops.c Wed Feb 9 22:30:29 2011 @@ -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] = ':';