From 520f1b5a5b109a0729090d378ad6fe077561fae2 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 11 May 2021 15:10:22 +0000 Subject: [PATCH] Print file offset for device files too. Also, fix indentation for a }. --- usr.bin/fstat/fstat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index 64ffb05337..39f348be0f 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -526,7 +526,7 @@ vtrans(struct vnode *vp, struct nchandle *ncr, int i, int flag, off_t off) badtype=unknown; break; } - } + } if (checkfile) { int fsmatch = 0; DEVS *d; @@ -574,6 +574,7 @@ vtrans(struct vnode *vp, struct nchandle *ncr, int i, int flag, off_t off) printf(" %3u,%-4u", major(fst.rdev), minor(fst.rdev)); else printf(" %8s", name); + printf(":%jd", (intmax_t)fst.offset); break; case VREG: printf(" %jd", (intmax_t)fst.offset); -- 2.30.1