diff options
| author | casper <none@none> | 2005-11-09 11:19:56 -0800 |
|---|---|---|
| committer | casper <none@none> | 2005-11-09 11:19:56 -0800 |
| commit | 4bc0a2ef2b7ba50a7a717e7ddbf31472ad28e358 (patch) | |
| tree | 8076ef765d7019096fce872c8359a5345dee3160 /usr/src/cmd/cdrw | |
| parent | 205d86ae4bc9e661871ff365f59324d8c9b0108a (diff) | |
| download | illumos-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/cdrw')
| -rw-r--r-- | usr/src/cmd/cdrw/device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/src/cmd/cdrw/device.c b/usr/src/cmd/cdrw/device.c index 0b25702544..208170f057 100644 --- a/usr/src/cmd/cdrw/device.c +++ b/usr/src/cmd/cdrw/device.c @@ -324,7 +324,7 @@ vol_name_to_dev_node(char *vname, char *found) free(p1); return (0); } - if (statbuf.st_mode & S_IFDIR) { + if (S_ISDIR(statbuf.st_mode)) { for (i = 0; i < 16; i++) { (void) snprintf(found, PATH_MAX, "%s/s%d", p1, i); if (access(found, F_OK) >= 0) @@ -383,7 +383,7 @@ lookup_device(char *supplied, char *found) char tmpstr[PATH_MAX]; /* If everything is fine and proper, no need to analyze */ - if ((stat(supplied, &statbuf) == 0) && (statbuf.st_mode & S_IFCHR) && + if ((stat(supplied, &statbuf) == 0) && S_ISCHR(statbuf.st_mode) && ((fd = open(supplied, O_RDONLY|O_NDELAY)) >= 0)) { (void) close(fd); (void) strlcpy(found, supplied, PATH_MAX); |
