git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3f61a9
)
sparsify: Fix --ignore option to work on canonical device names.
author
Richard W.M. Jones
<rjones@redhat.com>
Tue, 4 Oct 2011 19:00:42 +0000
(20:00 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Tue, 4 Oct 2011 19:00:42 +0000
(20:00 +0100)
sparsify/sparsify.ml
patch
|
blob
|
history
diff --git
a/sparsify/sparsify.ml
b/sparsify/sparsify.ml
index
89a2c13
..
4782983
100644
(file)
--- 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