From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20187 invoked by alias); 25 Oct 2010 14:08:33 -0000 Received: (qmail 20170 invoked by uid 9657); 25 Oct 2010 14:08:33 -0000 Date: Mon, 25 Oct 2010 14:08:00 -0000 Message-ID: <20101025140833.20168.qmail@sourceware.org> From: wysochanski@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/lib/report properties.c properties.h Mailing-List: contact lvm2-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: lvm2-cvs-owner@sourceware.org X-SW-Source: 2010-10/txt/msg00082.txt.bz2 CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: wysochanski@sourceware.org 2010-10-25 14:08:32 Modified files: lib/report : properties.c properties.h Log message: Add 'is_integer' flag into internal lvm_property_type. Add 'is_integer' flag similar to 'is_string'. Suggested in review by Petr Rockai. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/properties.c.diff?cvsroot=lvm2&r1=1.21&r2=1.22 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/report/properties.h.diff?cvsroot=lvm2&r1=1.4&r2=1.5 --- LVM2/lib/report/properties.c 2010/10/21 18:51:16 1.21 +++ LVM2/lib/report/properties.c 2010/10/25 14:08:32 1.22 @@ -227,11 +227,11 @@ #define STR DM_REPORT_FIELD_TYPE_STRING #define NUM DM_REPORT_FIELD_TYPE_NUMBER #define FIELD(type, strct, sorttype, head, field, width, fn, id, desc, settable) \ - { type, #id, settable, sorttype == STR, { .integer = 0 }, _ ## id ## _get, _ ## id ## _set }, + { type, #id, settable, sorttype == STR, sorttype == NUM, { .integer = 0 }, _ ## id ## _get, _ ## id ## _set }, struct lvm_property_type _properties[] = { #include "columns.h" - { 0, "", 0, 0, { .integer = 0 }, _not_implemented_get, _not_implemented_set }, + { 0, "", 0, 0, 0, { .integer = 0 }, _not_implemented_get, _not_implemented_set }, }; #undef STR --- LVM2/lib/report/properties.h 2010/10/21 18:51:17 1.4 +++ LVM2/lib/report/properties.h 2010/10/25 14:08:32 1.5 @@ -24,6 +24,7 @@ const char *id; unsigned is_settable:1; unsigned is_string:1; + unsigned is_integer:1; union { char *string; uint64_t integer;