1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

feature #2164: Remove bzip2 support for stat

This commit is contained in:
Jaime Melis 2013-09-26 11:15:30 +02:00
parent aa6cb1c869
commit 4329436beb

View File

@ -146,16 +146,6 @@ function gzip_file_size {
gzip -l "$1" | tail -n 1 | awk '{print $2}'
}
#------------------------------------------------------------------------------
# Gets the size in bytes of a bzip2 file
# @param $1 - Path to the image
# @return size of the image in bytes
#------------------------------------------------------------------------------
function bzip2_file_size {
bzip2 -dc "$1" | wc -c
}
#-------------------------------------------------------------------------------
# Computes the size of an image
# @param $1 - Path to the image
@ -193,9 +183,6 @@ function fs_size {
"application/x-gzip")
SIZE=$(gzip_file_size "$1")
;;
"application/x-bzip2")
SIZE=$(bzip2_file_size "$1")
;;
*)
SIZE=$(file_size "$1")
;;