Bug 824718
Summary: | file reported incorrect type for zero device | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Mohua Li <moli> |
Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
Status: | CLOSED NOTABUG | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.0 | CC: | leiwang, qguan, qwan, yuzhou |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-05-24 07:59:12 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Mohua Li
2012-05-24 03:59:52 UTC
I've noticed this too. It's a bug (or change?) in the regular 'file(1)' command: $ truncate -s 100k data $ file data data: \0 Note that libguestfs doesn't define the output of the guestfs_file function. It says in the documentation: The output depends on the output of the underlying file(1) command and it can change in future in ways beyond our control. In other words, the output is not guaranteed by the ABI. If you want to check if a file contains zeroes, use guestfs_is_zero instead. file 5.11 prints: MAGIC=magic/magic ./src/file /tmp/data /tmp/data: data The version of file in Fedora 17 is 5.10, which is older than upstream, so I think it just needs an update. |