Changes by: szaka
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24286/ntfsprogs
Modified Files:
ntfsinfo.8.in ntfsinfo.c ntfsls.8.in ntfsls.c
Log Message:
ntfsinfo and ntfsls follow the convention how other utilities read
the device argument: no -d or --device option is needed
Index: ntfsinfo.8.in
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsinfo.8.in,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- ntfsinfo.8.in 11 May 2004 09:21:24 -0000 1.9
+++ ntfsinfo.8.in 28 Oct 2005 18:00:44 -0000 1.10
@@ -7,10 +7,10 @@
ntfsinfo \- dump a file's attributes
.SH SYNOPSIS
.B ntfsinfo
-.I -d device
.I -i inode-number
.I -F path-filename
.I -m
+.I device
.SH DESCRIPTION
.B ntfsinfo
will dump the attributes of inode
Index: ntfsinfo.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsinfo.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -p -r1.85 -r1.86
--- ntfsinfo.c 28 Oct 2005 16:47:41 -0000 1.85
+++ ntfsinfo.c 28 Oct 2005 18:00:44 -0000 1.86
@@ -121,8 +121,7 @@ static void version(void)
*/
static void usage(void)
{
- printf("\nUsage: %s [options] -d dev\n"
- " -d dev --device dev The ntfs volume to display information about\n"
+ printf("\nUsage: %s [options] device\n"
" -i num --inode num Display information about this inode\n"
" -F file --file file Display information about this file (absolute path)\n"
" -m --mft Dump information about the volume\n"
@@ -148,9 +147,8 @@ static void usage(void)
*/
static int parse_options(int argc, char *argv[])
{
- static const char *sopt = "-:fhi:F:mqtTvVd:";
+ static const char *sopt = "-:fhi:F:mqtTvV";
static const struct option lopt[] = {
- { "device", required_argument, NULL, 'd' },
{ "force", no_argument, NULL, 'f' },
{ "help", no_argument, NULL, 'h' },
{ "inode", required_argument, NULL, 'i' },
@@ -178,9 +176,9 @@ static int parse_options(int argc, char
ntfs_log_trace("optind=%d; c='%c' optarg=\"%s\".\n", optind, c,
optarg);
switch (c) {
- case 'd':
+ case 1:
if (!opts.device)
- opts.device = argv[optind-1];
+ opts.device = optarg;
else
err++;
break;
Index: ntfsls.8.in
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsls.8.in,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- ntfsls.8.in 10 Mar 2004 23:37:54 -0000 1.7
+++ ntfsls.8.in 28 Oct 2005 18:00:44 -0000 1.8
@@ -2,7 +2,7 @@
.\" Copyright (c) 2003 Anton Altaparmakov. All Rights Reserved.
.\" This file may be copied under the terms of the GNU Public License.
.\"
-.TH NTFSLS 8 "August 2003" "ntfsprogs version @VERSION@"
+.TH NTFSLS 8 "October 2005" "ntfsprogs version @VERSION@"
.SH NAME
ntfsls \- list directory contents on an NTFS filesystem
.SH SYNOPSIS
@@ -70,9 +70,6 @@ ntfsls \- list directory contents on an
|
.B \-\-dos
]
-.B \-d
-|
-.B \-\-device
.I DEVICE
.SH DESCRIPTION
.B ntfsls
@@ -81,7 +78,8 @@ is used to list information about the fi
option (the root directory by default).
.I DEVICE
is the special file corresponding to the device (e.g
-.IR /dev/hdXX ).
+.IR /dev/hdXX )
+or an NTFS image file.
.SH OPTIONS
.TP
.B \-a, \-\-all
@@ -129,15 +127,6 @@ Display more debug/warning/error message
.B \-x, \-\-dos
Display short file names, i.e. files in the DOS namespace, instead of long
file names, i.e. files in the WIN32 namespace.
-.TP
-.BI "\-d, \-\-device" " DEVICE"
-The special file corresponding to the device that contains the NTFS partition
-to read. If you want to use an image of an NTFS partition stored on a normal
-file, you will also need to specify the
-.B \-f
-or
-.B \-\-force
-options.
.SH BUGS
We are not aware of any bugs. If you find a bug, please report it to
<lin...@li...>. Thank you.
Index: ntfsls.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsls.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -p -r1.33 -r1.34
--- ntfsls.c 28 Oct 2005 12:55:42 -0000 1.33
+++ ntfsls.c 28 Oct 2005 18:00:44 -0000 1.34
@@ -156,10 +156,9 @@ static void version(void)
*/
static void usage(void)
{
- printf("\nUsage: %s [options] -d /dev/hda1\n"
+ printf("\nUsage: %s [options] device\n"
"\n"
" -a --all Display all files\n"
- " -d DEVICE --device DEVICE NTFS volume\n"
" -F --classify Display classification\n"
" -f --force Use less caution\n"
" -h -? --help Display this help\n"
@@ -191,10 +190,9 @@ static void usage(void)
*/
static int parse_options(int argc, char *argv[])
{
- static const char *sopt = "-ad:Ffh?ilp:qRsVvx";
+ static const char *sopt = "-aFfh?ilp:qRsVvx";
static const struct option lopt[] = {
{ "all", no_argument, NULL, 'a' },
- { "device", required_argument, NULL, 'd' },
{ "classify", no_argument, NULL, 'F' },
{ "force", no_argument, NULL, 'f' },
{ "help", no_argument, NULL, 'h' },
@@ -223,8 +221,11 @@ static int parse_options(int argc, char
while ((c = getopt_long(argc, argv, sopt, lopt, NULL)) != (char)-1) {
switch (c) {
- case 'd':
- opts.device = optarg;
+ case 1:
+ if (!opts.device)
+ opts.device = optarg;
+ else
+ err++;
break;
case 'p':
opts.path = optarg;
|