diff options
Diffstat (limited to 'sysutils/mmc-utils/files')
-rw-r--r-- | sysutils/mmc-utils/files/patch-man_mmc.1 | 2 | ||||
-rw-r--r-- | sysutils/mmc-utils/files/patch-mmc.h | 14 | ||||
-rw-r--r-- | sysutils/mmc-utils/files/patch-mmc__cmds.c (renamed from sysutils/mmc-utils/files/patch-mmc_cmds.c) | 13 |
3 files changed, 17 insertions, 12 deletions
diff --git a/sysutils/mmc-utils/files/patch-man_mmc.1 b/sysutils/mmc-utils/files/patch-man_mmc.1 index 9e859a8c724d..421843e900a1 100644 --- a/sysutils/mmc-utils/files/patch-man_mmc.1 +++ b/sysutils/mmc-utils/files/patch-man_mmc.1 @@ -1,4 +1,4 @@ ---- man/mmc.1.orig 2017-01-25 19:03:34 UTC +--- man/mmc.1.orig 2018-02-26 22:10:51 UTC +++ man/mmc.1 @@ -30,21 +30,24 @@ This sets the eMMC to be write-protected Set the eMMC data sector size to 4KB by disabling emulation on diff --git a/sysutils/mmc-utils/files/patch-mmc.h b/sysutils/mmc-utils/files/patch-mmc.h index 1017e7cc82c0..06e2590edf25 100644 --- a/sysutils/mmc-utils/files/patch-mmc.h +++ b/sysutils/mmc-utils/files/patch-mmc.h @@ -1,11 +1,10 @@ ---- mmc.h.orig 2017-01-25 19:03:34 UTC +--- mmc.h.orig 2018-02-26 22:10:51 UTC +++ mmc.h -@@ -17,8 +17,22 @@ +@@ -17,10 +17,26 @@ * those modifications are Copyright (c) 2016 SanDisk Corp. */ +#if defined(__linux__) - #include <asm-generic/int-ll64.h> #include <linux/mmc/ioctl.h> +#elif defined(__FreeBSD__) +#include <dev/mmc/mmc_ioctl.h> @@ -20,6 +19,11 @@ +typedef int64_t __s64; +typedef uint64_t __u64; +#endif - #include <stdio.h> - #define CHECK(expr, msg, err_stmt) { if (expr) { fprintf(stderr, msg); err_stmt; } } ++#if 0 + /* From kernel linux/major.h */ + #define MMC_BLOCK_MAJOR 179 ++#endif + + /* From kernel linux/mmc/mmc.h */ + #define MMC_SWITCH 6 /* ac [31:0] See below R1b */ diff --git a/sysutils/mmc-utils/files/patch-mmc_cmds.c b/sysutils/mmc-utils/files/patch-mmc__cmds.c index 25d228a13bce..48b6de071de0 100644 --- a/sysutils/mmc-utils/files/patch-mmc_cmds.c +++ b/sysutils/mmc-utils/files/patch-mmc__cmds.c @@ -1,18 +1,19 @@ ---- mmc_cmds.c.orig 2017-01-25 19:03:34 UTC +--- mmc_cmds.c.orig 2018-02-26 22:10:51 UTC +++ mmc_cmds.c -@@ -32,7 +32,11 @@ +@@ -28,7 +28,12 @@ #include <errno.h> #include <stdint.h> #include <assert.h> +#if defined(__linux__) - #include <linux/fs.h> + #include <linux/fs.h> /* for BLKGETSIZE */ +#elif defined(__FreeBSD__) -+#include <sys/disk.h> ++#include <stddef.h> /* for offsetof() */ ++#include <sys/disk.h> /* for DIOCG{MEDIA,SECTOR}SIZE */ +#endif #include "mmc.h" #include "mmc_cmds.h" -@@ -120,8 +124,19 @@ static __u32 get_size_in_blks(int fd) +@@ -120,8 +125,19 @@ static __u32 get_size_in_blks(int fd) { int res; int size; @@ -32,7 +33,7 @@ if (res) { fprintf(stderr, "Error getting device size, errno: %d\n", errno); -@@ -1506,13 +1521,18 @@ int do_read_extcsd(int nargs, char **arg +@@ -1530,13 +1546,18 @@ int do_read_extcsd(int nargs, char **arg /* A441/A43: reserved [197] [195] [193] [190] [188] * [186] [184] [182] [180] [176] */ |