Added help command to shell.exe.

Minor changes.

svn path=/trunk/; revision=1021
This commit is contained in:
Emanuele Aliberti 2000-02-29 23:57:47 +00:00
parent c37b4fd7f1
commit d53eeb0cee
11 changed files with 198 additions and 63 deletions

View file

@ -1,6 +1,6 @@
//======================================================================
//
// $Id: chkdsk.c,v 1.1 1999/05/16 07:27:35 ea Exp $
// $Id: chkdsk.c,v 1.2 2000/02/29 23:57:46 ea Exp $
//
// Chkdskx
//
@ -40,7 +40,7 @@
#define UNICODE
#include <windows.h>
#include <stdio.h>
#include "fmifs.h"
#include <fmifs.h>
#define _UNICODE 1
#include <tchar.h>
#include "config.h"
@ -63,7 +63,7 @@ WCHAR CurrentDirectory[1024];
//
// FMIFS function
//
PCHKDSK Chkdsk;
//PCHKDSK ChkDsk;
#endif /* ndef FMIFS_IMPORT_DLL */
@ -127,7 +127,7 @@ ParseCommandLine(
BOOLEAN gotFix = FALSE;
BOOLEAN gotVerbose = FALSE;
BOOLEAN gotClean = FALSE;
BOOLEAN gotScan = FALSE;
/*BOOLEAN gotScan = FALSE;*/
for ( i = 1;
@ -200,7 +200,7 @@ ParseCommandLine(
//
//----------------------------------------------------------------------
BOOLEAN
__stdcall
STDCALL
ChkdskCallback(
CALLBACKCOMMAND Command,
DWORD Modifier,
@ -217,21 +217,73 @@ ChkdskCallback(
//
switch( Command )
{
case UNKNOWN2:
wprintf(L"UNKNOWN2\r");
break;
case UNKNOWN3:
wprintf(L"UNKNOWN3\r");
break;
case UNKNOWN4:
wprintf(L"UNKNOWN4\r");
break;
case UNKNOWN5:
wprintf(L"UNKNOWN5\r");
break;
case UNKNOWN7:
wprintf(L"UNKNOWN7\r");
break;
case UNKNOWN8:
wprintf(L"UNKNOWN8\r");
break;
case UNKNOWN9:
wprintf(L"UNKNOWN9\r");
break;
case UNKNOWNA:
wprintf(L"UNKNOWNA\r");
break;
case UNKNOWNC:
wprintf(L"UNKNOWNC\r");
break;
case UNKNOWND:
wprintf(L"UNKNOWND\r");
break;
case INSUFFICIENTRIGHTS:
wprintf(L"INSUFFICIENTRIGHTS\r");
break;
case STRUCTUREPROGRESS:
wprintf(L"STRUCTUREPROGRESS\r");
break;
case DONEWITHSTRUCTURE:
wprintf(L"DONEWITHSTRUCTURE\r");
break;
case PROGRESS:
percent = (PDWORD) Argument;
_tprintf(L"%d percent completed.\r", *percent);
wprintf(L"%d percent completed.\r", *percent);
break;
case OUTPUT:
output = (PTEXTOUTPUT) Argument;
fprintf(stdout, "%s", output->Output);
fwprintf(stdout, L"%s", output->Output);
break;
case DONE:
status = (PBOOLEAN) Argument;
if( *status == TRUE ) {
_tprintf(L"Chkdsk was unable to complete successfully.\n\n");
if ( *status == TRUE )
{
wprintf(L"Chkdsk was unable to complete successfully.\n\n");
Error = TRUE;
}
break;
@ -246,7 +298,7 @@ ChkdskCallback(
//
// Loads FMIFS.DLL and locates the entry point(s) we are going to use
//
// 19990216 EA User wide functions
// 19990216 EA Used wide functions
//
//----------------------------------------------------------------------
BOOLEAN
@ -254,7 +306,7 @@ LoadFMIFSEntryPoints(VOID)
{
LoadLibraryW( L"fmifs.dll" );
if( !(Chkdsk =
if( !(ChkDsk =
(void *) GetProcAddress(
GetModuleHandleW(L"fmifs.dll"),
"Chkdsk" ))
@ -292,7 +344,7 @@ wmain( int argc, WCHAR *argv[] )
wprintf(
L"\n\
Chkdskx v1.0 by Mark Russinovich\n\
Chkdskx v1.0.1 by Mark Russinovich\n\
Systems Internals - http://www.sysinternals.com/\n\
ReactOS adaptation 1999 by Emanuele Aliberti\n\n"
);
@ -311,7 +363,10 @@ ReactOS adaptation 1999 by Emanuele Aliberti\n\n"
//
if( (badArg = ParseCommandLine( argc, argv )))
{
wprintf(L"Unknown argument: %s\n", argv[badArg] );
wprintf(
L"Unknown argument: %s\n",
argv[badArg]
);
Usage(argv[0]);
return -1;
@ -386,7 +441,7 @@ ReactOS adaptation 1999 by Emanuele Aliberti\n\n"
);
if( volumeHandle == INVALID_HANDLE_VALUE )
{
wprintf("Chdskx cannot run because the volume is in use by another process.\n\n");
wprintf(L"Chdskx cannot run because the volume is in use by another process.\n\n");
return -1;
}
CloseHandle( volumeHandle );
@ -401,10 +456,10 @@ ReactOS adaptation 1999 by Emanuele Aliberti\n\n"
// Just do it
//
wprintf(
"The type of file system is %s.\n",
L"The type of file system is %s.\n",
fileSystem
);
Chkdsk(
ChkDsk(
Drive,
fileSystem,
FixErrors,

View file

@ -1,4 +1,4 @@
/* $Id: chklib.c,v 1.1 1999/05/16 07:27:35 ea Exp $
/* $Id: chklib.c,v 1.2 2000/02/29 23:57:46 ea Exp $
*
* chklib.c
*
@ -7,17 +7,17 @@
* --------------------------------------------------------------------
*
* This software is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public License as
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
* General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this software; see the file COPYING.LIB. If
* You should have received a copy of the GNU General Public
* License along with this software; see the file COPYING. If
* not, write to the Free Software Foundation, Inc., 675 Mass Ave,
* Cambridge, MA 02139, USA.
*
@ -132,7 +132,7 @@ main(
HINSTANCE dll;
TCHAR ModuleName [_MAX_PATH];
if (argc != 2 && argc != 3)
if (argc < 2)
{
fprintf(
stderr,
@ -140,7 +140,7 @@ main(
ReactOS System Tools\n\
Check a Dynamic Link Library (DLL) for loading\n\
Copyright (c) 1998, 1999 Emanuele Aliberti\n\n\
usage: %s module [symbol]\n",
usage: %s module [symbol [, ...]]\n",
argv[0]
);
exit(EXIT_FAILURE);
@ -173,7 +173,18 @@ usage: %s module [symbol]\n",
#ifdef DISPLAY_VERSION
DisplayVersion(dll,ModuleName);
#endif
if (argc == 3) DisplayEntryPoint( dll, argv[2] );
if (argc > 2)
{
int CurrentSymbol;
for ( CurrentSymbol = 2;
(CurrentSymbol < argc);
++CurrentSymbol
)
{
DisplayEntryPoint( dll, argv[CurrentSymbol] );
}
}
FreeLibrary(dll);
printf(
"%s unloaded.\n",

View file

@ -1,6 +1,6 @@
//======================================================================
//
// $Id: format.c,v 1.1 1999/05/16 07:27:35 ea Exp $
// $Id: format.c,v 1.2 2000/02/29 23:57:46 ea Exp $
//
// Formatx
//
@ -38,7 +38,7 @@
#define _UNICODE 1
#include <windows.h>
#include <stdio.h>
#include "fmifs.h"
#include "../../reactos/include/fmifs.h"
//#include <tchar.h>
#include "win32err.h"
#include "config.h"

View file

@ -1,4 +1,4 @@
# $Id: makefile,v 1.2 1999/10/03 22:12:07 ekohl Exp $
# $Id: makefile,v 1.3 2000/02/29 23:57:47 ea Exp $
#
# ReactOS System Utilities
#
@ -12,10 +12,13 @@
# 1999-03-16 (Emanuele Aliberti)
# Added regnav.c
#
# 1999-12-19 (ea)
# Added qsi.c
#
ROSINC=../../reactos/include
TARGET=regnav.exe
TARGET=regnav.exe chklib.exe
# chkdsk.exe format.exe \
# chklib.exe shutdown.exe regnav.exe
# login.exe chklib.exe shutdown.exe regnav.exe
@ -39,14 +42,8 @@ format.exe: format.o win32err.o wmain.o
-lcrtdll \
-lfmifs
$(NM) --numeric-sort format.exe > format.sym
#---
#login.exe: login.o
# $(CC) login.o \
# -o login.exe \
# -lntdll \
# -Wl,--subsystem native:4.0
# $(NM) --numeric-sort login.exe > login.sym
#---
chklib.exe: chklib.o win32err.o
$(CC) chklib.o win32err.o \
@ -72,6 +69,16 @@ shutdown.exe: shutdown.o win32err.o
-lcrtdll
$(NM) --numeric-sort shutdown.exe > shutdown.sym
qsi.exe: qsi.o
$(CC) qsi.o \
../../reactos/lib/ntdll/ntdll.a
-o qsi.exe \
-lkernel32 \
-lcrtdll
$(NM) --numeric-sort qsi.exe > qsi.sym
qsi.o: qsi.c
#---
CLEAN_FILES = *.o *.exe *.sym