aboutsummaryrefslogtreecommitdiffstats
path: root/sbin/ggate
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2006-12-15 18:16:47 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2006-12-15 18:16:47 +0000
commit905cd66703e5823b2a4785bebd3e9a7357a984a5 (patch)
treecdc950b30aec3be03784a1141fede11fa9f892a0 /sbin/ggate
parent53cccb2d3b1db7bbc8ab9526594a451d9308a6f4 (diff)
downloadsrc-905cd66703e5823b2a4785bebd3e9a7357a984a5.tar.gz
src-905cd66703e5823b2a4785bebd3e9a7357a984a5.zip
Fix ggated for platforms with 64bit size_t. The DIOCGSECTORSIZE ioctl
returns u_int. Reported by: Javier Martín Rueda <jmrueda@diatel.upm.es> PR: amd64/91799 MFC after: 3 days
Notes
Notes: svn path=/head/; revision=165251
Diffstat (limited to 'sbin/ggate')
-rw-r--r--sbin/ggate/ggated/ggated.c2
-rw-r--r--sbin/ggate/shared/ggate.c4
-rw-r--r--sbin/ggate/shared/ggate.h2
3 files changed, 4 insertions, 4 deletions
diff --git a/sbin/ggate/ggated/ggated.c b/sbin/ggate/ggated/ggated.c
index 82d66e17ad35..b0dd2d2d8577 100644
--- a/sbin/ggate/ggated/ggated.c
+++ b/sbin/ggate/ggated/ggated.c
@@ -60,7 +60,7 @@
struct ggd_connection {
off_t c_mediasize;
- off_t c_sectorsize;
+ u_int c_sectorsize;
unsigned c_flags; /* flags (RO/RW) */
int c_diskfd;
int c_sendfd;
diff --git a/sbin/ggate/shared/ggate.c b/sbin/ggate/shared/ggate.c
index 510109238ac3..ff72a27e5bd1 100644
--- a/sbin/ggate/shared/ggate.c
+++ b/sbin/ggate/shared/ggate.c
@@ -149,10 +149,10 @@ g_gate_mediasize(int fd)
return (mediasize);
}
-size_t
+u_int
g_gate_sectorsize(int fd)
{
- size_t secsize;
+ u_int secsize;
struct stat sb;
if (fstat(fd, &sb) == -1)
diff --git a/sbin/ggate/shared/ggate.h b/sbin/ggate/shared/ggate.h
index acbdaaa07422..9a81b0fba5b9 100644
--- a/sbin/ggate/shared/ggate.h
+++ b/sbin/ggate/shared/ggate.h
@@ -98,7 +98,7 @@ void g_gate_log(int priority, const char *message, ...);
void g_gate_xvlog(const char *message, va_list ap);
void g_gate_xlog(const char *message, ...);
off_t g_gate_mediasize(int fd);
-size_t g_gate_sectorsize(int fd);
+u_int g_gate_sectorsize(int fd);
void g_gate_open_device(void);
void g_gate_close_device(void);
void g_gate_ioctl(unsigned long req, void *data);