losetup --list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 Hi,

 I have applied Ondrej's patch to support a new losetup output format.
 The output uses tt.c, so it's compatible with our others utils
 (lscpu, lsblk, prlimit, ...).

 Now losetup prints all loopdevs in the new format if no other option
 is specified.

   $ losetup
   NAME       SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE
   /dev/loop0         0      0         0  0 /home/fs-images/swap.img
   /dev/loop1         0    100         0  0 /home/fs-images/disk.img

   $ losetup -O +MAJ:MIN
   NAME       SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE                 MAJ:MIN
   /dev/loop0         0      0         0  0 /home/fs-images/swap.img    7:0  
   /dev/loop1         0    100         0  0 /home/fs-images/disk.img    7:1 


 (we read all important information from /sys, so it's usable for
  non-root users too.)

 The change is backwardly compatible, -j or -a without --list returns
 the original format. The old format is marked as deprecated now.

 Thanks to Ondrej!

    Karel


-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux