#!/usr/bin/perl

use diagnostics;
use strict;

use lib qw(.);
use common;
use resize_fat::main;

local *log::l = sub { print join(' ', @_), "\n" };

@ARGV = qw(/tmp/eee +0);

@ARGV == 2 or die "usage: fatresize <device> <size>\n  <size> = 100 means `resize to 100Mb'\n  <size> = +10 means `keep 10Mb of free space'\n";

my $fs = new resize_fat::main(common::basename($ARGV[0]), $ARGV[0]);
resize_fat::main::resize($fs, $ARGV[1]);