From nobody@FreeBSD.org  Mon Aug  1 14:33:42 2011
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 66505106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  1 Aug 2011 14:33:42 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 56A7E8FC15
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  1 Aug 2011 14:33:42 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p71EXggS094408
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 1 Aug 2011 14:33:42 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p71EXgBn094394;
	Mon, 1 Aug 2011 14:33:42 GMT
	(envelope-from nobody)
Message-Id: <201108011433.p71EXgBn094394@red.freebsd.org>
Date: Mon, 1 Aug 2011 14:33:42 GMT
From: Robert Millan <rmh@debian.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ZFS NAME_ERR_DISKLIKE check is Solaris-specific
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         159356
>Category:       kern
>Synopsis:       [zfs] [patch] ZFS NAME_ERR_DISKLIKE check is Solaris-specific
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-fs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 01 14:40:13 UTC 2011
>Closed-Date:    
>Last-Modified:  Fri Aug 05 01:33:30 UTC 2011
>Originator:     Robert Millan
>Release:        Debian GNU/kFreeBSD "sid"
>Organization:
>Environment:
>Description:
NAME_ERR_DISKLIKE check in sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c prevents creating ZFS pools with names that ressemble Solaris device names.

This has no use on FreeBSD and derivatives like Debian GNU/kFreeBSD, please consider #ifdef'ing this check out.

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

=== modified file 'sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c'
--- sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c	2011-08-01 14:27:09 +0000
+++ sys/cddl/contrib/opensolaris/common/zfs/zfs_namecheck.c	2011-08-01 14:29:26 +0000
@@ -335,11 +335,13 @@ pool_namecheck(const char *pool, nameche
 		return (-1);
 	}
 
+#ifdef __sun
 	if (pool[0] == 'c' && (pool[1] >= '0' && pool[1] <= '9')) {
 		if (why)
 			*why = NAME_ERR_DISKLIKE;
 		return (-1);
 	}
+#endif
 
 	return (0);
 }



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-fs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Aug 5 01:33:06 UTC 2011 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=159356 
>Unformatted:
