From 0c293d040772a658a563688fbc2e525cad78964b Mon Sep 17 00:00:00 2001 From: antona Date: Fri, 7 Oct 2005 14:10:56 +0000 Subject: [PATCH] - Add API (actually renamed from what Rich/FlatCap did): volume.[hc]::ntfs_libntfs_version() which returns a pointer to a static const string of the libntfs verion, i.e. at the moment this is "8.0.0". This required moving the version specifications from libntfs/Makefile.am to configure.ac. This should hopefully have the sideeffect that I will remember to increment it when incrementing the ntfsprogs version number when making a release given the two are right under one another. (Anton) - Change ALL utilities to display the libntfs version they are running on. This should make debugging easier in the case that people are running mismatched utilities/library. (Anton) --- ChangeLog | 11 +++++++++++ configure.ac | 31 +++++++++++++++++++++++++++++++ include/ntfs/version.h | 5 +++-- libntfs/Makefile.am | 5 +++-- libntfs/version.c | 28 ++++++++++++++++------------ ntfsprogs/mkntfs.c | 7 +++++-- ntfsprogs/ntfscat.c | 12 +++++++----- ntfsprogs/ntfsclone.c | 6 ++++-- ntfsprogs/ntfscluster.c | 7 +++++-- ntfsprogs/ntfscmp.c | 6 ++++-- ntfsprogs/ntfscp.c | 5 +++-- ntfsprogs/ntfsdecrypt.c | 6 ++++-- ntfsprogs/ntfsdump_logfile.c | 28 +++++++++++++++------------- ntfsprogs/ntfsfix.c | 6 ++++-- ntfsprogs/ntfsinfo.c | 10 ++++++---- ntfsprogs/ntfslabel.c | 10 ++++++---- ntfsprogs/ntfsls.c | 10 ++++++---- ntfsprogs/ntfsmftalloc.c | 8 +++++--- ntfsprogs/ntfsmount.c | 6 ++++-- ntfsprogs/ntfsmove.c | 8 +++++--- ntfsprogs/ntfsresize.c | 6 ++++-- ntfsprogs/ntfsrm.c | 6 ++++-- ntfsprogs/ntfstruncate.c | 8 +++++--- ntfsprogs/ntfsundelete.c | 6 ++++-- ntfsprogs/ntfswipe.c | 7 +++++-- ntfsprogs/utils.c | 1 + 26 files changed, 170 insertions(+), 79 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4eeda9b1..560cddde 100644 --- a/ChangeLog +++ b/ChangeLog @@ -77,6 +77,17 @@ - Fix stupid bug in mkntfs which caused it to fail even though only the backup boot sector could not be written because a 2.4 kernel is used and the partition has an odd number of sectors. (Anton) + - Add API (actually renamed from what Rich/FlatCap did): + volume.[hc]::ntfs_libntfs_version() which returns a pointer to a + static const string of the libntfs verion, i.e. at the moment this is + "8.0.0". This required moving the version specifications from + libntfs/Makefile.am to configure.ac. This should hopefully have the + sideeffect that I will remember to increment it when incrementing the + ntfsprogs version number when making a release given the two are + right under one another. (Anton) + - Change ALL utilities to display the libntfs version they are running + on. This should make debugging easier in the case that people are + running mismatched utilities/library. (Anton) 08/08/2005 - 1.11.2 - ntfsdecrypt now works and lots of fixes and improvements. diff --git a/configure.ac b/configure.ac index 67f74b23..de35f2ff 100644 --- a/configure.ac +++ b/configure.ac @@ -23,6 +23,36 @@ AC_PREREQ(2.59) AC_INIT([ntfsprogs],[1.12.0],[linux-ntfs-dev@lists.sourceforge.net]) + +# +# Before making a release, the LTVERSION string should be modified. +# The string is of the form CURRENT:REVISION:AGE. +# +# CURRENT (C) +# The most recent interface number that this library implements. +# +# REVISION (R) +# The implementation number that this library implements. +# +# AGE (A) +# The difference between the newest and oldest interfaces that this +# library implements. In other works, the library implements all the +# interface numbers in the range from number 'CURRENT - AGE' to +# 'CURRENT'. +# +# This means that: +# +# - If interfaces have been changed or added, but binary compatibility has +# been preserved, change to C+1:0:A+1 +# +# - If binary compatibility has been broken (eg removed or changed +# interfaces) change to C+1:0:0 +# +# - If the interface is the same as the previous version, change to C:R+1:A +# +LTVERSION_LIBNTFS="8:0:0" +AC_SUBST(LTVERSION_LIBNTFS) + AC_CANONICAL_HOST([]) AC_CANONICAL_TARGET([]) AC_CONFIG_SRCDIR([config.h.in]) @@ -248,6 +278,7 @@ AC_SUBST(CPPFLAGS) AC_SUBST(LDFLAGS) AC_SUBST(LIBS) +AC_SUBST(LIBNTFS_CFLAGS) AC_SUBST(LIBNTFS_GNOMEVFS_CFLAGS) AC_SUBST(LIBNTFS_GNOMEVFS_LIBS) diff --git a/include/ntfs/version.h b/include/ntfs/version.h index d9198b71..27e62fdd 100644 --- a/include/ntfs/version.h +++ b/include/ntfs/version.h @@ -1,6 +1,7 @@ /** - * version.h - Info about the NTFS library. Part of the Linux-NTFS project. + * version.h - Info about the NTFS library. Part of the Linux-NTFS project. * + * Copyright (c) 2005 Anton Altaparmakov * Copyright (c) 2005 Richard Russon * * This program/include file is free software; you can redistribute it and/or @@ -22,7 +23,7 @@ #ifndef _NTFS_VERSION_H_ #define _NTFS_VERSION_H_ -extern const char * ntfs_get_library_version (void); +extern const char *ntfs_libntfs_version(void); #endif /* _NTFS_VERSION_H_ */ diff --git a/libntfs/Makefile.am b/libntfs/Makefile.am index 12282845..e199c9d4 100644 --- a/libntfs/Makefile.am +++ b/libntfs/Makefile.am @@ -25,7 +25,7 @@ # - If the interface is the same as the previous version, change to C:R+1:A # -LTVERSION_LIBNTFS = 8:0:0 +# For LTVERSION_LIBNTFS see configure.ac! LTVERSION_LIBNTFS_GNOMEVFS = 1:0:0 @@ -33,6 +33,8 @@ linux_ntfsincludedir = -I$(top_srcdir)/include/ntfs lib_LTLIBRARIES = libntfs.la libntfs_la_LDFLAGS = -version-info $(LTVERSION_LIBNTFS) +libntfs_la_CFLAGS = $(LIBNTFS_CFLAGS) \ + -DLTVERSION_LIBNTFS=\"$(LTVERSION_LIBNTFS)\" libntfs_la_SOURCES = \ attrib.c \ attrlist.c \ @@ -84,4 +86,3 @@ EXTRA_DIST = unix_io.c win32_io.c libntfs.conf.in MAINTAINERCLEANFILES = Makefile.in libs: $(lib_LTLIBRARIES) - diff --git a/libntfs/version.c b/libntfs/version.c index 6cfba869..7882e717 100644 --- a/libntfs/version.c +++ b/libntfs/version.c @@ -1,6 +1,7 @@ /** - * version.c - Info about the NTFS library. Part of the Linux-NTFS project. + * version.c - Info about the NTFS library. Part of the Linux-NTFS project. * + * Copyright (c) 2005 Anton Altaparmakov * Copyright (c) 2005 Richard Russon * * This program/include file is free software; you can redistribute it and/or @@ -25,17 +26,20 @@ #include "version.h" -#ifndef VERSION -#define VERSION "unknown" +#ifdef LTVERSION_LIBNTFS +#define LIBNTFS_VERSION_STRING LTVERSION_LIBNTFS +#else +#define LIBNTFS_VERSION_STRING "unknown" #endif -/** - * ntfs_get_library_version - Version number of the library release - * - * Returns a text string representing the release of libntfs, e.g. "1.9.4". - */ -const char * ntfs_get_library_version (void) -{ - return VERSION; -} +static const char *libntfs_version_string = LIBNTFS_VERSION_STRING; +/** + * ntfs_libntfs_version - query version number of the ntfs library libntfs + * + * Returns pointer to a text string representing the version of libntfs. + */ +const char *ntfs_libntfs_version(void) +{ + return libntfs_version_string; +} diff --git a/ntfsprogs/mkntfs.c b/ntfsprogs/mkntfs.c index 07839d0a..577b2cbe 100644 --- a/ntfsprogs/mkntfs.c +++ b/ntfsprogs/mkntfs.c @@ -137,6 +137,7 @@ #include "runlist.h" #include "utils.h" #include "ntfstime.h" +#include "version.h" #ifdef NO_NTFS_DEVICE_DEFAULT_IO_OPS # error "No default device io operations! Cannot build mkntfs. \ @@ -282,7 +283,7 @@ static void err_exit(const char *fmt, ...) */ static void copyright(void) { - fprintf(stderr, "Copyright (c) 2000-2004 Anton Altaparmakov\n" + fprintf(stderr, "Copyright (c) 2000-2005 Anton Altaparmakov\n" "Copyright (c) 2001-2003 Richard Russon\n" "Create an NTFS volume on a user specified (block) " "device.\n"); @@ -342,6 +343,7 @@ static void usage(void) exit(1); } +#include "version.h" /** * parse_options */ @@ -356,7 +358,8 @@ static void parse_options(int argc, char *argv[]) // logfile size, list of bad blocks, check for bad blocks, ... if (argc && *argv) EXEC_NAME = *argv; - fprintf(stderr, "%s v%s\n", EXEC_NAME, VERSION); + fprintf(stderr, "%s v%s (libntfs %s)\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); while ((c = getopt(argc, argv, "c:fH:h?np:qS:s:vz:CFTIL:QVl")) != EOF) switch (c) { case 'n': diff --git a/ntfsprogs/ntfscat.c b/ntfsprogs/ntfscat.c index 809b17b2..ea59d903 100644 --- a/ntfsprogs/ntfscat.c +++ b/ntfsprogs/ntfscat.c @@ -2,7 +2,7 @@ * ntfscat - Part of the Linux-NTFS project. * * Copyright (c) 2003-2005 Richard Russon - * Copyright (c) 2003 Anton Altaparmakov + * Copyright (c) 2003-2005 Anton Altaparmakov * * This utility will concatenate files and print on the standard output. * @@ -44,6 +44,7 @@ #include "debug.h" #include "dir.h" #include "ntfscat.h" +#include "version.h" static const char *EXEC_NAME = "ntfscat"; static struct options opts; @@ -62,10 +63,11 @@ static GEN_PRINTF (Printf, stderr, NULL, FALSE) */ static void version (void) { - Printf ("\n%s v%s - Concatenate files and print on the standard output.\n\n", - EXEC_NAME, VERSION); - Printf ("Copyright (c) 2003 Richard Russon\n"); - Printf ("\n%s\n%s%s\n", ntfs_gpl, ntfs_bugs, ntfs_home); + Printf("\n%s v%s (libntfs %s) - Concatenate files and print on the " + "standard output.\n\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); + Printf("Copyright (c) 2003 Richard Russon\n"); + Printf("\n%s\n%s%s\n", ntfs_gpl, ntfs_bugs, ntfs_home); } /** diff --git a/ntfsprogs/ntfsclone.c b/ntfsprogs/ntfsclone.c index 6746b748..68854179 100644 --- a/ntfsprogs/ntfsclone.c +++ b/ntfsprogs/ntfsclone.c @@ -2,7 +2,7 @@ * ntfsclone - Part of the Linux-NTFS project. * * Copyright (c) 2003-2005 Szabolcs Szakacsits - * Copyright (c) 2004 Anton Altaparmakov + * Copyright (c) 2004-2005 Anton Altaparmakov * Special image format support copyright (c) 2004 Per Olofsson * * Clone NTFS data and/or metadata to a sparse file, image, device or stdout. @@ -65,6 +65,7 @@ #include "inode.h" #include "runlist.h" #include "utils.h" +#include "version.h" #if defined(linux) && defined(_IO) && !defined(BLKGETSIZE) #define BLKGETSIZE _IO(0x12,96) /* Get device size in 512-byte blocks. */ @@ -1443,7 +1444,8 @@ int main(int argc, char **argv) unsigned int wiped_total = 0; /* print to stderr, stdout can be an NTFS image ... */ - Eprintf("%s v%s\n", EXEC_NAME, VERSION); + Eprintf("%s v%s (libntfs %s)\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); msg_out = stderr; parse_options(argc, argv); diff --git a/ntfsprogs/ntfscluster.c b/ntfsprogs/ntfscluster.c index 0c7b86f1..2f0a0bbe 100644 --- a/ntfsprogs/ntfscluster.c +++ b/ntfsprogs/ntfscluster.c @@ -1,6 +1,7 @@ /** * ntfscluster - Part of the Linux-NTFS project. * + * Copyright (c) 2005 Anton Altaparmakov * Copyright (c) 2002-2003 Richard Russon * * This utility will locate the owner of any given sector or cluster. @@ -47,6 +48,7 @@ #include "debug.h" #include "dir.h" #include "cluster.h" +#include "version.h" static const char *EXEC_NAME = "ntfscluster"; static struct options opts; @@ -64,8 +66,9 @@ GEN_PRINTF (Qprintf, stdout, &opts.quiet, FALSE) */ static void version (void) { - printf ("\n%s v%s - Find the owner of any given sector or cluster.\n\n", - EXEC_NAME, VERSION); + printf("\n%s v%s (libntfs %s) - Find the owner of any given sector or " + "cluster.\n\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); printf ("Copyright (c) 2002-2003 Richard Russon\n"); printf ("\n%s\n%s%s\n", ntfs_gpl, ntfs_bugs, ntfs_home); } diff --git a/ntfsprogs/ntfscmp.c b/ntfsprogs/ntfscmp.c index c915b3b6..b65c9a04 100644 --- a/ntfsprogs/ntfscmp.c +++ b/ntfsprogs/ntfscmp.c @@ -1,10 +1,10 @@ /** * ntfscmp - compare two NTFS volumes. * + * Copyright (c) 2005 Anton Altaparmakov * Copyright (c) 2005 Szabolcs Szakacsits * * This utility is part of the Linux-NTFS project. - * */ #include "config.h" @@ -18,6 +18,7 @@ #include #include "utils.h" +#include "version.h" static const char *EXEC_NAME = "ntfscmp"; @@ -782,7 +783,8 @@ int main(int argc, char **argv) ntfs_volume *vol1; ntfs_volume *vol2; - printf("%s v%s\n", EXEC_NAME, VERSION); + printf("%s v%s (libntfs %s)\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); parse_options(argc, argv); diff --git a/ntfsprogs/ntfscp.c b/ntfsprogs/ntfscp.c index 676ae152..0b087fa0 100644 --- a/ntfsprogs/ntfscp.c +++ b/ntfsprogs/ntfscp.c @@ -50,6 +50,7 @@ #include "volume.h" #include "dir.h" #include "debug.h" +#include "version.h" struct options { char *device; /* Device/File to work with */ @@ -82,8 +83,8 @@ static GEN_PRINTF (Printf, stderr, NULL, FALSE) */ static void version (void) { - Printf ("\n%s v%s - Overwrite files on NTFS volume.\n\n", - EXEC_NAME, VERSION); + Printf("\n%s v%s (libntfs %s) - Overwrite files on NTFS volume.\n\n", + EXEC_NAME, VERSION, ntfs_libntfs_version()); Printf ("Copyright (c) 2004-2005 Yura Pakhuchiy\n"); Printf ("\n%s\n%s%s\n", ntfs_gpl, ntfs_bugs, ntfs_home); } diff --git a/ntfsprogs/ntfsdecrypt.c b/ntfsprogs/ntfsdecrypt.c index 72ce32e6..cb0af987 100644 --- a/ntfsprogs/ntfsdecrypt.c +++ b/ntfsprogs/ntfsdecrypt.c @@ -70,6 +70,7 @@ #include "debug.h" #include "dir.h" #include "layout.h" +#include "version.h" typedef gcry_sexp_t ntfs_rsa_private_key; @@ -128,8 +129,9 @@ static ntfschar EFS[5] = { */ static void version(void) { - Printf("\n%s v%s - Decrypt files and print on the standard output.\n\n", - EXEC_NAME, VERSION); + Printf("\n%s v%s (libntfs %s) - Decrypt files and print on the " + "standard output.\n\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); Printf("Copyright (c) 2005 Yuval Fledel\n"); Printf("Copyright (c) 2005 Anton Altaparmakov\n"); Printf("\n%s\n%s%s\n", ntfs_gpl, ntfs_bugs, ntfs_home); diff --git a/ntfsprogs/ntfsdump_logfile.c b/ntfsprogs/ntfsdump_logfile.c index 38d7d7ba..b2602a78 100644 --- a/ntfsprogs/ntfsdump_logfile.c +++ b/ntfsprogs/ntfsdump_logfile.c @@ -69,6 +69,7 @@ #include "logfile.h" #include "mst.h" #include "utils.h" +#include "version.h" typedef struct { BOOL is_volume; @@ -171,19 +172,20 @@ void log_err_exit(u8 *buf, const char *fmt, ...) void usage(const char *exec_name) __attribute__ ((noreturn)); void usage(const char *exec_name) { - Eprintf("%s v%s - Interpret and display information about the " - "journal\n($LogFile) of an NTFS volume.\n" - "Copyright (c) 2000-2004 Anton Altaparmakov.\n" - "%s is free software, released under the GNU General " - "Public License\nand you are welcome to redistribute " - "it under certain conditions.\n%s comes with " - "ABSOLUTELY NO WARRANTY; for details read the GNU\n" - "General Public License to be found in the file " - "COPYING in the main Linux-NTFS\ndistribution " - "directory.\nUsage: %s device\n e.g. %s /dev/hda6\n" - "Alternative usage: %s -f file\n e.g. %s -f " - "MyCopyOfTheLogFile\n", exec_name, VERSION, exec_name, - exec_name, exec_name, exec_name, exec_name, exec_name); + Eprintf("%s v%s (libntfs %s) - Interpret and display information " + "about the journal\n($LogFile) of an NTFS volume.\n" + "Copyright (c) 2000-2005 Anton Altaparmakov.\n" + "%s is free software, released under the GNU General " + "Public License\nand you are welcome to redistribute " + "it under certain conditions.\n%s comes with " + "ABSOLUTELY NO WARRANTY; for details read the GNU\n" + "General Public License to be found in the file " + "COPYING in the main Linux-NTFS\ndistribution " + "directory.\nUsage: %s device\n e.g. %s /dev/hda6\n" + "Alternative usage: %s -f file\n e.g. %s -f " + "MyCopyOfTheLogFile\n", exec_name, VERSION, + ntfs_libntfs_version(), exec_name, exec_name, + exec_name, exec_name, exec_name, exec_name); exit(1); } diff --git a/ntfsprogs/ntfsfix.c b/ntfsprogs/ntfsfix.c index 8fcee6ef..7cd574ad 100644 --- a/ntfsprogs/ntfsfix.c +++ b/ntfsprogs/ntfsfix.c @@ -73,6 +73,7 @@ #include "device.h" #include "logfile.h" #include "utils.h" +#include "version.h" #ifdef NO_NTFS_DEVICE_DEFAULT_IO_OPS # error "No default device io operations! Cannot build ntfsfix. \ @@ -97,7 +98,7 @@ struct { static int usage(void) __attribute__((noreturn)); static int usage(void) { - printf("%s v%s\n" + printf("%s v%s (libntfs %s)\n" "\n" "Usage: %s [options] device\n" " Attempt to fix an NTFS partition.\n" @@ -106,7 +107,8 @@ static int usage(void) " -V, --version Display version information\n" "\n" "For example: %s /dev/hda6\n\n", - EXEC_NAME, VERSION, EXEC_NAME, EXEC_NAME); + EXEC_NAME, VERSION, ntfs_libntfs_version(), EXEC_NAME, + EXEC_NAME); printf("%s%s", ntfs_bugs, ntfs_home); exit(1); } diff --git a/ntfsprogs/ntfsinfo.c b/ntfsprogs/ntfsinfo.c index 76af75f0..b5751796 100644 --- a/ntfsprogs/ntfsinfo.c +++ b/ntfsprogs/ntfsinfo.c @@ -2,7 +2,7 @@ * ntfsinfo - Part of the Linux-NTFS project. * * Copyright (c) 2002-2004 Matthew J. Fanto - * Copyright (c) 2002-2004 Anton Altaparmakov + * Copyright (c) 2002-2005 Anton Altaparmakov * Copyright (c) 2002-2005 Richard Russon * Copyright (c) 2004-2005 Yura Pakhuchiy * Copyright (c) 2005 Cristian Klein @@ -76,6 +76,7 @@ #include "mst.h" #include "dir.h" #include "ntfstime.h" +#include "version.h" static const char *EXEC_NAME = "ntfsinfo"; @@ -104,11 +105,12 @@ GEN_PRINTF (Qprintf, stdout, &opts.quiet, FALSE) */ static void version (void) { - printf ("\n%s v%s - Display information about an NTFS Volume.\n\n", - EXEC_NAME, VERSION); + printf ("\n%s v%s (libntfs %s) - Display information about an NTFS " + "Volume.\n\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); printf ("Copyright (c)\n"); printf (" 2002-2004 Matthew J. Fanto\n"); - printf (" 2002-2004 Anton Altaparmakov\n"); + printf (" 2002-2005 Anton Altaparmakov\n"); printf (" 2002-2003 Richard Russon\n"); printf (" 2003 Leonard NorrgÄrd\n"); printf (" 2004-2005 Yura Pakhuchiy\n"); diff --git a/ntfsprogs/ntfslabel.c b/ntfsprogs/ntfslabel.c index e8747cb5..8727ebc5 100644 --- a/ntfsprogs/ntfslabel.c +++ b/ntfsprogs/ntfslabel.c @@ -2,7 +2,7 @@ * ntfslabel - Part of the Linux-NTFS project. * * Copyright (c) 2002 Matthew J. Fanto - * Copyright (c) 2002-2004 Anton Altaparmakov + * Copyright (c) 2002-2005 Anton Altaparmakov * Copyright (c) 2002-2003 Richard Russon * * This utility will display/change the label on an NTFS partition. @@ -47,6 +47,7 @@ #include "debug.h" #include "mft.h" #include "utils.h" +#include "version.h" static const char *EXEC_NAME = "ntfslabel"; @@ -72,11 +73,12 @@ GEN_PRINTF (Qprintf, stdout, &opts.quiet, FALSE) */ static void version (void) { - printf ("\n%s v%s - Display, or set, the label for an NTFS Volume.\n\n", - EXEC_NAME, VERSION); + printf ("\n%s v%s (libntfs %s) - Display, or set, the label for an " + "NTFS Volume.\n\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); printf ("Copyright (c)\n"); printf (" 2002 Matthew J. Fanto\n"); - printf (" 2002-2004 Anton Altaparmakov\n"); + printf (" 2002-2005 Anton Altaparmakov\n"); printf (" 2002-2003 Richard Russon\n"); printf ("\n%s\n%s%s\n", ntfs_gpl, ntfs_bugs, ntfs_home); } diff --git a/ntfsprogs/ntfsls.c b/ntfsprogs/ntfsls.c index d5cada66..97752159 100644 --- a/ntfsprogs/ntfsls.c +++ b/ntfsprogs/ntfsls.c @@ -2,7 +2,7 @@ * ntfsls - Part of the Linux-NTFS project. * * Copyright (c) 2003 Lode Leroy - * Copyright (c) 2003 Anton Altaparmakov + * Copyright (c) 2003-2005 Anton Altaparmakov * Copyright (c) 2003 Richard Russon * Copyright (c) 2004 Carmelo Kintana * Copyright (c) 2004 Giang Nguyen @@ -51,6 +51,7 @@ #include "dir.h" #include "list.h" #include "ntfstime.h" +#include "version.h" static const char *EXEC_NAME = "ntfsls"; @@ -135,10 +136,11 @@ GEN_PRINTF(Qprintf, stdout, &opts.quiet, FALSE) */ static void version(void) { - printf("\n%s v%s - Display information about an NTFS Volume.\n\n", - EXEC_NAME, VERSION); + printf("\n%s v%s (libntfs %s) - Display information about an NTFS " + "Volume.\n\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); printf("Copyright (c) 2003 Lode Leroy\n"); - printf("Copyright (c) 2003 Anton Altaparmakov\n"); + printf("Copyright (c) 2003-2005 Anton Altaparmakov\n"); printf("Copyright (c) 2003 Richard Russon\n"); printf("Copyright (c) 2004 Carmelo Kintana\n"); printf("Copyright (c) 2004 Giang Nguyen\n"); diff --git a/ntfsprogs/ntfsmftalloc.c b/ntfsprogs/ntfsmftalloc.c index 8ecb10b2..07f2a59a 100644 --- a/ntfsprogs/ntfsmftalloc.c +++ b/ntfsprogs/ntfsmftalloc.c @@ -1,7 +1,7 @@ /** * ntfsmftalloc - Part of the Linux-NTFS project. * - * Copyright (c) 2002-2003 Anton Altaparmakov + * Copyright (c) 2002-2005 Anton Altaparmakov * * This utility will allocate and initialize an mft record. * @@ -63,6 +63,7 @@ #include "volume.h" #include "mft.h" #include "utils.h" +#include "version.h" static const char *EXEC_NAME = "ntfsmftalloc"; @@ -146,7 +147,7 @@ static void err_exit(const char *fmt, ...) */ static void copyright(void) { - fprintf(stderr, "Copyright (c) 2004 Anton Altaparmakov\n" + fprintf(stderr, "Copyright (c) 2004-2005 Anton Altaparmakov\n" "Allocate and initialize a base or an extent mft " "record. If a base mft record\nis not specified, a " "base mft record is allocated and initialized. " @@ -194,7 +195,8 @@ static void parse_options(int argc, char *argv[]) if (argc && *argv) EXEC_NAME = *argv; - fprintf(stderr, "%s v%s\n", EXEC_NAME, VERSION); + fprintf(stderr, "%s v%s (libntfs %s)\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); while ((c = getopt(argc, argv, "fh?nqvVl")) != EOF) switch (c) { case 'f': diff --git a/ntfsprogs/ntfsmount.c b/ntfsprogs/ntfsmount.c index e6c5f482..b615dc41 100644 --- a/ntfsprogs/ntfsmount.c +++ b/ntfsprogs/ntfsmount.c @@ -1,6 +1,7 @@ /** * ntfsmount - Part of the Linux-NTFS project. * + * Copyright (c) 2005 Anton Altaparmakov * Copyright (c) 2005 Yura Pakhuchiy * * NTFS module for FUSE. @@ -64,6 +65,7 @@ #include "layout.h" #include "index.h" #include "utils.h" +#include "version.h" #ifndef PATH_MAX #define PATH_MAX 4096 @@ -1322,8 +1324,8 @@ err_exit: static void usage(void) { - Eprintf("\n%s v%s - NTFS module for FUSE.\n\n", - EXEC_NAME, VERSION); + Eprintf("\n%s v%s (libntfs %s) - NTFS module for FUSE.\n\n", + EXEC_NAME, VERSION, ntfs_libntfs_version()); Eprintf("Copyright (c) 2005 Yura Pakhuchiy\n\n"); Eprintf("usage: %s device mount_point [-o options]\n\n", EXEC_NAME); diff --git a/ntfsprogs/ntfsmove.c b/ntfsprogs/ntfsmove.c index ab05c0e2..56dfccdb 100644 --- a/ntfsprogs/ntfsmove.c +++ b/ntfsprogs/ntfsmove.c @@ -2,7 +2,7 @@ * ntfsmove - Part of the Linux-NTFS project. * * Copyright (c) 2003 Richard Russon - * Copyright (c) 2003 Anton Altaparmakov + * Copyright (c) 2003-2005 Anton Altaparmakov * * This utility will move files on an NTFS volume. * @@ -45,6 +45,7 @@ #include "dir.h" #include "bitmap.h" #include "ntfsmove.h" +#include "version.h" static const char *EXEC_NAME = "ntfsmove"; static struct options opts; @@ -67,8 +68,9 @@ GEN_PRINTF (Qprintf, stdout, &opts.quiet, FALSE) */ static void version (void) { - printf ("\n%s v%s - Move files and directories on an NTFS volume.\n\n", - EXEC_NAME, VERSION); + printf ("\n%s v%s (libntfs %s) - Move files and directories on an " + "NTFS volume.\n\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); printf ("Copyright (c) 2003 Richard Russon\n"); printf ("\n%s\n%s%s\n", ntfs_gpl, ntfs_bugs, ntfs_home); } diff --git a/ntfsprogs/ntfsresize.c b/ntfsprogs/ntfsresize.c index 907a0499..c3d5643f 100644 --- a/ntfsprogs/ntfsresize.c +++ b/ntfsprogs/ntfsresize.c @@ -2,7 +2,7 @@ * ntfsresize - Part of the Linux-NTFS project. * * Copyright (c) 2002-2005 Szabolcs Szakacsits - * Copyright (c) 2002-2004 Anton Altaparmakov + * Copyright (c) 2002-2005 Anton Altaparmakov * Copyright (c) 2002-2003 Richard Russon * * This utility will resize an NTFS volume without data loss. @@ -64,6 +64,7 @@ #include "inode.h" #include "runlist.h" #include "utils.h" +#include "version.h" static const char *EXEC_NAME = "ntfsresize"; @@ -2334,7 +2335,8 @@ int main(int argc, char **argv) s64 device_size; /* in bytes */ ntfs_volume *vol; - printf("%s v%s\n", EXEC_NAME, VERSION); + printf("%s v%s (libntfs %s)\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); if (!parse_options(argc, argv)) return 1; diff --git a/ntfsprogs/ntfsrm.c b/ntfsprogs/ntfsrm.c index 6a0a6e21..164d50fc 100644 --- a/ntfsprogs/ntfsrm.c +++ b/ntfsprogs/ntfsrm.c @@ -1,6 +1,7 @@ /** * ntfsrm - Part of the Linux-NTFS project. * + * Copyright (c) 2005 Anton Altaparmakov * Copyright (c) 2004-2005 Richard Russon * * This utility will delete files from an NTFS volume. @@ -46,6 +47,7 @@ #include "lcnalloc.h" #include "mft.h" #include "ntfstime.h" +#include "version.h" static const char *EXEC_NAME = "ntfsrm"; static struct options opts; @@ -66,8 +68,8 @@ GEN_PRINTF (Qprintf, stdout, &opts.quiet, FALSE) */ static void version (void) { - printf ("\n%s v%s - Delete files from an NTFS volume.\n\n", - EXEC_NAME, VERSION); + printf("\n%s v%s (libntfs %s) - Delete files from an NTFS volume.\n\n", + EXEC_NAME, VERSION, ntfs_libntfs_version()); printf ("Copyright (c) 2004 Richard Russon\n"); printf ("\n%s\n%s%s\n", ntfs_gpl, ntfs_bugs, ntfs_home); } diff --git a/ntfsprogs/ntfstruncate.c b/ntfsprogs/ntfstruncate.c index 75663989..2acd49d5 100644 --- a/ntfsprogs/ntfstruncate.c +++ b/ntfsprogs/ntfstruncate.c @@ -1,7 +1,7 @@ /** * ntfstruncate - Part of the Linux-NTFS project. * - * Copyright (c) 2002-2003 Anton Altaparmakov + * Copyright (c) 2002-2005 Anton Altaparmakov * * This utility will truncate a specified attribute belonging to a * specified inode, i.e. file or directory, to a specified length. @@ -64,6 +64,7 @@ #include "layout.h" #include "volume.h" #include "utils.h" +#include "version.h" extern const unsigned char attrdef_ntfs12_array[2400]; @@ -156,7 +157,7 @@ static void err_exit(const char *fmt, ...) */ static void copyright(void) { - fprintf(stderr, "Copyright (c) 2002-2003 Anton Altaparmakov\n" + fprintf(stderr, "Copyright (c) 2002-2005 Anton Altaparmakov\n" "Copyright (c) 2003 Richard Russon\n" "Truncate a specified attribute of a specified " "inode.\n"); @@ -206,7 +207,8 @@ static void parse_options(int argc, char *argv[]) if (argc && *argv) EXEC_NAME = *argv; - fprintf(stderr, "%s v%s\n", EXEC_NAME, VERSION); + fprintf(stderr, "%s v%s (libntfs %s)\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); while ((c = getopt(argc, argv, "fh?nqvVl")) != EOF) switch (c) { case 'f': diff --git a/ntfsprogs/ntfsundelete.c b/ntfsprogs/ntfsundelete.c index 1a5164cf..d8d009b0 100644 --- a/ntfsprogs/ntfsundelete.c +++ b/ntfsprogs/ntfsundelete.c @@ -79,6 +79,7 @@ #include "utils.h" #include "debug.h" #include "ntfstime.h" +#include "version.h" static const char *EXEC_NAME = "ntfsundelete"; static const char *MFTFILE = "mft"; @@ -225,8 +226,9 @@ static int parse_inode_arg (void) */ static void version (void) { - printf ("\n%s v%s - Recover deleted files from an NTFS Volume.\n\n", - EXEC_NAME, VERSION); + printf("\n%s v%s (libntfs %s) - Recover deleted files from an NTFS " + "Volume.\n\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); printf ("Copyright (c) 2002-2005 Richard Russon\n" "Copyright (c) 2004-2005 Holger Ohmacht\n"); printf ("\n%s\n%s%s\n", ntfs_gpl, ntfs_bugs, ntfs_home); diff --git a/ntfsprogs/ntfswipe.c b/ntfsprogs/ntfswipe.c index 07f34e97..c83c1541 100644 --- a/ntfsprogs/ntfswipe.c +++ b/ntfsprogs/ntfswipe.c @@ -1,6 +1,7 @@ /** * ntfswipe - Part of the Linux-NTFS project. * + * Copyright (c) 2005 Anton Altaparmakov * Copyright (c) 2002-2003 Richard Russon * Copyright (c) 2004 Yura Pakhuchiy * @@ -53,6 +54,7 @@ #include "debug.h" #include "dir.h" #include "mst.h" +#include "version.h" static const char *EXEC_NAME = "ntfswipe"; static struct options opts; @@ -70,8 +72,9 @@ GEN_PRINTF (Qprintf, stdout, &opts.quiet, FALSE) */ static void version (void) { - printf ("\n%s v%s - Overwrite the unused space on an NTFS Volume.\n\n", - EXEC_NAME, VERSION); + printf("\n%s v%s (libntfs %s) - Overwrite the unused space on an NTFS " + "Volume.\n\n", EXEC_NAME, VERSION, + ntfs_libntfs_version()); printf ("Copyright (c) 2002-2003 Richard Russon\n"); printf ("Copyright (c) 2004 Yura Pakhuchiy\n"); printf ("\n%s\n%s%s\n", ntfs_gpl, ntfs_bugs, ntfs_home); diff --git a/ntfsprogs/utils.c b/ntfsprogs/utils.c index 4c558f5d..5bfbd15a 100644 --- a/ntfsprogs/utils.c +++ b/ntfsprogs/utils.c @@ -68,6 +68,7 @@ #include "volume.h" #include "debug.h" #include "dir.h" +#include "version.h" const char *ntfs_bugs = "Developers' email address: linux-ntfs-dev@lists.sourceforge.net\n"; const char *ntfs_home = "Linux NTFS homepage: http://linux-ntfs.sourceforge.net\n";