]> err.no Git - util-linux/commitdiff
cfdisk: define portable {DEFAULT,ALTERNATE}_DEVICE
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 18 Dec 2007 02:00:45 +0000 (02:00 +0000)
committerKarel Zak <kzak@redhat.com>
Thu, 3 Jan 2008 16:01:55 +0000 (17:01 +0100)
Set DEFAULT_DEVICE and ALTERNATE_DEVICE for GNU/Hurd and FreeBSD

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
fdisk/cfdisk.c

index 85470be70f0c5da070acb5f573073dbaa50b037d..9d32a1908d52404b41a8e20bfc76167b5cf67da9 100644 (file)
 #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.