master - filters: move device_info_t definition to header
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=45db25817ff342a86b2ddf000b4b3a4d59be8848 Commit: 45db25817ff342a86b2ddf000b4b3a4d59be8848 Parent: 9161308252336491a107983ed16481e446853e26 Author: Alasdair G Kergon <[email protected]> AuthorDate: Thu Jul 26 12:22:55 2012 +0100 Committer: Alasdair G Kergon <[email protected]> CommitterDate: Thu Jul 26 12:22:55 2012 +0100
filters: move device_info_t definition to header
--- lib/filters/device-types.h | 5 +++++ lib/filters/filter.c | 9 ++------- 2 files changed, 7 insertions(+), 7 deletions(-)
lib/filters/device-types.h +5 -0
@@ -13,6 +13,11 @@* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +typedef struct { +const char name[15 ]; +const int8_t max_partitions; +}device_info_t ; +/* * Devices are only checked for partition tables if their minor number * is a multiple of the number corresponding to their type below
lib/filters/filter.c +2 -7
@@ -27,6 +27,8 @@#include <fcntl.h> #include <limits.h> +#include "device-types.h" +#define NUMBER_OF_MAJORS 4096#define PARTITION_SCSI_DEVICE (1 << 0)
@@ -35,13 +37,6 @@ static struct {int flags; } _partitions[NUMBER_OF_MAJORS ]; -typedef struct { -const char name[15 ]; -const int8_t max_partitions; -}device_info_t ; - -#include "device-types.h" -static int _md_major =-1 ;static int _blkext_major =-1 ;static int _drbd_major =-1 ;