Project

General

Profile

Actions

Bug #3091

closed

swapinfo print major/minor number when device name too long

Added by liweitianux over 6 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Userland
Target version:
-
Start date:
10/23/2017
Due date:
% Done:

0%

Estimated time:

Description

Hi, I enabled swap encryption by adding the "crypt" option to "/etc/fstab", therefore the auto configured swap device has a rather long name ("swap-<serno>.<slice><part>"), which seems, I think, cause problem for the "swapinfo"/"pstat" tool. For example:

dfly# ls l /dev/mapper/swap-WD-WCAS25235448.s1b
crw-r----
1 root operator 65, 0x1e11000f Oct 21 08:26 /dev/mapper/swap-WD-WCAS25235448.s1b

dfly# swapinfo
Device 1K-blocks Used Avail Capacity Type
/dev/#C65:0x1e11000f 16777216 1141708 15635508 7% Interleaved
^^^^^^^^^^^^^

By default, "swapinfo" should print the device "name" instead of such major/minor numbers.

Cheers,
Aly


Files

dfly.swapinfo.devicename.png (14.4 KB) dfly.swapinfo.devicename.png liweitianux, 10/23/2017 04:42 AM
Actions #1

Updated by liweitianux over 6 years ago

Hi, I just did several more tests to confirm this issue. When the swap device name gets longer, the printed name by "swapinfo" will first be truncated, then the major/minor numbers is printed instead.

Please see the attached screenshot for my tests.

Cheers,
Aly

Actions #2

Updated by liweitianux almost 5 years ago

Fixed by dillon in commits fad98ec1be792bc601f34a7ed7208c675972317a and 8018265cbcfcaf589c40b983e65edf11b2690b12. Thanks.

Actions #3

Updated by liweitianux almost 5 years ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF