Bug 582484

Summary: some guestfish sub commands can not handle special files properly
Product: [Community] Virtualization Tools Reporter: Pengzhen Cao <pcao>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
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:
: 633174 (view as bug list) Environment:
Last Closed: 2011-07-14 19:10:10 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:
Bug Depends On:    
Bug Blocks: 633174    
Attachments:
Description Flags
log for file command
none
log for touch command none

Description Pengzhen Cao 2010-04-15 06:38:26 UTC
Description of problem:
1. guestfish "file" command can not handle character special files properly, it just hang when called againest a char special file.
2. guestfish "touch" command can not handle fifo special files properly, it also hang.
These two commands can work for other special devices like block special file.

Version-Release number of selected component (if applicable):
libguestfs-1.0.85-1.fc12.3.x86_64
And also the lastest git version

How reproducible:
100%

Steps to Reproduce:
1. Run guestfish, add an img containing some char/block/fifo special files
2. Run and mount the partition
3. "file /path_to_char-dev-file" , it will hang the guestfish shell.
4. Repeat step 1,2, then run "touch /path_to_fifo-dev-file", it will hang.
5. ll,stat commands works fine for these special files

Actual results:
guestfish hang

Expected results:
command should return proper value

Additional info:
check logs in the attachment:
guestfish-file-error01.log
guestfish-touch-error02.log

Comment 1 Pengzhen Cao 2010-04-15 06:39:34 UTC
Created attachment 406688 [details]
log for file command

Comment 2 Pengzhen Cao 2010-04-15 06:40:03 UTC
Created attachment 406689 [details]
log for touch command

Comment 3 Richard W.M. Jones 2010-04-15 08:24:22 UTC
I'll have a look at this when I get back from holiday.

Comment 4 Richard W.M. Jones 2010-06-04 14:37:55 UTC
Patches posted upstream to fix the issues with
the touch and file commands.

https://www.redhat.com/archives/libguestfs/2010-June/msg00050.html

Comment 5 Richard W.M. Jones 2010-06-08 13:32:57 UTC
This commit:

http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=4df593496e116dfb635731c058b7627e81fc179c

breaks OS detection, since /dev/VG/LV is a symbolic link to
../dm-NN.

Reopening this bug.

Comment 6 Richard W.M. Jones 2010-06-08 15:08:02 UTC
Second patch posted:

https://www.redhat.com/archives/libguestfs/2010-June/msg00068.html