[parted-devel] Bug: Removal of BLKPG causes regression of ability to manipulate disks with other partitions in use

Jim Meyering jim at meyering.net
Fri Mar 26 15:32:22 UTC 2010


Phillip Susi wrote:
> Attached are the two patches I have come up with. They are self
> described. I have already been asked by Colin Watson to clean it up a
> bit so the coding style conforms ot the surrounding code, which I will
> be doing tomorrow. Please let me know what you think about them.

Thanks for working on this.
This does seem to be the right thing to do.
I'll take a close look on Monday.

> I have done some preliminary testing both using parted and gparted

Oh!  Testing.
Glad you mentioned that.
Please keep careful notes about what you do to test,
and include them with your next iteration so others can
easily confirm or try to reproduce your results.

Of course, I would really prefer if you would write a test
script or two that could be added to the list of those run
when we do "make check", but if you merely outline the commands
you run (preferably mostly uses of parted, and minimal use of other
tools), I'll convert that into the tests we require.

Please reference in your commit log the SHA1 of the
commit you are mostly reverting.

I presume the comments about "style" refer to making the
code look more like what gnu indent would produce, like no space after
open-paren and none before close-paren.

Note that in your libparted/arch/linux.c patch,
the second hunk makes changes only in leading whitespace,
and those are unnecessary, so please undo that part:


         for (i = 1; i <= lpn; i++) {
-                rets[i - 1] = _blkpg_remove_partition (disk, i);
-                errnums[i - 1] = errno;
+		  rets[i - 1] = _blkpg_remove_partition (disk, i);
+		  errnums[i - 1] = errno;
         }



More information about the parted-devel mailing list