another small style patch by Vasilis Kaoutsis

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19652 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2006-12-29 06:47:12 +00:00
parent 089b7ad4c6
commit 191732a41c

View File

@ -12,7 +12,26 @@
#include <stdio.h>
#include <string.h>
void Usage();
static void
usage()
{
fprintf(stderr,
"Usage: isvolume {-OPTION} [volumename]\n"
" Where OPTION is one of:\n"
" -readonly - volume is read-only\n"
" -query - volume supports queries\n"
" -attribute - volume supports attributes\n"
" -mime - volume supports MIME information\n"
" -shared - volume is shared\n"
" -persistent - volume is backed on permanent storage\n"
" -removable - volume is on removable media\n"
" If the option is true for the named volume, 'yes' is printed\n"
" and if the option is false, 'no' is printed. Multiple options\n"
" can be specified in which case all of them must be true.\n\n"
" If no volume is specified, the volume of the current directory is assumed.\n");
}
int
main(int32 argc, char** argv)
@ -23,7 +42,7 @@ main(int32 argc, char** argv)
for (int i = 1; i < argc; i++) {
if (!strcmp(argv[i], "--help")) {
Usage();
usage();
return 0;
}
@ -56,7 +75,7 @@ main(int32 argc, char** argv)
}
}
}
if (fs_stat_dev(volumeDevice, &volumeInfo) == B_OK) {
if (volumeInfo.flags & isVolumeFlags)
printf("yes\n");
@ -69,23 +88,3 @@ main(int32 argc, char** argv)
return -1;
}
}
void
Usage()
{
fprintf(stderr,
"Usage: isvolume {-OPTION} [volumename]\n"
" Where OPTION is one of:\n"
" -readonly - volume is read-only\n"
" -query - volume supports queries\n"
" -attribute - volume supports attributes\n"
" -mime - volume supports MIME information\n"
" -shared - volume is shared\n"
" -persistent - volume is backed on permanent storage\n"
" -removable - volume is on removable media\n"
" If the option is true for the named volume, 'yes' is printed\n"
" and if the option is false, 'no' is printed. Multiple options\n"
" can be specified in which case all of them must be true.\n\n"
" If no volume is specified, the volume of the current directory is assumed.\n");
}