Added password prompting.
[usmb.git] / version.c
blob0e3932939e87202f51dd9dafaca4dc6fa2d5bea8
1 /* usmb - mount SMB shares via FUSE and Samba
2 * Copyright (C) 2006-2008 Geoff Johnstone
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 #include <stdio.h>
18 #include <sys/time.h>
19 #include <libsmbclient.h>
20 #include <fuse.h>
21 #include "version.h"
24 #if ((USMB_VERSION_STATUS != 'a') && \
25 (USMB_VERSION_STATUS != 'b') && \
26 (USMB_VERSION_STATUS != 'p') && \
27 (USMB_VERSION_STATUS != 's'))
28 #error Unsupported USMB_VERSION_STATUS
29 #endif
32 void show_about (FILE *fp)
34 fprintf (fp, "usmb - mount SMB shares via FUSE and Samba\n"
35 "\n"
36 "Copyright (C) 2006-2008 Geoff Johnstone.\n"
37 "Licensed under the GNU General Public License.\n"
38 "usmb comes with ABSOLUTELY NO WARRANTY; "
39 "for details please see\n"
40 "http://www.gnu.org/licenses/gpl.txt\n"
41 "\n"
42 "Please send bug reports, patches etc. to %s@%s.org\n",
43 "geoffjohnstone", "acm"); // anti-spam.
47 static inline const char * get_status (char ch)
49 switch (ch)
51 case 'a': return "alpha";
52 case 'b': return "beta";
53 case 'p': return "pre-release";
54 case 's': return "stable";
55 default: return "unofficial";
60 void show_version (FILE *fp)
62 show_about (fp);
63 fputc ('\n', fp);
64 fprintf (fp, "usmb version: %08x (%s)\n"
65 "FUSE version: %d.%d\n"
66 "Samba version: %s\n",
67 USMB_VERSION, get_status (USMB_VERSION_STATUS),
68 FUSE_MAJOR_VERSION, FUSE_MINOR_VERSION,
69 smbc_version());