- if ( (opt & OPT_x && stat(arg, &st) == 0) || (lstat(arg, &st) == 0) ) {
- if (opt & OPT_x) {
- if (S_ISBLK(st.st_mode)) {
- printf("%u:%u\n", major(st.st_rdev),
- minor(st.st_rdev));
- return EXIT_SUCCESS;
- } else {
- if (opt & OPT_q)
- bb_putchar('\n');
- else
- bb_error_msg("%s: not a block device", arg);
- }
- return EXIT_FAILURE;
- } else
- if (S_ISDIR(st.st_mode)) {
- dev_t st_dev = st.st_dev;
- ino_t st_ino = st.st_ino;
- char *p = xasprintf("%s/..", arg);
+ if (stat(p, &st) == 0) {
+ //int is_mnt = (st_dev != st.st_dev) || (st_dev == st.st_dev && st_ino == st.st_ino);
+ int is_not_mnt = (st_dev == st.st_dev) && (st_ino != st.st_ino);