Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Mention the latest changes.
[rsync/rsync.git]
/
tls.c
diff --git
a/tls.c
b/tls.c
index
8c2a421
..
80d20c8
100644
(file)
--- a/
tls.c
+++ b/
tls.c
@@
-65,8
+65,14
@@
static void list_file(const char *fname)
struct tm *mt;
char datebuf[50];
char linkbuf[4096];
struct tm *mt;
char datebuf[50];
char linkbuf[4096];
-
- if (do_lstat(fname, &buf) == -1)
+ int ret;
+
+#if SUPPORT_LINKS
+ ret = do_lstat(fname, &buf);
+#else
+ ret = do_stat(fname, &buf);
+#endif
+ if (ret < 0)
failed("stat", fname);
/* The size of anything but a regular file is probably not
failed("stat", fname);
/* The size of anything but a regular file is probably not
@@
-113,7
+119,7
@@
static void list_file(const char *fname)
/* TODO: Perhaps escape special characters in fname? */
printf("%s ", permbuf);
/* TODO: Perhaps escape special characters in fname? */
printf("%s ", permbuf);
- if (
IS_DEVICE
(buf.st_mode)) {
+ if (
S_ISCHR(buf.st_mode) || S_ISBLK
(buf.st_mode)) {
printf("%5ld,%6ld",
(long)major(buf.st_rdev),
(long)minor(buf.st_rdev));
printf("%5ld,%6ld",
(long)major(buf.st_rdev),
(long)minor(buf.st_rdev));