svn commit: r378034 - head/net/vblade/files
Max Khon
fjoe at FreeBSD.org
Wed Jan 28 01:30:58 UTC 2015
Author: fjoe
Date: Wed Jan 28 01:30:57 2015
New Revision: 378034
URL: https://svnweb.freebsd.org/changeset/ports/378034
QAT: https://qat.redports.org/buildarchive/r378034/
Log:
Unbreak on -CURRENT: Use DIOCGMEDIASIZE instead of DIOCGDINFO.
Added:
head/net/vblade/files/patch-freebsd.c (contents, props changed)
Added: head/net/vblade/files/patch-freebsd.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/vblade/files/patch-freebsd.c Wed Jan 28 01:30:57 2015 (r378034)
@@ -0,0 +1,29 @@
+--- freebsd.c.orig 2015-01-28 07:26:22.000000000 +0600
++++ freebsd.c 2015-01-28 07:29:23.000000000 +0600
+@@ -25,7 +25,7 @@
+ #include <sys/types.h>
+ #include <net/if.h>
+ #include <sys/stat.h>
+-#include <sys/disklabel.h>
++#include <sys/disk.h>
+ #include <sys/select.h>
+ #include <sys/sysctl.h>
+
+@@ -267,14 +267,14 @@
+ vlong
+ getsize(int fd)
+ {
++ off_t media_size;
+ vlong size;
+ struct stat s;
+ int n;
+- struct disklabel lab;
+
+ // Try getting disklabel from block dev
+- if ((n = ioctl(fd, DIOCGDINFO, lab)) != -1) {
+- size = lab.d_secsize * lab.d_secperunit;
++ if ((n = ioctl(fd, DIOCGMEDIASIZE, &media_size)) != -1) {
++ size = media_size;
+ } else {
+ // must not be a block special dev
+ if (fstat(fd, &s) == -1) {
More information about the svn-ports-all
mailing list