[parted-devel] [PATCH] Exclude floppy from device scan

Jim Meyering jim at meyering.net
Wed Jan 4 19:47:31 UTC 2012


Phillip Susi wrote:
> Floppies can't be partitioned anyhow, and some people have
> misconfigured bios that thinks there is a floppy when there
> actually isn't, and trying to scan it causes hanging.
> ---
>  NEWS                   |    3 +++
>  libparted/arch/linux.c |    1 +
>  2 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index d85667a..7bcee96 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -43,6 +43,9 @@ GNU parted NEWS                                    -*- outline -*-
>    informs kernel about new partitions on partitionable MD RAID devices.
>
>  ** Changes in behavior
> +  Floppy drives will no longer be scanned on linux, as they can not be
> +  partitioned anyhow, and some users have misconfigured bios that claims
> +  to have a floppy when they don't, and scanning gets hung up.
>
>    parted: mkpart command has changed semantics with regard to specifying end
>    of the partition. If the end is specified using MiB, GiB, etc. unit, parted
> diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
> index 6693cd7..07fc97c 100644
> --- a/libparted/arch/linux.c
> +++ b/libparted/arch/linux.c
> @@ -2125,6 +2125,7 @@ _skip_entry (const char *name)
>  		{ "dm-",	sizeof ("dm-") - 1	},
>  		{ "loop",	sizeof ("loop") - 1	},
>  		{ "ram",	sizeof ("ram") - 1	},
> +		{ "fd",		sizeof ("fd") - 1	},

Thanks.
Adjusted log and NEWS:
(log to be more informative, and NEWS e.g., to make "cannot" one word
and to add an empty line after the heading)

>From b56370a71e69c9558a52413686954198ce9c20fd Mon Sep 17 00:00:00 2001
From: Phillip Susi <phillsusi at gmail.com>
Date: Wed, 4 Jan 2012 14:40:13 -0500
Subject: [PATCH] libparted: linux: exclude floppy from device scan

Floppies can't be partitioned anyhow, and some people have a
misconfigured BIOS that thinks there is a floppy when there
actually isn't, and trying to scan it causes hanging.
---
 NEWS                   |    4 ++++
 libparted/arch/linux.c |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/NEWS b/NEWS
index d85667a..58a5f89 100644
--- a/NEWS
+++ b/NEWS
@@ -44,6 +44,10 @@ GNU parted NEWS                                    -*- outline -*-

 ** Changes in behavior

+  Floppy drives are no longer scanned on linux: they cannot be partitioned
+  anyhow, and some users have a misconfigured BIOS that claims to have a
+  floppy when they don't, and scanning gets hung up.
+
   parted: mkpart command has changed semantics with regard to specifying end
   of the partition. If the end is specified using MiB, GiB, etc. unit, parted
   subtracts one sector from the specified value. With this change, it is now
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
index 6693cd7..07fc97c 100644
--- a/libparted/arch/linux.c
+++ b/libparted/arch/linux.c
@@ -2125,6 +2125,7 @@ _skip_entry (const char *name)
 		{ "dm-",	sizeof ("dm-") - 1	},
 		{ "loop",	sizeof ("loop") - 1	},
 		{ "ram",	sizeof ("ram") - 1	},
+		{ "fd",		sizeof ("fd") - 1	},
 		{ 0, 0 },
 	};

--
1.7.8.2.329.g04d73



More information about the parted-devel mailing list