util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: jb <jb.1234abcd@gmail.com>
To: util-linux@vger.kernel.org
Subject: Re: lsblk vice fdisk, etc
Date: Mon, 25 Aug 2014 14:21:17 +0000 (UTC)	[thread overview]
Message-ID: <loom.20140825T160840-339@post.gmane.org> (raw)
In-Reply-To: loom.20140819T114407-592@post.gmane.org

jb <jb.1234abcd@...> writes:

> ...

To continue with "Dazed and Confused" ...
I assume all of them became programmers.
https://www.youtube.com/watch?v=wknywxfcE5M

It would be good to have some rules in field naming (meaning and continuity
of their use) in similar (almost identical) displays.
All of these entries display the same data types, so it is imperative that
they correspond to each other clearly.

This will give you an overview of output columns:
$ lsblk -h
...

# lsblk 
NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda      8:0    0 37.3G  0 disk 
├─sda1   8:1    0   17G  0 part 
├─sda2   8:2    0  4.4G  0 part [SWAP]
├─sda3   8:3    0 13.4G  0 part /
├─sda4   8:4    0    1K  0 part 
└─sda5   8:5    0  2.4G  0 part 
sr0     11:0    1 1024M  0 rom  

The field TYPE refers to a device type, so it should be renamed to DEVTYPE.
This would avoid confusion with other TYPE-like fields, e.g.
- cfdisk and fdisk
  Type means partition type (by Id): Linux, Linux swap, Extended, FAT12,
  empty, AIX, Dell Utility, etc  
- parted
  Type means partition type: primary, extended, logical
- partx
  Type means partition type (a string, a UUID, or hex)

# lsblk -o name,fstype,label,parttype,partlabel,mountpoint
NAME   FSTYPE LABEL  PARTTYPE PARTLABEL MOUNTPOINT
sda                                     
├─sda1 ext4          0x83               
├─sda2 swap          0x82               [SWAP]
├─sda3 ext4   Arch   0x83               /
├─sda4               0x5                
└─sda5 ext4   backup 0x83               
sr0                                     

The field LABEL should be renamed to FSLABEL, as there is also a partition
label PARTLABEL.

# blkid 
/dev/sda1: UUID="fb838405-607c-4723-9355-47ccbf1eb273" TYPE="ext4"
PARTUUID="3db012b3-01" 
/dev/sda5: LABEL="backup" UUID="4f168c8f-ac1d-4048-ac3f-254fa4392c60"
TYPE="ext4" PARTUUID="3db012b3-05" 
/dev/sda2: UUID="8afa3b49-ae96-4496-9335-1afd62d67097" TYPE="swap"
PARTUUID="3db012b3-02" 
/dev/sda3: LABEL="Arch" UUID="d067602d-f15d-49c0-abad-865adab2cc8f"
TYPE="ext4" PTTYPE="dos" PARTUUID="3db012b3-03" 

The fields:
LABEL corresponds to LABEL in lsblk display, which is suggested to be
renamed to FSLABEL, so this one should be too.
TYPE refers to "ext4" and "swap", which suggests a fs type, so it should be
renamed to FSTYPE to correspond to lsblk display.
PTTYPE refers to "dos" ... here I am at a loss; I assume it means partition
type, so it should be renamed to PARTTYPE to correspond to lsblk display;
why "dos" ? why for /dev/sda3 only ?

jb



  parent reply	other threads:[~2014-08-25 14:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19  9:51 lsblk vice fdisk, etc jb
2014-08-19 18:21 ` jb
2014-08-19 20:05   ` Dave Reisner
2014-08-20  9:00     ` jb
2014-08-25 14:21 ` jb [this message]
2014-08-25 20:46   ` jb
2014-08-25 21:18     ` jb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20140825T160840-339@post.gmane.org \
    --to=jb.1234abcd@gmail.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).