summaryrefslogtreecommitdiffstats
path: root/fdisks/fdisk.c
diff options
context:
space:
mode:
authorKarel Zak2013-06-25 16:40:01 +0200
committerKarel Zak2013-09-16 16:47:04 +0200
commitc10937dcaf58a03844ace4e081becb77fad71dac (patch)
tree0b20635eb295a2f0bc3afe6d0338b0ccec8f4d12 /fdisks/fdisk.c
parentfdisk: (dos) cleanup public function names (diff)
downloadkernel-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/fdisk.c')
-rw-r--r--fdisks/fdisk.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fdisks/fdisk.c b/fdisks/fdisk.c
index c7fe3b48f..1ac4dd9b7 100644
--- a/fdisks/fdisk.c
+++ b/fdisks/fdisk.c
@@ -47,8 +47,6 @@
# include <linux/blkpg.h>
#endif
-int nowarn = 0; /* no warnings for fdisk -l/-s */
-
static void __attribute__ ((__noreturn__)) usage(FILE *out)
{
fputs(USAGE_HEADER, out);
@@ -716,7 +714,7 @@ int main(int argc, char **argv)
" be used with one specified device\n"));
if (optl) {
- nowarn = 1;
+ fdisk_context_enable_listonly(cxt, 1);
if (argc > optind) {
int k;
for (k = optind; k < argc; k++)