Re: non-linux support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Set DEFAULT_DEVICE and ALTERNATE_DEVICE for GNU/Hurd and FreeBSD

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c
index 85470be..300518d 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.
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux