git-svn-id: https://profuse.googlecode.com/svn/branches/v2@226 aa027e90-d47c-11dd-86d7-074df07e0730

This commit is contained in:
ksherlock 2010-05-19 17:50:43 +00:00
parent 545dd02842
commit e8582d0edb
1 changed files with 7 additions and 4 deletions

View File

@ -153,11 +153,12 @@ int action_ls(int argc, char **argv, Pascal::VolumeEntry *volume)
used += e->blocks();
}
if (extended && (lastBlock != volumeSize))
if (lastBlock != volumeSize)
{
unsigned size = volumeSize - lastBlock;
max = std::max(max, size);
printUnusedEntry(lastBlock, size);
if (extended)
printUnusedEntry(lastBlock, size);
}
@ -269,7 +270,7 @@ void usage()
}
int main(int argc, char **argv)
int main(/* int argc, char **argv */)
{
std::auto_ptr<Pascal::VolumeEntry> volume;
std::auto_ptr<Device::BlockDevice> device;
@ -279,6 +280,8 @@ int main(int argc, char **argv)
int c;
// getop stops at first non '-' arg so it will not affect action flags.
while ((c = ::getopt(argc, argv, "f:h")) != -1)
{
@ -308,7 +311,7 @@ int main(int argc, char **argv)
optreset = 1;
optind = 1;
if (argc != 2)
if (argc < 2)
{
usage();
return 0;