more lp64 it's-a-sign! fixes
This commit is contained in:
parent
07b61426de
commit
5866121c7c
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: node.c,v 1.58 2009/05/20 14:08:21 pooka Exp $ */
|
||||
/* $NetBSD: node.c,v 1.59 2009/11/05 13:28:18 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006-2009 Antti Kantee. All Rights Reserved.
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: node.c,v 1.58 2009/05/20 14:08:21 pooka Exp $");
|
||||
__RCSID("$NetBSD: node.c,v 1.59 2009/11/05 13:28:18 pooka Exp $");
|
||||
#endif /* !lint */
|
||||
|
||||
#include <assert.h>
|
||||
@ -332,7 +332,8 @@ psshfs_node_readdir(struct puffs_usermount *pu, puffs_cookie_t opc,
|
||||
struct puffs_node *pn = opc;
|
||||
struct psshfs_node *psn = pn->pn_data;
|
||||
struct psshfs_dir *pd;
|
||||
int i, rv, set_readdir;
|
||||
size_t i;
|
||||
int rv, set_readdir;
|
||||
|
||||
restart:
|
||||
if (psn->stat & PSN_READDIR) {
|
||||
@ -580,7 +581,7 @@ psshfs_node_write(struct puffs_usermount *pu, puffs_cookie_t opc, uint8_t *buf,
|
||||
if (rv == 0)
|
||||
*resid = 0;
|
||||
|
||||
if (pn->pn_va.va_size < offset + writelen)
|
||||
if (pn->pn_va.va_size < (uint64_t)offset + writelen)
|
||||
pn->pn_va.va_size = offset + writelen;
|
||||
|
||||
out:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: psbuf.c,v 1.14 2009/05/20 14:08:21 pooka Exp $ */
|
||||
/* $NetBSD: psbuf.c,v 1.15 2009/11/05 13:28:20 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006-2009 Antti Kantee. All Rights Reserved.
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: psbuf.c,v 1.14 2009/05/20 14:08:21 pooka Exp $");
|
||||
__RCSID("$NetBSD: psbuf.c,v 1.15 2009/11/05 13:28:20 pooka Exp $");
|
||||
#endif /* !lint */
|
||||
|
||||
/*
|
||||
@ -261,11 +261,11 @@ psbuf_put_vattr(struct puffs_framebuf *pb, const struct vattr *va)
|
||||
uint32_t flags;
|
||||
flags = 0;
|
||||
|
||||
if (va->va_size != PUFFS_VNOVAL)
|
||||
if (va->va_size != (uint64_t)PUFFS_VNOVAL)
|
||||
flags |= SSH_FILEXFER_ATTR_SIZE;
|
||||
if (va->va_uid != PUFFS_VNOVAL)
|
||||
if (va->va_uid != (uid_t)PUFFS_VNOVAL)
|
||||
flags |= SSH_FILEXFER_ATTR_UIDGID;
|
||||
if (va->va_mode != PUFFS_VNOVAL)
|
||||
if (va->va_mode != (mode_t)PUFFS_VNOVAL)
|
||||
flags |= SSH_FILEXFER_ATTR_PERMISSIONS;
|
||||
|
||||
if (va->va_atime.tv_sec != PUFFS_VNOVAL)
|
||||
@ -418,7 +418,7 @@ static int emap[] = {
|
||||
EEXIST, /* FILE_ALREADY_EXISTS */
|
||||
ENODEV /* WRITE_PROTECT */
|
||||
};
|
||||
#define NERRORS (sizeof(emap) / sizeof(emap[0]))
|
||||
#define NERRORS ((int)(sizeof(emap) / sizeof(emap[0])))
|
||||
|
||||
static int
|
||||
sftperr_to_errno(int error)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: psshfs.h,v 1.37 2009/05/20 14:08:21 pooka Exp $ */
|
||||
/* $NetBSD: psshfs.h,v 1.38 2009/11/05 13:28:20 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006-2009 Antti Kantee. All Rights Reserved.
|
||||
@ -124,7 +124,7 @@ struct psshfs_node {
|
||||
int childcount;
|
||||
|
||||
int stat;
|
||||
int readcount;
|
||||
unsigned readcount;
|
||||
|
||||
time_t attrread;
|
||||
char *symlink;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: subr.c,v 1.46 2009/05/20 13:56:36 pooka Exp $ */
|
||||
/* $NetBSD: subr.c,v 1.47 2009/11/05 13:28:20 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Antti Kantee. All Rights Reserved.
|
||||
@ -27,7 +27,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: subr.c,v 1.46 2009/05/20 13:56:36 pooka Exp $");
|
||||
__RCSID("$NetBSD: subr.c,v 1.47 2009/11/05 13:28:20 pooka Exp $");
|
||||
#endif /* !lint */
|
||||
|
||||
#include <assert.h>
|
||||
@ -43,7 +43,7 @@ __RCSID("$NetBSD: subr.c,v 1.46 2009/05/20 13:56:36 pooka Exp $");
|
||||
static void
|
||||
freedircache(struct psshfs_dir *base, size_t count)
|
||||
{
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
free(base[i].entryname);
|
||||
@ -89,7 +89,7 @@ struct psshfs_dir *
|
||||
lookup(struct psshfs_dir *bdir, size_t ndir, const char *name)
|
||||
{
|
||||
struct psshfs_dir *test;
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < ndir; i++) {
|
||||
test = &bdir[i];
|
||||
@ -106,7 +106,7 @@ static struct psshfs_dir *
|
||||
lookup_by_entry(struct psshfs_dir *bdir, size_t ndir, struct puffs_node *entry)
|
||||
{
|
||||
struct psshfs_dir *test;
|
||||
int i;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < ndir; i++) {
|
||||
test = &bdir[i];
|
||||
@ -260,7 +260,8 @@ sftp_readdir(struct puffs_usermount *pu, struct psshfs_ctx *pctx,
|
||||
char *dhand = NULL;
|
||||
size_t nent;
|
||||
char *longname = NULL;
|
||||
int idx, rv;
|
||||
size_t idx;
|
||||
int rv;
|
||||
|
||||
assert(pn->pn_va.va_type == VDIR);
|
||||
idx = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sysctlfs.c,v 1.11 2009/05/28 10:07:06 njoly Exp $ */
|
||||
/* $NetBSD: sysctlfs.c,v 1.12 2009/11/05 13:28:20 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006, 2007 Antti Kantee. All Rights Reserved.
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#ifndef lint
|
||||
__RCSID("$NetBSD: sysctlfs.c,v 1.11 2009/05/28 10:07:06 njoly Exp $");
|
||||
__RCSID("$NetBSD: sysctlfs.c,v 1.12 2009/11/05 13:28:20 pooka Exp $");
|
||||
#endif /* !lint */
|
||||
|
||||
#include <sys/types.h>
|
||||
@ -627,7 +627,7 @@ sysctlfs_node_read(struct puffs_usermount *pu, void *opc, uint8_t *buf,
|
||||
return EISDIR;
|
||||
|
||||
doprint(sfs, &pn->pn_po, localbuf, sizeof(localbuf));
|
||||
if (strlen(localbuf) < offset)
|
||||
if ((ssize_t)strlen(localbuf) < offset)
|
||||
xfer = 0;
|
||||
else
|
||||
xfer = MIN(*resid, strlen(localbuf) - offset);
|
||||
|
Loading…
Reference in New Issue
Block a user