- 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)
edge.strict_endians
antona 2005-10-07 14:10:56 +00:00
parent 3814896a5b
commit 0c293d0407
26 changed files with 170 additions and 79 deletions

View File

@ -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.

View File

@ -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)

View File

@ -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_ */

View File

@ -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)

View File

@ -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;
}

View File

@ -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':

View File

@ -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);
}
/**

View File

@ -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);

View File

@ -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);
}

View File

@ -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 <getopt.h>
#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);

View File

@ -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);
}

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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");

View File

@ -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);
}

View File

@ -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");

View File

@ -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':

View File

@ -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);

View File

@ -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);
}

View File

@ -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;

View File

@ -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);
}

View File

@ -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':

View File

@ -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);

View File

@ -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);

View File

@ -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";