Created attachment 1308294 [details] Dockerfile to reproduce environment Description of problem: I'm trying to run the file utility on every file of the filesystem, through libguestfs. I'm walking through the filesystem using guestfs.ls(), and then calling guestfs.file() I found a special device that is reported present on the filesystem, but absent when asking for file to identify it. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Mount a Linux filesystem in libguestfs 2. Run Python API guestfs.file('/dev/agpgart') 3. A RuntimeError is raised Actual results: A RuntimeError is raised: In [8]: g.file('/dev/agpgart') --------------------------------------------------------------------------- RuntimeError Traceback (most recent call last) /root/test_guestfs.py in <module>() ----> 1 g.file('/dev/agpgart') /usr/lib/python3/dist-packages/guestfs.py in file(self, path) 2569 """ 2570 self._check_not_closed () -> 2571 r = libguestfsmod.file (self._o, path) 2572 return r 2573 RuntimeError: file: file_stub: /dev/agpgart: No such file or directory Expected results: file output for /dev/agpgart Additional info: I created a Dockerfile to reproduce the issue. https://gist.github.com/Wenzel/09b222f3572fa34ec01b50f69c5a556e Look at https://bugzilla.redhat.com/show_bug.cgi?id=1477623 for how to use it. Thanks !
What does g.ll ('/dev/agpgart') return?
Forget that. The reproducer is: $ virt-builder fedora-26 $ guestfish -a fedora-26.img -i ><fs> mknod-c 0777 10 175 /dev/agpgart ><fs> file /dev/agpgart libguestfs: error: file: file_stub: /dev/agpgart: No such file or directory This is reproducible with libguestfs from git.
Hi, thanks for checking it. If you still wanted the output: In [1]: g.ll('/dev/agpgart') Out[1]: 'crw-rw---- 1 0 44 10, 175 Jul 21 14:35 /sysroot/dev/agpgart\n' Thanks :)
*** This bug has been marked as a duplicate of bug 1477623 ***