diff options
author | Petr Uzel | 2012-05-13 13:44:31 +0200 |
---|---|---|
committer | Karel Zak | 2012-05-15 11:19:53 +0200 |
commit | 95e1d8f3bad279c00cc87a388e383de3f3f3a3ca (patch) | |
tree | 1ad5034156f175defebf5017ae5d99c29d04dacf /disk-utils | |
parent | mkswap: use is_mounted() instead of check_mount() (diff) | |
download | kernel-qcow2-util-linux-95e1d8f3bad279c00cc87a388e383de3f3f3a3ca.tar.gz kernel-qcow2-util-linux-95e1d8f3bad279c00cc87a388e383de3f3f3a3ca.tar.xz kernel-qcow2-util-linux-95e1d8f3bad279c00cc87a388e383de3f3f3a3ca.zip |
mkswap: allow creating swap on /dev/hd[ab]
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>
Diffstat (limited to 'disk-utils')
-rw-r--r-- | 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 c7dedd7c2..dec34e1ae 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."), |