dsl_prop.c (302408) | dsl_prop.c (305799) |
---|---|
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 --- 40 unchanged lines hidden (view full) --- 49 * have a default value that can be used as the initial 50 * value. 51 */ 52 if (prop == ZPROP_INVAL || 53 (zfs_prop_readonly(prop) && !zfs_prop_setonce(prop))) 54 return (SET_ERROR(ENOENT)); 55 56 if (zfs_prop_get_type(prop) == PROP_TYPE_STRING) { | 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 --- 40 unchanged lines hidden (view full) --- 49 * have a default value that can be used as the initial 50 * value. 51 */ 52 if (prop == ZPROP_INVAL || 53 (zfs_prop_readonly(prop) && !zfs_prop_setonce(prop))) 54 return (SET_ERROR(ENOENT)); 55 56 if (zfs_prop_get_type(prop) == PROP_TYPE_STRING) { |
57 if (zfs_prop_default_string(prop) == NULL) 58 return (SET_ERROR(ENOENT)); |
|
57 if (intsz != 1) 58 return (SET_ERROR(EOVERFLOW)); 59 (void) strncpy(buf, zfs_prop_default_string(prop), 60 numints); 61 } else { 62 if (intsz != 8 || numints < 1) 63 return (SET_ERROR(EOVERFLOW)); 64 --- 1141 unchanged lines hidden --- | 59 if (intsz != 1) 60 return (SET_ERROR(EOVERFLOW)); 61 (void) strncpy(buf, zfs_prop_default_string(prop), 62 numints); 63 } else { 64 if (intsz != 8 || numints < 1) 65 return (SET_ERROR(EOVERFLOW)); 66 --- 1141 unchanged lines hidden --- |