Date: Sun, 28 Jul 2013 17:24:23 +0000 (UTC) From: Cy Schubert <cy@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r323840 - in head/sysutils/hdrecover: . files Message-ID: <201307281724.r6SHONs5032752@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cy Date: Sun Jul 28 17:24:23 2013 New Revision: 323840 URL: http://svnweb.freebsd.org/changeset/ports/323840 Log: Update 0.4 --> 0.5. Modified: head/sysutils/hdrecover/Makefile head/sysutils/hdrecover/distinfo head/sysutils/hdrecover/files/patch-hdrecover.cpp Modified: head/sysutils/hdrecover/Makefile ============================================================================== --- head/sysutils/hdrecover/Makefile Sun Jul 28 16:58:31 2013 (r323839) +++ head/sysutils/hdrecover/Makefile Sun Jul 28 17:24:23 2013 (r323840) @@ -6,8 +6,7 @@ # PORTNAME= hdrecover -PORTVERSION= 0.4 -PORTREVISION= 1 +PORTVERSION= 0.5 CATEGORIES= sysutils MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} Modified: head/sysutils/hdrecover/distinfo ============================================================================== --- head/sysutils/hdrecover/distinfo Sun Jul 28 16:58:31 2013 (r323839) +++ head/sysutils/hdrecover/distinfo Sun Jul 28 17:24:23 2013 (r323840) @@ -1,2 +1,2 @@ -SHA256 (hdrecover-0.4.tar.gz) = 609a0755dbda744e3dc89bffd1c673fd5c370448aa43e426d90ff35faa74a20d -SIZE (hdrecover-0.4.tar.gz) = 85409 +SHA256 (hdrecover-0.5.tar.gz) = 5daa11caaa8c597778a4a7a76b022372ddb315a90c527405972a2380668ad3f8 +SIZE (hdrecover-0.5.tar.gz) = 86486 Modified: head/sysutils/hdrecover/files/patch-hdrecover.cpp ============================================================================== --- head/sysutils/hdrecover/files/patch-hdrecover.cpp Sun Jul 28 16:58:31 2013 (r323839) +++ head/sysutils/hdrecover/files/patch-hdrecover.cpp Sun Jul 28 17:24:23 2013 (r323840) @@ -1,6 +1,6 @@ ---- hdrecover.cpp.orig 2011-09-25 04:48:10.000000000 -0700 -+++ hdrecover.cpp 2012-06-29 16:02:39.000000000 -0700 -@@ -26,7 +26,11 @@ +--- hdrecover.cpp.orig 2013-07-27 04:37:04.000000000 -0700 ++++ hdrecover.cpp 2013-07-28 08:04:06.970389678 -0700 +@@ -26,12 +26,20 @@ #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> @@ -12,7 +12,63 @@ #include <errno.h> #include <string.h> #include <time.h> -@@ -260,7 +264,7 @@ + #include <sys/ioctl.h> ++#ifdef __FreeBSD_cc_version ++static int secsize = 0; /* the sensed sector size */ ++#else + #include <linux/fs.h> ++#endif + + int badblocks = 0; + int recovered = 0; +@@ -47,6 +55,34 @@ + + unsigned long long length = 0; + ++#ifdef __FreeBSD_cc_version ++static ssize_t ++get_sec_size() ++{ ++ ++#define MAX_SEC_SIZE 2048 /* maximum section size that is supported */ ++#define MIN_SEC_SIZE 512 /* the sector size to start sensing at */ ++ ++ char buf[MAX_SEC_SIZE]; ++ ++ lseek(fd, (0), 0); ++ if (secsize == 0) ++ for (secsize = MIN_SEC_SIZE; secsize <= MAX_SEC_SIZE; ++ secsize *= 2) { ++ /* try the read */ ++ int size = read(fd, buf, secsize); ++ if (size == secsize) ++ /* it worked so return */ ++ return secsize; ++ } ++ else ++ return read(fd, buf, secsize); ++ ++ /* we failed to read at any of the sizes */ ++ return -1; ++} ++#endif ++ + int correctsector(unsigned long long sectornum) + { + int ret = 0; +@@ -178,7 +214,11 @@ + return 1; + } + ++#ifdef __FreeBSD_cc_version ++ if ((phys_block_size = get_sec_size()) == -1) { ++#else + if (ioctl(fd, BLKPBSZGET, &phys_block_size) == -1) { ++#endif + printf("Failed to get physical block size of device\n"); + return 1; + } +@@ -268,7 +308,7 @@ sprintf(p, "%d seconds", remaining); } printf("Sector %Ld (%02d%%) ETR: %s\n",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307281724.r6SHONs5032752>