* [PATCH 1/2 V2] mke2fs: fix force option to create filesystem on mounted device
@ 2013-06-24 6:28 Kazuya Mio
2013-06-27 6:52 ` Zheng Liu
2013-06-27 9:05 ` Lukáš Czerner
0 siblings, 2 replies; 3+ messages in thread
From: Kazuya Mio @ 2013-06-24 6:28 UTC (permalink / raw)
To: Andreas Dilger, tytso; +Cc: linux-ext4
According to mke2fs man, we can create a filesystem on the mounted device
when -FF option is specified.
However, currently we have to specify -F option third to force mke2fs.
This patch fixes the problem.
Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com>
---
misc/util.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/misc/util.c b/misc/util.c
index 6c93e1c..40c8858 100644
--- a/misc/util.c
+++ b/misc/util.c
@@ -150,7 +150,7 @@ void check_mount(const char *device, int force, const char *type)
}
if (mount_flags & EXT2_MF_MOUNTED) {
fprintf(stderr, _("%s is mounted; "), device);
- if (force > 2) {
+ if (force >= 2) {
fputs(_("mke2fs forced anyway. Hope /etc/mtab is "
"incorrect.\n"), stderr);
return;
@@ -162,7 +162,7 @@ void check_mount(const char *device, int force, const char *type)
if (mount_flags & EXT2_MF_BUSY) {
fprintf(stderr, _("%s is apparently in use by the system; "),
device);
- if (force > 2) {
+ if (force >= 2) {
fputs(_("mke2fs forced anyway.\n"), stderr);
return;
}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2 V2] mke2fs: fix force option to create filesystem on mounted device
2013-06-24 6:28 [PATCH 1/2 V2] mke2fs: fix force option to create filesystem on mounted device Kazuya Mio
@ 2013-06-27 6:52 ` Zheng Liu
2013-06-27 9:05 ` Lukáš Czerner
1 sibling, 0 replies; 3+ messages in thread
From: Zheng Liu @ 2013-06-27 6:52 UTC (permalink / raw)
To: Kazuya Mio; +Cc: Andreas Dilger, tytso, linux-ext4
On Mon, Jun 24, 2013 at 03:28:59PM +0900, Kazuya Mio wrote:
> According to mke2fs man, we can create a filesystem on the mounted device
> when -FF option is specified.
> However, currently we have to specify -F option third to force mke2fs.
> This patch fixes the problem.
>
> Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com>
Reviewed-by: Zheng Liu <wenqing.lz@taobao.com>
- Zheng
> ---
> misc/util.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/misc/util.c b/misc/util.c
> index 6c93e1c..40c8858 100644
> --- a/misc/util.c
> +++ b/misc/util.c
> @@ -150,7 +150,7 @@ void check_mount(const char *device, int force, const char *type)
> }
> if (mount_flags & EXT2_MF_MOUNTED) {
> fprintf(stderr, _("%s is mounted; "), device);
> - if (force > 2) {
> + if (force >= 2) {
> fputs(_("mke2fs forced anyway. Hope /etc/mtab is "
> "incorrect.\n"), stderr);
> return;
> @@ -162,7 +162,7 @@ void check_mount(const char *device, int force, const char *type)
> if (mount_flags & EXT2_MF_BUSY) {
> fprintf(stderr, _("%s is apparently in use by the system; "),
> device);
> - if (force > 2) {
> + if (force >= 2) {
> fputs(_("mke2fs forced anyway.\n"), stderr);
> return;
> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2 V2] mke2fs: fix force option to create filesystem on mounted device
2013-06-24 6:28 [PATCH 1/2 V2] mke2fs: fix force option to create filesystem on mounted device Kazuya Mio
2013-06-27 6:52 ` Zheng Liu
@ 2013-06-27 9:05 ` Lukáš Czerner
1 sibling, 0 replies; 3+ messages in thread
From: Lukáš Czerner @ 2013-06-27 9:05 UTC (permalink / raw)
To: Kazuya Mio; +Cc: Andreas Dilger, tytso, linux-ext4
On Mon, 24 Jun 2013, Kazuya Mio wrote:
> Date: Mon, 24 Jun 2013 15:28:59 +0900
> From: Kazuya Mio <k-mio@sx.jp.nec.com>
> To: Andreas Dilger <adilger@dilger.ca>, tytso@mit.edu
> Cc: linux-ext4@vger.kernel.org
> Subject: [PATCH 1/2 V2] mke2fs: fix force option to create filesystem on
> mounted device
>
> According to mke2fs man, we can create a filesystem on the mounted device
> when -FF option is specified.
> However, currently we have to specify -F option third to force mke2fs.
Oh, you mean we have to specify -F option three times ? It took me
some time to understand. Please rephrase the description.
Otherwise the patch looks good.
Thanks!
-Lukas
> This patch fixes the problem.
>
> Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com>
> ---
> misc/util.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/misc/util.c b/misc/util.c
> index 6c93e1c..40c8858 100644
> --- a/misc/util.c
> +++ b/misc/util.c
> @@ -150,7 +150,7 @@ void check_mount(const char *device, int force, const char *type)
> }
> if (mount_flags & EXT2_MF_MOUNTED) {
> fprintf(stderr, _("%s is mounted; "), device);
> - if (force > 2) {
> + if (force >= 2) {
> fputs(_("mke2fs forced anyway. Hope /etc/mtab is "
> "incorrect.\n"), stderr);
> return;
> @@ -162,7 +162,7 @@ void check_mount(const char *device, int force, const char *type)
> if (mount_flags & EXT2_MF_BUSY) {
> fprintf(stderr, _("%s is apparently in use by the system; "),
> device);
> - if (force > 2) {
> + if (force >= 2) {
> fputs(_("mke2fs forced anyway.\n"), stderr);
> return;
> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-27 9:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-24 6:28 [PATCH 1/2 V2] mke2fs: fix force option to create filesystem on mounted device Kazuya Mio
2013-06-27 6:52 ` Zheng Liu
2013-06-27 9:05 ` Lukáš Czerner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox