@@ -542,32 +542,3 @@ dm_remove_partmaps (char * mapname, char *uuid, int verbose)
struct remove_data rd = { verbose };
return do_foreach_partmaps(mapname, uuid, remove_partmap, &rd);
}
-
-#define FEATURE_NO_PART "no_partitions"
-
-int
-dm_no_partitions(char *mapname)
-{
- char params[PARAMS_SIZE], *ptr;
- int i, num_features;
-
- if (dm_get_map(mapname, params))
- return 0;
-
- ptr = params;
- num_features = strtoul(params, &ptr, 10);
- if ((ptr == params) || num_features == 0) {
- /* No features found, return success */
- return 0;
- }
- for (i = 0; (i < num_features); i++) {
- if (!ptr || ptr > params + strlen(params))
- break;
- /* Skip whitespaces */
- while(ptr && *ptr == ' ') ptr++;
- if (!strncmp(ptr, FEATURE_NO_PART, strlen(FEATURE_NO_PART)))
- return 1;
- ptr = strchr(ptr, ' ');
- }
- return 0;
-}
@@ -362,11 +362,6 @@ main(int argc, char **argv){
if (!mapname)
mapname = device + off;
- if (!force_devmap &&
- dm_no_partitions(mapname)) {
- /* Feature 'no_partitions' is set, return */
- return 0;
- }
if (delim == NULL) {
delim = malloc(DELIM_SIZE);
The kernel does not support the "no_partitions" feature - remove it. Distributions who want to keep support for this feature should re-enable it with a distro-specific patch. Signed-off-by: Martin Wilck <mwilck@suse.com> --- kpartx/devmapper.c | 29 ----------------------------- kpartx/kpartx.c | 5 ----- 2 files changed, 34 deletions(-)