aboutsummaryrefslogtreecommitdiff
path: root/toys/pending/lsof.c
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2016-06-11 22:00:54 -0700
committerRob Landley <rob@landley.net>2016-06-12 01:22:53 -0500
commit001e4fb62baee6770c3b076ece56446f8d2550de (patch)
tree6a49f03aaa2532832744a1b8da7ad07b105303ba /toys/pending/lsof.c
parent4b925a785bd9712f9a30a8b30497e6966993ae8e (diff)
downloadtoybox-001e4fb62baee6770c3b076ece56446f8d2550de.tar.gz
Finish switching to dev_major/dev_minor.
7ca5dc4232b9ac5ee5cd25c8b5b33a58904cd251 didn't switch all callers over to the new functions.
Diffstat (limited to 'toys/pending/lsof.c')
-rw-r--r--toys/pending/lsof.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/pending/lsof.c b/toys/pending/lsof.c
index e99b011a..436fdd2a 100644
--- a/toys/pending/lsof.c
+++ b/toys/pending/lsof.c
@@ -277,8 +277,8 @@ static void fill_stat(struct file_info *fi, const char *path)
// Fill DEVICE.
dev = (S_ISBLK(sb.st_mode) || S_ISCHR(sb.st_mode)) ? sb.st_rdev : sb.st_dev;
if (!S_ISSOCK(sb.st_mode))
- snprintf(fi->device, sizeof(fi->device), "%ld,%ld",
- (long)major(dev), (long)minor(dev));
+ snprintf(fi->device, sizeof(fi->device), "%d,%d",
+ dev_major(dev), dev_minor(dev));
// Fill SIZE/OFF.
if (S_ISREG(sb.st_mode) || S_ISDIR(sb.st_mode))