Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/puffs more lp64 it's-a-sign! fixes



details:   https://anonhg.NetBSD.org/src/rev/cd0916af8870
branches:  trunk
changeset: 748787:cd0916af8870
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Nov 05 13:28:18 2009 +0000

description:
more lp64 it's-a-sign! fixes

diffstat:

 usr.sbin/puffs/mount_psshfs/node.c       |   9 +++++----
 usr.sbin/puffs/mount_psshfs/psbuf.c      |  12 ++++++------
 usr.sbin/puffs/mount_psshfs/psshfs.h     |   4 ++--
 usr.sbin/puffs/mount_psshfs/subr.c       |  13 +++++++------
 usr.sbin/puffs/mount_sysctlfs/sysctlfs.c |   6 +++---
 5 files changed, 23 insertions(+), 21 deletions(-)

diffs (179 lines):

diff -r 29ac19e84889 -r cd0916af8870 usr.sbin/puffs/mount_psshfs/node.c
--- a/usr.sbin/puffs/mount_psshfs/node.c        Thu Nov 05 13:26:02 2009 +0000
+++ b/usr.sbin/puffs/mount_psshfs/node.c        Thu Nov 05 13:28:18 2009 +0000
@@ -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 @@
        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 @@
        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:
diff -r 29ac19e84889 -r cd0916af8870 usr.sbin/puffs/mount_psshfs/psbuf.c
--- a/usr.sbin/puffs/mount_psshfs/psbuf.c       Thu Nov 05 13:26:02 2009 +0000
+++ b/usr.sbin/puffs/mount_psshfs/psbuf.c       Thu Nov 05 13:28:18 2009 +0000
@@ -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 @@
        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 @@
        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)
diff -r 29ac19e84889 -r cd0916af8870 usr.sbin/puffs/mount_psshfs/psshfs.h
--- a/usr.sbin/puffs/mount_psshfs/psshfs.h      Thu Nov 05 13:26:02 2009 +0000
+++ b/usr.sbin/puffs/mount_psshfs/psshfs.h      Thu Nov 05 13:28:18 2009 +0000
@@ -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 @@
        int childcount;
 
        int stat;
-       int readcount;
+       unsigned readcount;
 
        time_t attrread;
        char *symlink;
diff -r 29ac19e84889 -r cd0916af8870 usr.sbin/puffs/mount_psshfs/subr.c
--- a/usr.sbin/puffs/mount_psshfs/subr.c        Thu Nov 05 13:26:02 2009 +0000
+++ b/usr.sbin/puffs/mount_psshfs/subr.c        Thu Nov 05 13:28:18 2009 +0000
@@ -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 @@
 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 @@
 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 @@
 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 @@
        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;
diff -r 29ac19e84889 -r cd0916af8870 usr.sbin/puffs/mount_sysctlfs/sysctlfs.c
--- a/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c  Thu Nov 05 13:26:02 2009 +0000
+++ b/usr.sbin/puffs/mount_sysctlfs/sysctlfs.c  Thu Nov 05 13:28:18 2009 +0000
@@ -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 @@
                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);



Home | Main Index | Thread Index | Old Index