summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1995-12-30 18:15:30 +0000
committerjoerg <joerg@FreeBSD.org>1995-12-30 18:15:30 +0000
commit15748830d0fcd29294a1969a1012655e74908c1e (patch)
tree2efe7e92c24ac0b50754afdca0f462a77e0af208 /bin
parent90efd6ee2fcf8d47b9aa0ccc86adbf49b80c0cbe (diff)
downloadFreeBSD-src-15748830d0fcd29294a1969a1012655e74908c1e.zip
FreeBSD-src-15748830d0fcd29294a1969a1012655e74908c1e.tar.gz
Print dev minor #'s > 255 in hex.
Reviewed by: jkh, kuku, phk
Diffstat (limited to 'bin')
-rw-r--r--bin/ls/print.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c
index 96ed41d..42bddd1 100644
--- a/bin/ls/print.c
+++ b/bin/ls/print.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: print.c,v 1.5 1995/08/07 19:17:35 wollman Exp $
+ * $Id: print.c,v 1.6 1995/08/08 00:03:04 ache Exp $
*/
#ifndef lint
@@ -108,8 +108,12 @@ printlong(dp)
if (f_flags)
(void)printf("%-*s ", dp->s_flags, np->flags);
if (S_ISCHR(sp->st_mode) || S_ISBLK(sp->st_mode))
- (void)printf("%3d, %3d ",
- major(sp->st_rdev), minor(sp->st_rdev));
+ if (minor(sp->st_rdev) > 255)
+ (void)printf("%3d, 0x%08x ",
+ major(sp->st_rdev), minor(sp->st_rdev));
+ else
+ (void)printf("%3d, %3d ",
+ major(sp->st_rdev), minor(sp->st_rdev));
else if (dp->bcfile)
(void)printf("%*s%*qd ",
8 - dp->s_size, "", dp->s_size, sp->st_size);
OpenPOWER on IntegriCloud