summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'toolbox/newfs_msdos.c')
-rw-r--r--toolbox/newfs_msdos.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/toolbox/newfs_msdos.c b/toolbox/newfs_msdos.c
index d7047e2c4..5fc8b0242 100644
--- a/toolbox/newfs_msdos.c
+++ b/toolbox/newfs_msdos.c
@@ -32,15 +32,17 @@ static const char rcsid[] =
32 32
33#include <sys/param.h> 33#include <sys/param.h>
34 34
35#ifndef ANDROID 35#ifdef __APPLE__
36#elif defined(ANDROID)
37#include <linux/fs.h>
38#include <linux/hdreg.h>
39#include <stdarg.h>
40#include <sys/ioctl.h>
41#else
36#include <sys/fdcio.h> 42#include <sys/fdcio.h>
37#include <sys/disk.h> 43#include <sys/disk.h>
38#include <sys/disklabel.h> 44#include <sys/disklabel.h>
39#include <sys/mount.h> 45#include <sys/mount.h>
40#else
41#include <stdarg.h>
42#include <linux/fs.h>
43#include <linux/hdreg.h>
44#endif 46#endif
45 47
46#include <sys/stat.h> 48#include <sys/stat.h>
@@ -58,6 +60,10 @@ static const char rcsid[] =
58#include <time.h> 60#include <time.h>
59#include <unistd.h> 61#include <unistd.h>
60 62
63#ifndef __unused
64#define __unused __attribute__((__unused__))
65#endif
66
61#define MAXU16 0xffff /* maximum unsigned 16-bit quantity */ 67#define MAXU16 0xffff /* maximum unsigned 16-bit quantity */
62#define BPN 4 /* bits per nibble */ 68#define BPN 4 /* bits per nibble */
63#define NPB 2 /* nibbles per byte */ 69#define NPB 2 /* nibbles per byte */
@@ -794,7 +800,10 @@ static void getstdfmt(const char *fmt, struct bpb *bpb)
794 * Get disk slice, partition, and geometry information. 800 * Get disk slice, partition, and geometry information.
795 */ 801 */
796 802
797#ifdef ANDROID 803#ifdef __APPLE__
804static void getdiskinfo(__unused int fd, __unused const char* fname, __unused const char* dtype,
805 __unused int oflag, __unused struct bpb* bpb) {}
806#elif ANDROID
798static void getdiskinfo(int fd, const char *fname, const char *dtype, 807static void getdiskinfo(int fd, const char *fname, const char *dtype,
799 __unused int oflag,struct bpb *bpb) 808 __unused int oflag,struct bpb *bpb)
800{ 809{