diff options
author | Karel Zak | 2013-06-25 16:40:01 +0200 |
---|---|---|
committer | Karel Zak | 2013-09-16 16:47:04 +0200 |
commit | c10937dcaf58a03844ace4e081becb77fad71dac (patch) | |
tree | 0b20635eb295a2f0bc3afe6d0338b0ccec8f4d12 /fdisks/fdiskdoslabel.c | |
parent | fdisk: (dos) cleanup public function names (diff) | |
download | kernel-qcow2-util-linux-c10937dcaf58a03844ace4e081becb77fad71dac.tar.gz kernel-qcow2-util-linux-c10937dcaf58a03844ace4e081becb77fad71dac.tar.xz kernel-qcow2-util-linux-c10937dcaf58a03844ace4e081becb77fad71dac.zip |
fdisk: remove nowarn global variable
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisks/fdiskdoslabel.c')
-rw-r--r-- | fdisks/fdiskdoslabel.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fdisks/fdiskdoslabel.c b/fdisks/fdiskdoslabel.c index f17eb1ef7..934312b6c 100644 --- a/fdisks/fdiskdoslabel.c +++ b/fdisks/fdiskdoslabel.c @@ -1,18 +1,18 @@ /* - * Many, many hands. - * Specific DOS label file - Davidlohr Bueso <dave@gnu.org> + * + * Copyright (C) 2013 Karel Zak <kzak@redhat.com> + * + * This is re-written version for libfdisk, the original was fdiskdoslabel.c + * from util-linux fdisk. */ - -#include <unistd.h> -#include <ctype.h> - #include "c.h" #include "nls.h" #include "randutils.h" #include "common.h" #include "pt-mbr.h" -#include "fdisk.h" +#include "fdiskP.h" + #include "fdiskdoslabel.h" #define MAXIMUM_PARTS 60 @@ -147,7 +147,7 @@ static int is_cleared_partition(struct dos_partition *p) static void warn_alignment(struct fdisk_context *cxt) { - if (nowarn) + if (fdisk_context_listonly(cxt)) return; if (cxt->sector_size != cxt->phy_sector_size) @@ -269,7 +269,7 @@ static void dos_init(struct fdisk_context *cxt) warn_geometry(cxt); warn_alignment(cxt); - if (cxt->total_sectors > UINT_MAX && !nowarn) { + if (cxt->total_sectors > UINT_MAX && !fdisk_context_listonly(cxt)) { unsigned long long bytes = cxt->total_sectors * cxt->sector_size; int giga = bytes / 1000000000; int hectogiga = (giga + 50) / 100; |