From 191732a41c53dd44889419319fc4bb5a9668afa6 Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Fri, 29 Dec 2006 06:47:12 +0000 Subject: [PATCH] another small style patch by Vasilis Kaoutsis git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19652 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/bin/isvolume.cpp | 45 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/src/bin/isvolume.cpp b/src/bin/isvolume.cpp index 1fc509b6e3..7c24ccdffb 100644 --- a/src/bin/isvolume.cpp +++ b/src/bin/isvolume.cpp @@ -12,7 +12,26 @@ #include #include -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"); -}