diff options
Diffstat (limited to 'coreutils')
| -rw-r--r-- | coreutils/ls.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/coreutils/ls.c b/coreutils/ls.c index 5fc60a347..a87f0ec2d 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c | |||
| @@ -61,6 +61,7 @@ enum { | |||
| 61 | #include <signal.h> | 61 | #include <signal.h> |
| 62 | #include <termios.h> | 62 | #include <termios.h> |
| 63 | #include <sys/ioctl.h> | 63 | #include <sys/ioctl.h> |
| 64 | #include <sys/sysmacros.h> /* major() and minor() */ | ||
| 64 | #include "busybox.h" | 65 | #include "busybox.h" |
| 65 | #ifdef CONFIG_SELINUX | 66 | #ifdef CONFIG_SELINUX |
| 66 | #include <fs_secure.h> | 67 | #include <fs_secure.h> |
| @@ -72,11 +73,6 @@ enum { | |||
| 72 | #include <time.h> | 73 | #include <time.h> |
| 73 | #endif | 74 | #endif |
| 74 | 75 | ||
| 75 | #ifndef MAJOR | ||
| 76 | #define MAJOR(dev) (((dev)>>8)&0xff) | ||
| 77 | #define MINOR(dev) ((dev)&0xff) | ||
| 78 | #endif | ||
| 79 | |||
| 80 | /* what is the overall style of the listing */ | 76 | /* what is the overall style of the listing */ |
| 81 | #define STYLE_AUTO (0) | 77 | #define STYLE_AUTO (0) |
| 82 | #define STYLE_COLUMNS (1U<<21) /* fill columns */ | 78 | #define STYLE_COLUMNS (1U<<21) /* fill columns */ |
| @@ -700,8 +696,8 @@ static int list_single(struct dnode *dn) | |||
| 700 | case LIST_SIZE: | 696 | case LIST_SIZE: |
| 701 | case LIST_DEV: | 697 | case LIST_DEV: |
| 702 | if (S_ISBLK(dn->dstat.st_mode) || S_ISCHR(dn->dstat.st_mode)) { | 698 | if (S_ISBLK(dn->dstat.st_mode) || S_ISCHR(dn->dstat.st_mode)) { |
| 703 | column += printf("%4d, %3d ", (int) MAJOR(dn->dstat.st_rdev), | 699 | column += printf("%4d, %3d ", (int) major(dn->dstat.st_rdev), |
| 704 | (int) MINOR(dn->dstat.st_rdev)); | 700 | (int) minor(dn->dstat.st_rdev)); |
| 705 | } else { | 701 | } else { |
| 706 | #ifdef CONFIG_FEATURE_HUMAN_READABLE | 702 | #ifdef CONFIG_FEATURE_HUMAN_READABLE |
| 707 | if (all_fmt & LS_DISP_HR) { | 703 | if (all_fmt & LS_DISP_HR) { |
