1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-16 07:58:04 +00:00

Update to mmc-utils as of 20180122 (no functional difference since 20170320).

This commit is contained in:
Marius Strobl 2018-03-04 19:08:00 +00:00
parent c603e1b0cf
commit 0bb5893564
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=463595
5 changed files with 23 additions and 19 deletions

View File

@ -2,9 +2,8 @@
# $FreeBSD$
PORTNAME= mmc-utils
PORTVERSION= 20170320
DISTVERSIONSUFFIX= -37c86e60
PORTREVISION= 1
PORTVERSION= 20180122
DISTVERSIONSUFFIX= -7bcad171
CATEGORIES= sysutils
MASTER_SITES= LOCAL/marius
@ -46,7 +45,7 @@ maintainer-fetch:
@git clone ${MMC_GITURL} ${WRKSRC}
@cd ${WRKSRC} && git reset --hard ${DISTVERSIONSUFFIX:S|^-||}
@${TAR} -cyf ${_DISTDIR:S|/$||}/${DISTFILES:M${PORTNAME}-*} \
-C ${WRKSRC}/.. --exclude .git .
-C ${WRKSRC}/.. --exclude .git* .
@${MAKE} makesum
@${MAKE} clean

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1490631682
SHA256 (mmc-utils-20170320-37c86e60.tar.bz2) = 45c28f61ac76b2f9bb7d7aaea14d9619133d2923fe9d5cb2c170581729b4c4ee
SIZE (mmc-utils-20170320-37c86e60.tar.bz2) = 40108
TIMESTAMP = 1519683051
SHA256 (mmc-utils-20180122-7bcad171.tar.bz2) = c2f0fe067217a844d31e3a24d015e335ce3b8dad7894d40ea66dafd6ae9904d4
SIZE (mmc-utils-20180122-7bcad171.tar.bz2) = 40028

View File

@ -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

View File

@ -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 */

View File

@ -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] */