All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 4/4] partx: don't treat empty partition table as error
@ 2011-12-05 20:02 Phillip Susi
  2011-12-08 13:29 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Phillip Susi @ 2011-12-05 20:02 UTC (permalink / raw)
  To: util-linux

If a partition table was detected, but it had no partitions
in it, a poorly worded error message was printed and further
action halted.  For partx -a, this gave an unnecessary error
and for partx -u, prevented update from removing all partitions.

Signed-off-by: Phillip Susi <psusi@cfl.rr.com>
---
 partx/partx.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/partx/partx.c b/partx/partx.c
index 50b0c20..f4f2db1 100644
--- a/partx/partx.c
+++ b/partx/partx.c
@@ -696,12 +696,6 @@ static blkid_partlist get_partlist(blkid_probe pr,
 		printf(_("%s: partition table type '%s' detected\n"),
 		       device, blkid_parttable_get_type(tab));
 
-	if (!blkid_partlist_numof_partitions(ls)) {
-		warnx(_("%s: %s partition table does not contains "
-			"usable partitions"), device,
-			blkid_parttable_get_type(tab));
-		return NULL;
-	}
 	return ls;
 }
 
-- 
1.7.5.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 4/4] partx: don't treat empty partition table as error
  2011-12-05 20:02 [PATCH 4/4] partx: don't treat empty partition table as error Phillip Susi
@ 2011-12-08 13:29 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2011-12-08 13:29 UTC (permalink / raw)
  To: Phillip Susi; +Cc: util-linux

On Mon, Dec 05, 2011 at 03:02:52PM -0500, Phillip Susi wrote:
> -	if (!blkid_partlist_numof_partitions(ls)) {
> -		warnx(_("%s: %s partition table does not contains "
> -			"usable partitions"), device,
> -			blkid_parttable_get_type(tab));
> -		return NULL;
> -	}

 I have replaced the warnign and return NULL with message printed in
 verbose mode only.

 Thanks!

    Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-08 13:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-05 20:02 [PATCH 4/4] partx: don't treat empty partition table as error Phillip Susi
2011-12-08 13:29 ` Karel Zak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.