Deleted Added
full compact
utils.c (161608) utils.c (163049)
1/*-
2 * Copyright (c) 1991, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 19 unchanged lines hidden (view full) ---

28 */
29
30#ifndef lint
31#if 0
32static char sccsid[] = "@(#)utils.c 8.3 (Berkeley) 4/1/94";
33#endif
34#endif /* not lint */
35#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1991, 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 19 unchanged lines hidden (view full) ---

28 */
29
30#ifndef lint
31#if 0
32static char sccsid[] = "@(#)utils.c 8.3 (Berkeley) 4/1/94";
33#endif
34#endif /* not lint */
35#include <sys/cdefs.h>
36__FBSDID("$FreeBSD: head/bin/cp/utils.c 161608 2006-08-25 09:58:13Z ru $");
36__FBSDID("$FreeBSD: head/bin/cp/utils.c 163049 2006-10-06 08:30:33Z maxim $");
37
38#include <sys/types.h>
39#include <sys/acl.h>
40#include <sys/param.h>
41#include <sys/stat.h>
42#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
43#include <sys/mman.h>
44#endif

--- 14 unchanged lines hidden (view full) ---

59int
60copy_file(const FTSENT *entp, int dne)
61{
62 static char buf[MAXBSIZE];
63 struct stat *fs;
64 int ch, checkch, from_fd = 0, rcount, rval, to_fd = 0;
65 ssize_t wcount;
66 size_t wresid;
37
38#include <sys/types.h>
39#include <sys/acl.h>
40#include <sys/param.h>
41#include <sys/stat.h>
42#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
43#include <sys/mman.h>
44#endif

--- 14 unchanged lines hidden (view full) ---

59int
60copy_file(const FTSENT *entp, int dne)
61{
62 static char buf[MAXBSIZE];
63 struct stat *fs;
64 int ch, checkch, from_fd = 0, rcount, rval, to_fd = 0;
65 ssize_t wcount;
66 size_t wresid;
67 size_t wtotal;
67 off_t wtotal;
68 char *bufp;
69#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
70 char *p;
71#endif
72
73 if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) {
74 warn("%s", entp->fts_path);
75 return (1);

--- 358 unchanged lines hidden ---
68 char *bufp;
69#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
70 char *p;
71#endif
72
73 if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) {
74 warn("%s", entp->fts_path);
75 return (1);

--- 358 unchanged lines hidden ---