[Pkg-libvirt-commits] [libguestfs] 54/87: builder: Move is_block_device function into common utilities.
Hilko Bengen
bengen at moszumanska.debian.org
Wed Feb 19 21:10:14 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch debian
in repository libguestfs.
commit b62f8431e761beaa38b1dbc6c1696af34f8c24d0
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Sat Dec 14 13:18:48 2013 +0000
builder: Move is_block_device function into common utilities.
This is just code motion.
(cherry picked from commit 81b4e5d5cd68f65aa950251e22332b3fa477fecb)
---
builder/builder.ml | 5 -----
mllib/common_utils.ml | 4 ++++
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/builder/builder.ml b/builder/builder.ml
index 25ab8c4..97e762f 100644
--- a/builder/builder.ml
+++ b/builder/builder.ml
@@ -233,11 +233,6 @@ let main () =
Sigchecker.verify_detached sigchecker template sigfile in
let output, size, format, delete_output_file, resize_sparse =
- let is_block_device file =
- try (stat file).st_kind = S_BLK
- with Unix_error _ -> false
- in
-
let headroom = 256L *^ 1024L *^ 1024L in
match output with
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 1f8208b..357ffba 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -401,6 +401,10 @@ let rm_rf_only_files (g : Guestfs.guestfs) dir =
List.iter g#rm files
)
+let is_block_device file =
+ try (Unix.stat file).Unix.st_kind = Unix.S_BLK
+ with Unix.Unix_error _ -> false
+
let is_char_device file =
try (Unix.stat file).Unix.st_kind = Unix.S_CHR
with Unix.Unix_error _ -> false
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list