From c902c8a7813df3c9b4f78e4e361d23d480ca234d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 5 Apr 2008 15:03:42 +0000 Subject: [PATCH] (ls-lisp-format): Support inodes that are 2- or 3-member cons cells. --- lisp/ChangeLog | 5 +++++ lisp/ls-lisp.el | 12 +++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9b778115798..d1083f35323 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-04-05 Eli Zaretskii + + * ls-lisp.el (ls-lisp-format): Support inodes that are 2- or + 3-member cons cells. + 2008-04-05 Chong Yidong * cus-face.el (custom-face-attributes): Handle roman slant. diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index 2963168a899..854f47a59c3 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -529,7 +529,17 @@ SWITCHES, TIME-INDEX and NOW give the full switch list and time data." ;; for symbolic link, or nil. (drwxrwxrwx (nth 8 file-attr))) ; attribute string ("drwxrwxrwx") (concat (if (memq ?i switches) ; inode number - (format " %6d" (nth 10 file-attr))) + (let ((inode (nth 10 file-attr))) + (if (consp inode) + (if (consp (cdr inode)) + (format " %17.0f " + (+ (* (car inode) 1099511627776.0) + (* (cadr inode) 65536.0) + (cddr inode))) + (format " %17.0f " + (+ (* (car inode) 65536.0) + (cdr inode)))) + (format " %17d " inode)))) ;; nil is treated like "" in concat (if (memq ?s switches) ; size in K (format " %4.0f" (fceiling (/ file-size 1024.0)))) -- 2.39.5