From: Davidlohr Bueso <dave@gnu.org>
To: Karel Zak <kzak@redhat.com>, Petr Uzel <petr.uzel@suse.cz>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: [PATCH 3/5] fdisk: remove user specified sector size global variable
Date: Sun, 03 Jun 2012 20:15:27 +0200 [thread overview]
Message-ID: <1338747327.2864.12.camel@offbook> (raw)
>From cbd1e6486580b86aaca9345adaf6da69aeb0b1b4 Mon Sep 17 00:00:00 2001
From: Davidlohr Bueso <dave@gnu.org>
Date: Sun, 3 Jun 2012 19:47:44 +0200
Subject:
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
fdisk/fdisk.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index 654d8f3..d8ef14f 100644
--- a/fdisk/fdisk.c
+++ b/fdisk/fdisk.c
@@ -141,7 +141,6 @@ sector_t sector_offset = 1, sectors;
unsigned int heads,
cylinders,
- user_set_sector_size = 0,
units_per_sector = 1,
display_in_cyl_units = 0;
@@ -2061,7 +2060,6 @@ int main(int argc, char **argv)
sector_size != 2048 && sector_size != 4096)
usage(stderr);
sector_offset = 2;
- user_set_sector_size = 1;
break;
case 'C':
user_cylinders = strtou32_or_err(optarg, _("invalid cylinders argument"));
@@ -2110,7 +2108,7 @@ int main(int argc, char **argv)
fdisk_init_debug(0);
- if (user_set_sector_size && argc-optind != 1)
+ if (sector_size && argc-optind != 1)
printf(_("Warning: the -b (set sector size) option should"
" be used with one specified device\n"));
@@ -2146,7 +2144,7 @@ int main(int argc, char **argv)
cxt = fdisk_new_context_from_filename(argv[optind], 0);
if (!cxt)
err(EXIT_FAILURE, _("unable to open %s"), argv[optind]);
- if (user_set_sector_size) /* passed -b option, override autodiscovery */
+ if (sector_size) /* passed -b option, override autodiscovery */
cxt->phy_sector_size = cxt->sector_size = sector_size;
}
else
--
1.7.4.1
reply other threads:[~2012-06-03 18:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1338747327.2864.12.camel@offbook \
--to=dave@gnu.org \
--cc=kzak@redhat.com \
--cc=petr.uzel@suse.cz \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox