diff options
author | peter <peter@FreeBSD.org> | 2000-10-02 06:43:58 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2000-10-02 06:43:58 +0000 |
commit | a152a7ef82d848279559ecbca83c547e47aa8c9d (patch) | |
tree | ccd783be8562c7bf052885106d7a3efd32f7be0c /contrib/cvs/src/filesubr.c | |
parent | e0aa09eb3434450a9aec24a6f4b2694077991e45 (diff) | |
download | FreeBSD-src-a152a7ef82d848279559ecbca83c547e47aa8c9d.zip FreeBSD-src-a152a7ef82d848279559ecbca83c547e47aa8c9d.tar.gz |
Merge changes from 1.10.7 -> 1.11 into mainline. Note that the old
anoncvs no-password hack is gone and is replaced by the official version.
Diffstat (limited to 'contrib/cvs/src/filesubr.c')
-rw-r--r-- | contrib/cvs/src/filesubr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/cvs/src/filesubr.c b/contrib/cvs/src/filesubr.c index 7572558..2cccbcd 100644 --- a/contrib/cvs/src/filesubr.c +++ b/contrib/cvs/src/filesubr.c @@ -55,9 +55,13 @@ copy_file (from, to) if (isdevice (from)) { +#if defined(HAVE_MKNOD) && defined(HAVE_ST_RDEV) if (stat (from, &sb) < 0) error (1, errno, "cannot stat %s", from); mknod (to, sb.st_mode, sb.st_rdev); +#else + error (1, 0, "cannot copy device files on this system (%s)", from); +#endif } else { @@ -624,10 +628,15 @@ xcmp (file1, file2) numbers match. */ if (S_ISBLK (sb1.st_mode) || S_ISCHR (sb1.st_mode)) { +#ifdef HAVE_ST_RDEV if (sb1.st_rdev == sb2.st_rdev) return 0; else return 1; +#else + error (1, 0, "cannot compare device files on this system (%s and %s)", + file1, file2); +#endif } if ((fd1 = open (file1, O_RDONLY)) < 0) |