Browse Source

MFC: sbin/ggate/ggated/ggated.c 1.8,1.9

sbin/ggate/shared/ggate.c	1.7,1.8
	sbin/ggate/shared/ggate.h	1.4,1.5

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
tags/ggatessh-v1.0.0
pjd 18 years ago
parent
commit
52e792ee79
3 changed files with 4 additions and 4 deletions
  1. +1
    -1
      ggated/ggated.c
  2. +2
    -2
      shared/ggate.c
  3. +1
    -1
      shared/ggate.h

+ 1
- 1
ggated/ggated.c View File

@@ -60,7 +60,7 @@

struct ggd_connection {
off_t c_mediasize;
off_t c_sectorsize;
unsigned c_sectorsize;
unsigned c_flags; /* flags (RO/RW) */
int c_diskfd;
int c_sendfd;


+ 2
- 2
shared/ggate.c View File

@@ -149,10 +149,10 @@ g_gate_mediasize(int fd)
return (mediasize);
}

size_t
unsigned
g_gate_sectorsize(int fd)
{
size_t secsize;
unsigned secsize;
struct stat sb;

if (fstat(fd, &sb) == -1)


+ 1
- 1
shared/ggate.h View File

@@ -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);
unsigned 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);


Loading…
Cancel
Save