public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Uzel <petr.uzel@suse.cz>
To: util-linux <util-linux@vger.kernel.org>
Cc: Russell Coker <russell@coker.com.au>
Subject: [PATCH 2/3] mkswap: allow creating swap on /dev/hd[ab]
Date: Sun, 13 May 2012 13:44:31 +0200	[thread overview]
Message-ID: <1336909472-12277-2-git-send-email-petr.uzel@suse.cz> (raw)
In-Reply-To: <1336909472-12277-1-git-send-email-petr.uzel@suse.cz>

Currently, mkswap does not allow swap to be created on /dev/hda and
/dev/hdb. There is no reason why /dev/hda and /dev/hdb should be treated
differently.

Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=491021
Cc: Russell Coker <russell@coker.com.au>
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
---
 disk-utils/mkswap.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c
index c7dedd7..dec34e1 100644
--- a/disk-utils/mkswap.c
+++ b/disk-utils/mkswap.c
@@ -596,13 +596,8 @@ main(int argc, char **argv) {
 		exit(EXIT_FAILURE);
 	}
 
-	/* Want a block device. Probably not /dev/hda or /dev/hdb. */
 	if (!S_ISBLK(statbuf.st_mode))
 		check=0;
-	else if (statbuf.st_rdev == 0x0300 || statbuf.st_rdev == 0x0340)
-		errx(EXIT_FAILURE, _("error: "
-			"will not try to make swapdevice on '%s'"),
-			device_name);
 	else if (is_mounted(device_name))
 		errx(EXIT_FAILURE, _("error: "
 			"%s is mounted; will not make swapspace."),
-- 
1.7.7


  reply	other threads:[~2012-05-13 11:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-13 11:44 [PATCH 1/3] mkswap: use is_mounted() instead of check_mount() Petr Uzel
2012-05-13 11:44 ` Petr Uzel [this message]
2012-05-13 13:38   ` [PATCH 2/3] mkswap: allow creating swap on /dev/hd[ab] Russell Coker
2012-05-15  9:23   ` Karel Zak
2012-05-13 11:44 ` [PATCH 3/3] mkswap: improve diagnostics message if the device is mounted Petr Uzel
2012-05-15  9:23   ` Karel Zak
2012-05-15  9:21 ` [PATCH 1/3] mkswap: use is_mounted() instead of check_mount() Karel Zak
2012-05-15  9:22 ` Karel Zak

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=1336909472-12277-2-git-send-email-petr.uzel@suse.cz \
    --to=petr.uzel@suse.cz \
    --cc=russell@coker.com.au \
    --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