From owner-svn-src-all@FreeBSD.ORG Wed Nov 14 19:10:51 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 35BAE2DA; Wed, 14 Nov 2012 19:10:51 +0000 (UTC) (envelope-from davide@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F42048FC13; Wed, 14 Nov 2012 19:10:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAEJAonm033372; Wed, 14 Nov 2012 19:10:50 GMT (envelope-from davide@svn.freebsd.org) Received: (from davide@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAEJAoMG033370; Wed, 14 Nov 2012 19:10:50 GMT (envelope-from davide@svn.freebsd.org) Message-Id: <201211141910.qAEJAoMG033370@svn.freebsd.org> From: Davide Italiano Date: Wed, 14 Nov 2012 19:10:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243038 - head/sys/fs/smbfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Nov 2012 19:10:51 -0000 Author: davide Date: Wed Nov 14 19:10:50 2012 New Revision: 243038 URL: http://svnweb.freebsd.org/changeset/base/243038 Log: Get rid of some old debug code. It provides checks similar to the one offered by RedZone so there's no need to keep it. Sponsored by: iXsystems inc. Modified: head/sys/fs/smbfs/smbfs_node.c head/sys/fs/smbfs/smbfs_vnops.c Modified: head/sys/fs/smbfs/smbfs_node.c ============================================================================== --- head/sys/fs/smbfs/smbfs_node.c Wed Nov 14 18:54:08 2012 (r243037) +++ head/sys/fs/smbfs/smbfs_node.c Wed Nov 14 19:10:50 2012 (r243038) @@ -70,18 +70,8 @@ smbfs_name_alloc(const u_char *name, int u_char *cp; nmlen++; -#ifdef SMBFS_NAME_DEBUG - cp = malloc(nmlen + 2 + sizeof(int), M_SMBNODENAME, M_WAITOK); - *(int*)cp = nmlen; - cp += sizeof(int); - cp[0] = 0xfc; - cp++; - bcopy(name, cp, nmlen - 1); - cp[nmlen] = 0xfe; -#else cp = malloc(nmlen, M_SMBNODENAME, M_WAITOK); bcopy(name, cp, nmlen - 1); -#endif cp[nmlen - 1] = 0; return cp; } @@ -89,26 +79,8 @@ smbfs_name_alloc(const u_char *name, int static void smbfs_name_free(u_char *name) { -#ifdef SMBFS_NAME_DEBUG - int nmlen, slen; - u_char *cp; - cp = name; - cp--; - if (*cp != 0xfc) - panic("First byte of name entry '%s' corrupted", name); - cp -= sizeof(int); - nmlen = *(int*)cp; - slen = strlen(name) + 1; - if (nmlen != slen) - panic("Name length mismatch: was %d, now %d name '%s'", - nmlen, slen, name); - if (name[nmlen] != 0xfe) - panic("Last byte of name entry '%s' corrupted\n", name); - free(cp, M_SMBNODENAME); -#else free(name, M_SMBNODENAME); -#endif } static int __inline Modified: head/sys/fs/smbfs/smbfs_vnops.c ============================================================================== --- head/sys/fs/smbfs/smbfs_vnops.c Wed Nov 14 18:54:08 2012 (r243037) +++ head/sys/fs/smbfs/smbfs_vnops.c Wed Nov 14 19:10:50 2012 (r243038) @@ -1135,18 +1135,6 @@ smbfs_lookup(ap) SMBFSERR("invalid '..'\n"); return EIO; } -#ifdef SMB_VNODE_DEBUG - { - char *cp, c; - - cp = name + nmlen; - c = *cp; - *cp = 0; - SMBVDEBUG("%d '%s' in '%s' id=d\n", nameiop, name, - VTOSMB(dvp)->n_name); - *cp = c; - } -#endif islastcn = flags & ISLASTCN; if (islastcn && (mp->mnt_flag & MNT_RDONLY) && (nameiop != LOOKUP)) return EROFS;