summaryrefslogtreecommitdiff
path: root/usr/src/cmd/tar/tar.c
diff options
context:
space:
mode:
authorcasper <none@none>2005-11-09 11:19:56 -0800
committercasper <none@none>2005-11-09 11:19:56 -0800
commit4bc0a2ef2b7ba50a7a717e7ddbf31472ad28e358 (patch)
tree8076ef765d7019096fce872c8359a5345dee3160 /usr/src/cmd/tar/tar.c
parent205d86ae4bc9e661871ff365f59324d8c9b0108a (diff)
downloadillumos-joyent-4bc0a2ef2b7ba50a7a717e7ddbf31472ad28e358.tar.gz
6346636 expunge readdir_r uses from Solaris
6346809 S_IFxxx is not a bitmask but our programmers don't know
Diffstat (limited to 'usr/src/cmd/tar/tar.c')
-rw-r--r--usr/src/cmd/tar/tar.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/src/cmd/tar/tar.c b/usr/src/cmd/tar/tar.c
index 66e60e225f..8fc42e7331 100644
--- a/usr/src/cmd/tar/tar.c
+++ b/usr/src/cmd/tar/tar.c
@@ -1615,7 +1615,7 @@ putfile(char *longname, char *shortname, char *parent,
*/
if ((split > NAMSIZ) ||
(split == NAMSIZ && strlen(shortname) < NAMSIZ) ||
- (split == NAMSIZ && (stbuf.st_mode & S_IFDIR) && !Pflag)) {
+ (split == NAMSIZ && S_ISDIR(stbuf.st_mode) && !Pflag)) {
/*
* Since path is limited to PRESIZ characters, look for the
* last slash within PRESIZ + 1 characters only.
@@ -1636,7 +1636,7 @@ putfile(char *longname, char *shortname, char *parent,
* If the filename is greater than NAMSIZ we can't
* archive the file unless we are using extended headers.
*/
- if ((i > NAMSIZ) || (i == NAMSIZ && (stbuf.st_mode & S_IFDIR) &&
+ if ((i > NAMSIZ) || (i == NAMSIZ && S_ISDIR(stbuf.st_mode) &&
!Pflag)) {
/* Determine which (filename or path) is too long. */
lastslash = strrchr(longname, '/');
@@ -1654,7 +1654,7 @@ putfile(char *longname, char *shortname, char *parent,
(void) strcpy(goodbuf, xhdr_dirname);
} else {
if ((i > NAMSIZ) || (i == NAMSIZ &&
- (stbuf.st_mode & S_IFDIR) && !Pflag))
+ S_ISDIR(stbuf.st_mode) && !Pflag))
(void) fprintf(stderr, gettext(
"tar: %s: filename is greater than "
"%d\n"), lastslash == NULL ?
@@ -5041,7 +5041,7 @@ istape(int fd, int type)
{
int result = 0;
- if (type & S_IFCHR) {
+ if (S_ISCHR(type)) {
struct mtget mtg;
if (ioctl(fd, MTIOCGET, &mtg) != -1) {