summaryrefslogtreecommitdiffstats
path: root/fdisk/cfdisk.c
diff options
context:
space:
mode:
authorSamuel Thibault2007-12-18 03:00:45 +0100
committerKarel Zak2008-01-03 17:01:55 +0100
commit8a6018f5dd2c9e77ebc300c7b338e83b7eaa9a69 (patch)
tree4cfef5364dc625446fdfb0b2939b6af032f7de5d /fdisk/cfdisk.c
parentsetterm: remove unnecessaty ifndef TCGETS (diff)
downloadkernel-qcow2-util-linux-8a6018f5dd2c9e77ebc300c7b338e83b7eaa9a69.tar.gz
kernel-qcow2-util-linux-8a6018f5dd2c9e77ebc300c7b338e83b7eaa9a69.tar.xz
kernel-qcow2-util-linux-8a6018f5dd2c9e77ebc300c7b338e83b7eaa9a69.zip
cfdisk: define portable {DEFAULT,ALTERNATE}_DEVICE
Set DEFAULT_DEVICE and ALTERNATE_DEVICE for GNU/Hurd and FreeBSD Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'fdisk/cfdisk.c')
-rw-r--r--fdisk/cfdisk.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c
index 85470be70..9d32a1908 100644
--- a/fdisk/cfdisk.c
+++ b/fdisk/cfdisk.c
@@ -85,8 +85,16 @@
#include "common.h"
#include "gpt.h"
+#ifdef __GNU__
+#define DEFAULT_DEVICE "/dev/hd0"
+#define ALTERNATE_DEVICE "/dev/sd0"
+#elif defined(__FreeBSD__)
+#define DEFAULT_DEVICE "/dev/ad0"
+#define ALTERNATE_DEVICE "/dev/da0"
+#else
#define DEFAULT_DEVICE "/dev/hda"
#define ALTERNATE_DEVICE "/dev/sda"
+#endif
/* With K=1024 we have `binary' megabytes, gigabytes, etc.
Some misguided hackers like that.