diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2011-10-04 20:00:42 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2011-10-04 20:00:42 +0100 |
commit | b0605f265be3f501930516ff95deab2910ced3ac (patch) | |
tree | 649386cc92603c7851800af48f4905390a203085 /sparsify | |
parent | b3f61a9db39a639b7e462581cb5e177c778de354 (diff) | |
download | libguestfs-b0605f265be3f501930516ff95deab2910ced3ac.tar.gz libguestfs-b0605f265be3f501930516ff95deab2910ced3ac.tar.xz libguestfs-b0605f265be3f501930516ff95deab2910ced3ac.zip |
sparsify: Fix --ignore option to work on canonical device names.
Diffstat (limited to 'sparsify')
-rw-r--r-- | sparsify/sparsify.ml | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sparsify/sparsify.ml b/sparsify/sparsify.ml index 89a2c137..4782983d 100644 --- a/sparsify/sparsify.ml +++ b/sparsify/sparsify.ml @@ -177,10 +177,15 @@ let () = let filesystems = g#list_filesystems () in let filesystems = List.map fst filesystems in let filesystems = List.sort compare filesystems in + + let is_ignored fs = + let fs = canonicalize fs in + List.exists (fun fs' -> fs = canonicalize fs') ignores + in + List.iter ( fun fs -> - if not (List.mem fs ignores) then ( - + if not (is_ignored fs) then ( let mounted = try g#mount_options "" fs "/"; true with _ -> false in |