X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device-src%2Fproperty.c;h=2aff6db2a71d4bfb1071a921bdb813d539b8fc71;hb=HEAD;hp=275cc8088bf0871a2324945466e9fae6b2db9467;hpb=2627875b7d18858bc1f9f7652811e4d8c15a23eb;p=debian%2Famanda diff --git a/device-src/property.c b/device-src/property.c index 275cc80..2aff6db 100644 --- a/device-src/property.c +++ b/device-src/property.c @@ -1,21 +1,22 @@ /* - * Copyright (c) 2005-2008 Zmanda Inc. All Rights Reserved. - * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. - * - * This library is distributed in the hope that it will be useful, but + * Copyright (c) 2007-2012 Zmanda, Inc. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public - * License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. - * - * Contact information: Zmanda Inc., 465 S Mathlida Ave, Suite 300 - * Sunnyvale, CA 94086, USA, or: http://www.zmanda.com + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Contact information: Zmanda Inc., 465 S. Mathilda Ave., Suite 300 + * Sunnyvale, CA 94085, USA, or: http://www.zmanda.com */ #include "amanda.h" @@ -31,7 +32,7 @@ static const GEnumValue _concurrency_paradigm_values[] = { { CONCURRENCY_PARADIGM_EXCLUSIVE, "CONCURRENCY_PARADIGM_EXCLUSIVE", "exclusive" }, - { CONCURRENCY_PARADIGM_SHARED_READ, + { CONCURRENCY_PARADIGM_SHARED_READ, "CONCURRENCY_PARADIGM_SHARED_READ", "shared-read" }, { CONCURRENCY_PARADIGM_RANDOM_ACCESS, @@ -96,23 +97,6 @@ GType media_access_mode_get_type (void) { return type; } -/* Copy function for GBoxed QualifiedSize. */ -static gpointer qualified_size_copy(gpointer source) { - gpointer rval = g_new(QualifiedSize, 1); - memcpy(rval, source, sizeof(QualifiedSize)); - return rval; -} - -GType qualified_size_get_type (void) { - static GType type = 0; - if (G_UNLIKELY(type == 0)) { - type = g_boxed_type_register_static ("QualifiedSize", - qualified_size_copy, - free); - } - return type; -} - /****** * Property registration and lookup */ @@ -229,8 +213,8 @@ void device_property_init(void) { device_property_fill_and_register(&device_property_max_block_size, G_TYPE_UINT, "max_block_size", "Maximum supported blocking factor."); - device_property_fill_and_register(&device_property_read_buffer_size, - G_TYPE_UINT, "read_buffer_size", + device_property_fill_and_register(&device_property_read_block_size, + G_TYPE_UINT, "read_block_size", "Minimum size of a read for this device (maximum expected block size)"); device_property_fill_and_register(&device_property_appendable, G_TYPE_BOOLEAN, "appendable", @@ -245,15 +229,24 @@ void device_property_init(void) { device_property_fill_and_register(&device_property_partial_deletion, G_TYPE_BOOLEAN, "partial_deletion", "Does this device support recycling just part of a volume?" ); - device_property_fill_and_register(&device_property_free_space, - QUALIFIED_SIZE_TYPE, "free_space", - "Remaining capacity of the device."); + device_property_fill_and_register(&device_property_full_deletion, + G_TYPE_BOOLEAN, "full_deletion", + "Does this device support recycling the entire volume?" ); device_property_fill_and_register(&device_property_max_volume_usage, G_TYPE_UINT64, "max_volume_usage", "Artificial limit to data written to volume."); + device_property_fill_and_register(&device_property_enforce_max_volume_usage, + G_TYPE_BOOLEAN, "enforce_max_volume_usage", + "Does max_volume_usage enabled?"); device_property_fill_and_register(&device_property_verbose, G_TYPE_BOOLEAN, "verbose", "Should the device produce verbose output?"); + device_property_fill_and_register(&device_property_comment, + G_TYPE_STRING, "comment", + "User-specified comment for the device"); + device_property_fill_and_register(&device_property_leom, + G_TYPE_BOOLEAN, "leom", + "Does this device support LEOM?"); } DevicePropertyBase device_property_concurrency; @@ -263,11 +256,14 @@ DevicePropertyBase device_property_compression_rate; DevicePropertyBase device_property_block_size; DevicePropertyBase device_property_min_block_size; DevicePropertyBase device_property_max_block_size; -DevicePropertyBase device_property_read_buffer_size; +DevicePropertyBase device_property_read_block_size; DevicePropertyBase device_property_appendable; DevicePropertyBase device_property_canonical_name; DevicePropertyBase device_property_medium_access_type; DevicePropertyBase device_property_partial_deletion; -DevicePropertyBase device_property_free_space; +DevicePropertyBase device_property_full_deletion; DevicePropertyBase device_property_max_volume_usage; +DevicePropertyBase device_property_enforce_max_volume_usage; +DevicePropertyBase device_property_comment; +DevicePropertyBase device_property_leom; DevicePropertyBase device_property_verbose;