X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famrestore.pl;fp=server-src%2Famrestore.pl;h=879aec434f1431460b8a2afe531d22e1eb764160;hb=949b8910a5e23c4285d0b1aedacfc82a14dc97a5;hp=362ee65d8e105f023522bee82000edd1715fa7c9;hpb=c6f0a88c567f8536c498f554285aed1f8150da18;p=debian%2Famanda diff --git a/server-src/amrestore.pl b/server-src/amrestore.pl index 362ee65..879aec4 100644 --- a/server-src/amrestore.pl +++ b/server-src/amrestore.pl @@ -1,5 +1,5 @@ #! @PERL@ -# Copyright (c) 2009, 2010 Zmanda, Inc. All Rights Reserved. +# Copyright (c) 2009-2012 Zmanda, Inc. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 as published @@ -173,6 +173,16 @@ sub main { return failure($err, $finished_cb) if $err; $dev = $res->{'device'}; + + if ($opt_blocksize) { + if ( !$dev->property_set("BLOCK_SIZE", $opt_blocksize)) { + return failure($dev->error_or_status, $finished_cb); + } + + # re-read the label with the correct blocksize + $dev->read_label(); + } + if ($dev->status != $DEVICE_STATUS_SUCCESS) { return failure($dev->error_or_status, $finished_cb); }