[Parted-commits] GNU Parted Official Repository: Changes to 'master'
Jim Meyering
meyering at alioth.debian.org
Tue Oct 16 08:15:38 UTC 2012
.gitignore | 1 +
NEWS | 3 +++
doc/C/partprobe.8 | 13 +++++++------
partprobe/partprobe.c | 24 ++++++++++++++++--------
4 files changed, 27 insertions(+), 14 deletions(-)
New commits:
commit 05917368a7867a17d6b2e0df16bf54239aa52107
Author: Petr Uzel <petr.uzel at suse.cz>
Date: Mon Oct 15 10:31:52 2012 +0200
partprobe: remove partitions when there is no partition table
When partprobe detects no partition table on a device, it should
tell the kernel to drop partitions on that device, but it did not.
* parted/partprobe.c (process_dev): When ped_disk_probe fails,
create a dummy (empty) partition table and use that.
* NEWS (Bug fixes): Mention it.
Addresses: https://bugzilla.novell.com/783419
diff --git a/NEWS b/NEWS
index 4c4716d..293f5e4 100644
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,9 @@ GNU parted NEWS -*- outline -*-
libparted: treat a disk with no pMBR as an msdos-labeled disk
even when it has valid GPT headers.
+ partprobe now tells the kernel to forget about any partitions
+ on a device that has no recognizable partition table.
+
** Changes in behavior
Added new Linux-specific partition GUID type code
diff --git a/partprobe/partprobe.c b/partprobe/partprobe.c
index b8dca5e..0919d3f 100644
--- a/partprobe/partprobe.c
+++ b/partprobe/partprobe.c
@@ -106,12 +106,23 @@ process_dev (PedDevice* dev)
PedDisk* disk;
disk_type = ped_disk_probe (dev);
- if (!disk_type || !strcmp (disk_type->name, "loop"))
+ if (disk_type && !strcmp (disk_type->name, "loop"))
return 1;
-
- disk = ped_disk_new (dev);
- if (!disk)
- goto error;
+ else if (!disk_type) {
+ /* Partition table not found, so create dummy,
+ empty one */
+ disk_type = ped_disk_type_get("msdos");
+ if (!disk_type)
+ goto error;
+
+ disk = ped_disk_new_fresh (dev, disk_type);
+ if (!disk)
+ goto error_destroy_disk;
+ } else {
+ disk = ped_disk_new (dev);
+ if (!disk)
+ goto error;
+ }
if (!opt_no_inform) {
if (!ped_disk_commit_to_os (disk))
goto error_destroy_disk;
commit aec4b5228d1536452b1816731c41d9b37de2a25c
Author: Petr Uzel <petr.uzel at suse.cz>
Date: Mon Oct 15 10:31:53 2012 +0200
doc: update partprobe manpage
* doc/C/partprobe.8: Add long options, REPORTING BUGS section
and adjust DESCRIPTION section because it wasn't quite correct.
diff --git a/doc/C/partprobe.8 b/doc/C/partprobe.8
index 6abf97d..48ae5dc 100644
--- a/doc/C/partprobe.8
+++ b/doc/C/partprobe.8
@@ -31,22 +31,23 @@ command.
.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
.\" respectively.
\fBpartprobe\fP is a program that informs the operating system kernel of
-partition table changes, by requesting that the operating system re-read
-the partition table.
+partition table changes.
.SH OPTIONS
This program uses short UNIX style options.
.TP
-.B \-d
+.B -d, --dry-run
Don't update the kernel.
.TP
-.B \-s
+.B -s, --summary
Show a summary of devices and their partitions.
.TP
-.B \-h
+.B -h, --help
Show summary of options.
.TP
-.B \-v
+.B -v, --version
Show version of program.
+.SH REPORTING BUGS
+Report bugs to <bug-parted at gnu.org>
.SH SEE ALSO
.BR parted (8).
.SH AUTHOR
commit baa2ebd111d4f8df66254bc94ee79aeaae2a3f3e
Author: Petr Uzel <petr.uzel at suse.cz>
Date: Mon Oct 15 10:31:54 2012 +0200
partprobe: remove --no-update long option
It was deprecated and scheduled for removal in 2009.
* partprobe/partprobe.c (long_options): Remove "no-update" entry.
diff --git a/partprobe/partprobe.c b/partprobe/partprobe.c
index 8bccc4f..b8dca5e 100644
--- a/partprobe/partprobe.c
+++ b/partprobe/partprobe.c
@@ -57,9 +57,6 @@
static struct option const long_options[] =
{
- /* Note: the --no-update option is deprecated, and deliberately
- * not documented. FIXME: remove --no-update in 2009. */
- {"no-update", no_argument, NULL, 'd'},
{"dry-run", no_argument, NULL, 'd'},
{"summary", no_argument, NULL, 's'},
{"help", no_argument, NULL, 'h'},
commit 6a535214131b25b0f90dfff618ef6cf8083bb390
Author: Petr Uzel <petr.uzel at suse.cz>
Date: Mon Oct 15 10:31:50 2012 +0200
build: .gitignore: ignore tests/fs-resize
diff --git a/.gitignore b/.gitignore
index 5bb95d4..c2ccd4b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -76,6 +76,7 @@ stamp-h1
tags
tests/dup-clobber
tests/duplicate
+tests/fs-resize
tests/help-version.log
tests/old-init.sh
tests/print-align
More information about the Parted-commits
mailing list