FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 11-26-2007, 02:27 PM
Guido Guenther
 
Default kpartx: on delete process partitions in reverse order

otherwise we try to remove the extended partition of MSDOS labels
(/dev/mapper/mpathX-part[1-4]) before the logical partition
/dev/mapper/mpathX-partY (Y>5) which fails.

Signed-Off-By: Guido Guenther <agx@sigxcpu.org>

diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
index 554f742..7098d65 100644
--- a/kpartx/kpartx.c
+++ b/kpartx/kpartx.c
@@ -391,7 +391,7 @@ main(int argc, char **argv){
break;

case DELETE:
- for (j = 0; j < n; j++) {
+ for (j = n-1; j >= 0; j--) {
if (safe_sprintf(partname, "%s%s%d",
mapname, delim, j+1)) {
fprintf(stderr, "partname too small
");

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 09:35 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org