mirror of
https://github.com/ksherlock/profuse.git
synced 2025-02-02 20:30:22 +00:00
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@226 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
parent
545dd02842
commit
e8582d0edb
11
apfm.cpp
11
apfm.cpp
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user