From c0ffbd19c694a05674973e3188852c919a48a1bc Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 11 Mar 2004 16:14:14 -0800 Subject: [PATCH] dm: list targets cmd From: Joe Thornber List targets ioctl. [Patrick Caulfield] --- include/linux/compat_ioctl.h | 1 + include/linux/device-mapper.h | 3 ++- include/linux/dm-ioctl.h | 19 +++++++++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) (limited to 'include/linux') diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index bfb63a040091..cd4c0c8d7ca5 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h @@ -134,6 +134,7 @@ COMPATIBLE_IOCTL(DM_TABLE_LOAD) COMPATIBLE_IOCTL(DM_TABLE_CLEAR) COMPATIBLE_IOCTL(DM_TABLE_DEPS) COMPATIBLE_IOCTL(DM_TABLE_STATUS) +COMPATIBLE_IOCTL(DM_LIST_VERSIONS) /* Big K */ COMPATIBLE_IOCTL(PIO_FONT) COMPATIBLE_IOCTL(GIO_FONT) diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index a9ecba77fb30..7abe54e3ee70 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h @@ -74,6 +74,7 @@ void dm_put_device(struct dm_target *ti, struct dm_dev *d); struct target_type { const char *name; struct module *module; + unsigned version[3]; dm_ctr_fn ctr; dm_dtr_fn dtr; dm_map_fn map; @@ -104,7 +105,7 @@ struct dm_target { sector_t split_io; /* - * These are automaticall filled in by + * These are automatically filled in by * dm_table_get_device. */ struct io_restrictions limits; diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index 74a8d14b885d..cd781d795f8d 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h @@ -162,6 +162,16 @@ struct dm_name_list { char name[0]; }; +/* + * Used to retrieve the target versions + */ +struct dm_target_versions { + uint32_t next; + uint32_t version[3]; + + char name[0]; +}; + /* * If you change this make sure you make the corresponding change * to dm-ioctl.c:lookup_ioctl() @@ -185,6 +195,9 @@ enum { DM_TABLE_CLEAR_CMD, DM_TABLE_DEPS_CMD, DM_TABLE_STATUS_CMD, + + /* Added later */ + DM_LIST_VERSIONS_CMD, }; #define DM_IOCTL 0xfd @@ -205,10 +218,12 @@ enum { #define DM_TABLE_DEPS _IOWR(DM_IOCTL, DM_TABLE_DEPS_CMD, struct dm_ioctl) #define DM_TABLE_STATUS _IOWR(DM_IOCTL, DM_TABLE_STATUS_CMD, struct dm_ioctl) +#define DM_LIST_VERSIONS _IOWR(DM_IOCTL, DM_LIST_VERSIONS_CMD, struct dm_ioctl) + #define DM_VERSION_MAJOR 4 -#define DM_VERSION_MINOR 0 +#define DM_VERSION_MINOR 1 #define DM_VERSION_PATCHLEVEL 0 -#define DM_VERSION_EXTRA "-ioctl (2003-06-04)" +#define DM_VERSION_EXTRA "-ioctl (2003-12-10)" /* Status bits */ #define DM_READONLY_FLAG (1 << 0) /* In/Out */ -- cgit v1.2.3