diff options
Diffstat (limited to 'usr/src/cmd/rmformat/rmf_misc.c')
| -rw-r--r-- | usr/src/cmd/rmformat/rmf_misc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/src/cmd/rmformat/rmf_misc.c b/usr/src/cmd/rmformat/rmf_misc.c index 77269cc028..4d9a9cc1ac 100644 --- a/usr/src/cmd/rmformat/rmf_misc.c +++ b/usr/src/cmd/rmformat/rmf_misc.c @@ -625,7 +625,7 @@ my_open(char *device_name, int32_t flags) PERROR("Could not stat"); return (-1); } - if (stat_buf.st_mode & S_IFDIR) { + if (S_ISDIR(stat_buf.st_mode)) { /* * Open the directory and look for the @@ -1499,7 +1499,7 @@ lookup_device(char *supplied, char *found) (char *)NULL); /* 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); @@ -1640,7 +1640,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) |
