ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

chkdsk.c
Go to the documentation of this file.
00001 /*
00002  *  ReactOS kernel
00003  *  Copyright (C) 2006 ReactOS Team
00004  *
00005  *  This program is free software; you can redistribute it and/or modify
00006  *  it under the terms of the GNU General Public License as published by
00007  *  the Free Software Foundation; either version 2 of the License, or
00008  *  (at your option) any later version.
00009  *
00010  *  This program is distributed in the hope that it will be useful,
00011  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *  GNU General Public License for more details.
00014  *
00015  *  You should have received a copy of the GNU General Public License along
00016  *  with this program; if not, write to the Free Software Foundation, Inc.,
00017  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00018  */
00019 /* COPYRIGHT:       See COPYING in the top level directory
00020  * PROJECT:         ReactOS text-mode setup
00021  * FILE:            subsys/system/usetup/chkdsk.c
00022  * PURPOSE:         Filesystem chkdsk support functions
00023  * PROGRAMMER:      Hervé Poussineau (hpoussin@reactos.org)
00024  */
00025 
00026 /* INCLUDES *****************************************************************/
00027 
00028 #include "usetup.h"
00029 
00030 #define NDEBUG
00031 #include <debug.h>
00032 
00033 static PPROGRESSBAR ChkdskProgressBar = NULL;
00034 
00035 /* FUNCTIONS ****************************************************************/
00036 
00037 static BOOLEAN NTAPI
00038 ChkdskCallback(
00039     IN CALLBACKCOMMAND Command,
00040     IN ULONG Modifier,
00041     IN PVOID Argument)
00042 {
00043     switch (Command)
00044     {
00045         default:
00046             DPRINT("Unknown callback %lu\n", (ULONG)Command);
00047             break;
00048     }
00049 
00050     return TRUE;
00051 }
00052 
00053 NTSTATUS
00054 ChkdskPartition(
00055     IN PUNICODE_STRING DriveRoot,
00056     IN PFILE_SYSTEM_ITEM FileSystem)
00057 {
00058     NTSTATUS Status;
00059 
00060     if (!FileSystem->ChkdskFunc)
00061         return STATUS_NOT_SUPPORTED;
00062 
00063     ChkdskProgressBar = CreateProgressBar(6,
00064                                           yScreen - 14,
00065                                           xScreen - 7,
00066                                           yScreen - 10,
00067                                           10,
00068                                           24,
00069                                           TRUE,
00070                                           MUIGetString(STRING_CHECKINGDISK));
00071 
00072     ProgressSetStepCount(ChkdskProgressBar, 100);
00073 
00074     Status = FileSystem->ChkdskFunc(DriveRoot,
00075                                     TRUE,            /* FixErrors */
00076                                     FALSE,           /* Verbose */
00077                                     FALSE,           /* CheckOnlyIfDirty */
00078                                     FALSE,           /* ScanDrive */
00079                                     ChkdskCallback); /* Callback */
00080 
00081     DestroyProgressBar(ChkdskProgressBar);
00082     ChkdskProgressBar = NULL;
00083 
00084     DPRINT("ChkdskPartition() finished with status 0x%08lx\n", Status);
00085 
00086     return Status;
00087 }
00088 
00089 /* EOF */

Generated on Mon May 28 2012 04:17:50 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.