Changeset 1159
- Timestamp:
- 11/18/06 12:38:24 (6 years ago)
- Files:
-
- trunk/freewrt/tools/afdisk/Makefile (modified) (1 diff)
- trunk/freewrt/tools/afdisk/Makefile.freebsd (deleted)
- trunk/freewrt/tools/afdisk/afdisk.c.orig (deleted)
- trunk/freewrt/tools/afdisk/afdisk.conf.orig (deleted)
- trunk/freewrt/tools/afdisk/detect.c (modified) (1 diff)
- trunk/freewrt/tools/afdisk/partx86.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/freewrt/tools/afdisk/Makefile
r1157 r1159 4 4 # material, please see the LICENCE file in the top-level directory 5 5 # or at http://www.freewrt.org/licence for details. 6 7 PKG_NAME:= afdisk 8 PKG_VERSION:= 0.0.1 9 PKG_RELEASE:= 1 6 10 7 11 include $(TOPDIR)/rules.mk trunk/freewrt/tools/afdisk/detect.c
r1146 r1159 29 29 extern struct hdlist *detect(int *count) { 30 30 /* Possible devices. Currently tests for 8 ide and 4 scsi disks */ 31 #if def LINUX31 #if defined(__linux__) 32 32 char *pdevs[2][2] = { {"hd","abcdefgh"},{"sd","abcd"} }; 33 33 #endif 34 #if def FREEBSD34 #if defined(__FreeBSD__) 35 35 char *pdevs[2][2] = { {"ad","01234567"},{"da","0123"} }; 36 #endif 37 #if defined(__OpenBSD__) 38 char *pdevs[2][2] = { {"wd","01234567"},{"sd","0123"} }; 36 39 #endif 37 40 char *device; trunk/freewrt/tools/afdisk/partx86.c
r1146 r1159 28 28 29 29 /* Linux only */ 30 #if def LINUX30 #if defined(__linux__) 31 31 #include <linux/unistd.h> 32 32 #include <linux/fs.h> … … 34 34 #endif 35 35 36 /*FreeBSD only*/37 #if def FREEBSD36 /*FreeBSD/OpenBSD only*/ 37 #if defined(__FreeBSD__) || defined(__OpenBSD__) 38 38 #include <sys/disklabel.h> 39 39 #endif … … 68 68 69 69 /* Linux-specific, because lseek uses long as argument which is not sufficient for modern hds */ 70 #if def LINUX70 #if defined(__linux__) 71 71 static 72 72 _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, … … 81 81 #endif 82 82 83 #if def FREEBSD83 #if defined(__FreeBSD__) || defined(__OpenBSD__) 84 84 static int longseek(int fd, long long seek) { 85 85 return lseek(fd, seek, SEEK_SET); … … 88 88 89 89 /* Functions using Linux-specific ioctls */ 90 #if def LINUX90 #if defined(__linux__) 91 91 static long get_size(fd) { 92 92 long s; … … 111 111 112 112 /* The same functions with FreeBSD's ioctls */ 113 #if def FREEBSD113 #if defined(__FreeBSD__) || defined(__OpenBSD__) 114 114 static long get_size(fd) { 115 115 struct disklabel l;


