diff options
author | Jim Meyering <jim@meyering.net> | 1993-10-13 22:30:38 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1993-10-13 22:30:38 +0000 |
commit | 20905f2c93b659dc8908044132b8336439d8e8ee (patch) | |
tree | a63d116534b33608178d8a3874b09c258df0b731 /src | |
parent | 7691d2fba0dcb802ab471f5c441c308452abf791 (diff) | |
download | coreutils-20905f2c93b659dc8908044132b8336439d8e8ee.tar.xz |
merge with 3.8.4e
Diffstat (limited to 'src')
-rw-r--r-- | src/cp.c | 5 | ||||
-rw-r--r-- | src/ls.c | 2 | ||||
-rw-r--r-- | src/mv.c | 3 | ||||
-rw-r--r-- | src/rm.c | 5 |
4 files changed, 9 insertions, 6 deletions
@@ -565,7 +565,8 @@ copy (src_path, dst_path, new_dst, device, ancestors) if (eaccess_stat (&dst_sb, W_OK) != 0) fprintf (stderr, "%s: overwrite `%s', overriding mode %04o? ", - program_name, dst_path, dst_sb.st_mode & 07777); + program_name, dst_path, + (unsigned int) (dst_sb.st_mode & 07777)); else fprintf (stderr, "%s: overwrite `%s'? ", program_name, dst_path); @@ -765,7 +766,7 @@ copy (src_path, dst_path, new_dst, device, ancestors) int link_size; link_val = (char *) alloca (PATH_MAX + 2); - link_size = readlink (src_path, link_val, sizeof (link_val) - 1); + link_size = readlink (src_path, link_val, PATH_MAX + 1); if (link_size < 0) { error (0, errno, "cannot read symbolic link `%s'", src_path); @@ -1094,7 +1094,7 @@ get_link_name (filename, f) linkbuf = (char *) alloca (PATH_MAX + 2); /* Some automounters give incorrect st_size for mount points. I can't think of a good workaround for it, though. */ - linksize = readlink (filename, linkbuf, sizeof (linkbuf) - 1); + linksize = readlink (filename, linkbuf, PATH_MAX + 1); if (linksize < 0) { error (0, errno, "%s", filename); @@ -280,7 +280,8 @@ do_move (source, dest) && eaccess_stat (&dest_stats, W_OK)) { fprintf (stderr, "%s: replace `%s', overriding mode %04o? ", - program_name, dest, dest_stats.st_mode & 07777); + program_name, dest, + (unsigned int) (dest_stats.st_mode & 07777)); if (!yesno ()) return 0; } @@ -238,7 +238,7 @@ remove_file (statp) program_name, S_ISDIR (statp->st_mode) ? "directory " : "", pathname, - statp->st_mode & 07777); + (unsigned int) (statp->st_mode & 07777)); if (!yesno ()) return 1; } @@ -284,7 +284,8 @@ remove_dir (statp) { fprintf (stderr, "%s: descend directory `%s', overriding mode %04o? ", - program_name, pathname, statp->st_mode & 07777); + program_name, pathname, + (unsigned int) (statp->st_mode & 07777)); if (!yesno ()) return 1; } |