mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
daemon: tweak regexp for file type detection (RHBZ#1575640)
Newer versions of file slightly changed the output, removing the comma between the type, and the architecture string. Tweak the regular expression so: - the comma is optional, but if missing then only the architecture string will follow - the architecture string has no commas
This commit is contained in:
@@ -25,7 +25,7 @@ open Unix_utils
|
||||
open Utils
|
||||
|
||||
let re_file_elf =
|
||||
PCRE.compile "ELF (\\d+)-bit (MSB|LSB).*(?:executable|shared object|relocatable), (.+?),"
|
||||
PCRE.compile "ELF (\\d+)-bit (MSB|LSB).*(?:executable|shared object|relocatable)(?:,)? ([^,]+?),"
|
||||
|
||||
let re_file_elf_ppc64 = PCRE.compile ".*64.*PowerPC"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user