Bug 634246

Summary: guestfs_part_get_parttype returns "loop" when run against a partition, LV or filesystem
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: mbooth, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-14 19:15:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard W.M. Jones 2010-09-15 16:01:39 UTC
Description of problem:

An example is a best way to explain this.

><fs> part-get-parttype /dev/vda
msdos
><fs> part-get-parttype /dev/vda1 
loop
><fs> part-get-parttype /dev/vg_f12x32/lv_root 
loop
><fs> part-get-parttype /dev/vg_f12x32/lv_swap 
loop
><fs> part-list /dev/vg_f12x32/lv_swap 
[0] = {
  part_num: 1
  part_start: 0
  part_end: 536870911
  part_size: 536870912
}

Version-Release number of selected component (if applicable):

libguestfs 1.5.14

How reproducible:

Always.

Steps to Reproduce:
1.  See example above.

Expected results:

This should give an error.

Comment 1 Richard W.M. Jones 2010-10-18 12:01:41 UTC
Patch posted upstream:

https://www.redhat.com/archives/libguestfs/2010-October/msg00029.html

><fs> part-get-parttype /dev/vda
msdos
><fs> part-get-parttype /dev/vda1
libguestfs: error: part_get_parttype: not a partitioned device
><fs> part-get-parttype /dev/vg_f13x64/lv_root 
libguestfs: error: part_get_parttype: not a partitioned device