1/* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 5 unchanged lines hidden (view full) --- 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21/* |
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
23 * Use is subject to license terms. 24 */ 25 |
26/* 27 * Common name validation routines for ZFS. These routines are shared by the 28 * userland code as well as the ioctl() layer to ensure that we don't 29 * inadvertently expose a hole through direct ioctl()s that never gets tested. 30 * In userland, however, we want significantly more information about _why_ the 31 * name is invalid. In the kernel, we only care whether it's valid or not. 32 * Each routine therefore takes a 'namecheck_err_t' which describes exactly why 33 * the name failed to validate. --- 304 unchanged lines hidden (view full) --- 338 if (pool[0] == 'c' && (pool[1] >= '0' && pool[1] <= '9')) { 339 if (why) 340 *why = NAME_ERR_DISKLIKE; 341 return (-1); 342 } 343 344 return (0); 345} |