3 * Copyright (C) 2002 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 /* $Id: autochk.c,v 1.2 2002/09/07 15:13:09 chorns Exp $
21 * COPYRIGHT: See COPYING in the top level directory
22 * PROJECT: ReactOS kernel
23 * FILE: apps/system/autochk/autochk.c
24 * PURPOSE: Filesystem checker
25 * PROGRAMMER: Eric Kohl
28 /* INCLUDES *****************************************************************/
30 #define NTOS_USER_MODE
33 /* FUNCTIONS ****************************************************************/
36 DisplayString(LPCWSTR lpwString
)
40 RtlInitUnicodeString(&us
, lpwString
);
46 PrintString(char* fmt
,...)
50 UNICODE_STRING UnicodeString
;
51 ANSI_STRING AnsiString
;
54 vsprintf(buffer
, fmt
, ap
);
57 RtlInitAnsiString(&AnsiString
, buffer
);
58 RtlAnsiStringToUnicodeString(&UnicodeString
,
61 NtDisplayString(&UnicodeString
);
62 RtlFreeUnicodeString(&UnicodeString
);
66 /* Native image's entry point */
69 NtProcessStartup(PPEB Peb
)
73 PrintString("Autochk 0.0.1\n");
75 for (i
= 0; i
< 26; i
++)
77 if ((SharedUserData
->DosDeviceMap
& (1 << i
)) &&
78 (SharedUserData
->DosDeviceDriveType
[i
] == DOSDEVICE_DRIVE_FIXED
))
80 PrintString(" Checking drive %c:", 'A'+i
);
86 NtTerminateProcess(NtCurrentProcess(), 0);