=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rdist/client.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- src/usr.bin/rdist/client.c 2011/04/10 15:47:28 1.23 +++ src/usr.bin/rdist/client.c 2012/11/12 01:14:41 1.24 @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.23 2011/04/10 15:47:28 krw Exp $ */ +/* $OpenBSD: client.c,v 1.24 2012/11/12 01:14:41 guenther Exp $ */ /* * Copyright (c) 1983 Regents of the University of California. @@ -365,7 +365,7 @@ } ENCODE(elname, lname); ENCODE(ername, rname); - (void) sendcmd(C_RECVHARDLINK, "%o %s %s", + (void) sendcmd(C_RECVHARDLINK, "%lo %s %s", opts, elname, ername); return(response()); @@ -399,9 +399,9 @@ */ ENCODE(ername, rname); - (void) sendcmd(C_RECVREG, "%o %04o %lld %ld %ld %s %s %s", + (void) sendcmd(C_RECVREG, "%lo %04o %lld %lld %lld %s %s %s", opts, stb->st_mode & 07777, (long long) stb->st_size, - stb->st_mtime, stb->st_atime, + (long long)stb->st_mtime, (long long)stb->st_atime, user, group, ername); if (response() < 0) { (void) close(f); @@ -588,7 +588,7 @@ * Send recvdir command in recvit() format. */ ENCODE(ername, rname); - (void) sendcmd(C_RECVDIR, "%o %04o 0 0 0 %s %s %s", + (void) sendcmd(C_RECVDIR, "%lo %04o 0 0 0 %s %s %s", opts, stb->st_mode & 07777, user, group, ername); if (response() < 0) return(-1); @@ -597,7 +597,7 @@ * Don't descend into directory */ if (IS_ON(opts, DO_NODESCEND)) - return(0); + goto out; if (IS_ON(opts, DO_REMOVE)) if (rmchk(opts) > 0) @@ -653,7 +653,7 @@ u_char *s; char ername[MAXPATHLEN*4]; - debugmsg(DM_CALL, "sendlink(%s, %x, stb, %d)\n", rname, opts, destdir); + debugmsg(DM_CALL, "sendlink(%s, %lx, stb, %d)\n", rname, opts, destdir); if (stb->st_nlink > 1) { struct linkbuf *lp; @@ -666,9 +666,9 @@ * Gather and send basic link info */ ENCODE(ername, rname); - (void) sendcmd(C_RECVSYMLINK, "%o %04o %lld %ld %ld %s %s %s", + (void) sendcmd(C_RECVSYMLINK, "%lo %04o %lld %lld %lld %s %s %s", opts, stb->st_mode & 07777, (long long) stb->st_size, - stb->st_mtime, stb->st_atime, + (long long)stb->st_mtime, (long long)stb->st_atime, user, group, ername); if (response() < 0) return(-1); @@ -772,7 +772,7 @@ u_char *cp; char ername[MAXPATHLEN*4]; - debugmsg(DM_CALL, "update(%s, 0x%x, 0x%x)\n", rname, opts, statp); + debugmsg(DM_CALL, "update(%s, 0x%lx, %p)\n", rname, opts, statp); switch (statp->st_mode & S_IFMT) { case S_IFBLK: @@ -921,8 +921,8 @@ debugmsg(DM_MISC, "update(%s,) local mode %04o remote mode %04o\n", rname, lmode, rmode); - debugmsg(DM_MISC, "update(%s,) size %lld mtime %d owner '%s' grp '%s'" - "\n", rname, (long long) size, mtime, owner, group); + debugmsg(DM_MISC, "update(%s,) size %lld mtime %lld owner '%s' grp '%s'" + "\n", rname, (long long) size, (long long)mtime, owner, group); if (statp->st_mtime != mtime) { if (statp->st_mtime < mtime && IS_ON(opts, DO_YOUNGER)) { @@ -1048,7 +1048,7 @@ message(MT_CHANGE, "%s: change to perm %04o, owner %s, group %s", target, lmode, user, group); ENCODE(ername, rname); - (void) sendcmd(C_CHMOG, "%o %04o %s %s %s", + (void) sendcmd(C_CHMOG, "%lo %04o %s %s %s", opts, lmode, user, group, ername); (void) response(); } @@ -1141,7 +1141,7 @@ if (checkfilename(rname) != 0) return(-1); - debugmsg(DM_CALL, "sendit(%s, 0x%x) called\n", rname, opts); + debugmsg(DM_CALL, "sendit(%s, 0x%lx) called\n", rname, opts); if (except(target)) return(0); @@ -1153,7 +1153,7 @@ * Does rname need updating? */ u = update(rname, opts, &stb); - debugmsg(DM_MISC, "sendit(%s, 0x%x): update status of %s is %d\n", + debugmsg(DM_MISC, "sendit(%s, 0x%lx): update status of %s is %d\n", rname, opts, target, u); /* @@ -1218,7 +1218,7 @@ char ername[MAXPATHLEN*4]; debugmsg(DM_CALL, - "install(src=%s,dest=%s,ddir=%d,destdir=%d,opts=%d) start\n", + "install(src=%s,dest=%s,ddir=%d,destdir=%d,opts=%ld) start\n", (src?src:"NULL"), (dest?dest:"NULL"), ddir, destdir, opts); /* * Save source name @@ -1288,9 +1288,9 @@ */ ENCODE(ername, dest); if (ddir) - (void) sendcmd(C_DIRTARGET, "%o %s", opts, ername); + (void) sendcmd(C_DIRTARGET, "%lo %s", opts, ername); else - (void) sendcmd(C_TARGET, "%o %s", opts, ername); + (void) sendcmd(C_TARGET, "%lo %s", opts, ername); if (response() < 0) return(-1);