| 120 | } |
| 121 | |
| 122 | VOID |
| 123 | Ext2StartFloppyFlushDpc ( |
| 124 | PEXT2_VCB Vcb, |
| 125 | PEXT2_FCB Fcb, |
| 126 | PFILE_OBJECT FileObject ) |
| 127 | { |
| 128 | LARGE_INTEGER OneSecond; |
| 129 | PEXT2_FLPFLUSH_CONTEXT Context; |
| 130 | |
| 131 | ASSERT(IsFlagOn(Vcb->Flags, VCB_FLOPPY_DISK)); |
| 132 | |
| 133 | Context = Ext2AllocatePool( |
| 134 | NonPagedPool, |
| 135 | sizeof(EXT2_FLPFLUSH_CONTEXT), |
| 136 | EXT2_FLPFLUSH_MAGIC |
| 137 | ); |
| 138 | |
| 139 | if (!Context) { |
| 140 | DEBUG(DL_ERR, ( "Ex2StartFloppy...: failed to allocate Context\n")); |
| 141 | DbgBreak(); |
| 142 | return; |
| 143 | } |
| 144 | |
| 145 | KeInitializeTimer(&Context->Timer); |
| 146 | |
| 147 | KeInitializeDpc( &Context->Dpc, |
| 148 | Ext2FloppyFlushDpc, |
| 149 | Context ); |
| 150 | |
| 151 | ExInitializeWorkItem( &Context->Item, |
| 152 | Ext2FloppyFlush, |
| 153 | Context ); |
| 154 | |
| 155 | Context->Vcb = Vcb; |
| 156 | Context->Fcb = Fcb; |
| 157 | Context->FileObject = FileObject; |
| 158 | |
| 159 | if (FileObject) { |
| 160 | ObReferenceObject(FileObject); |
| 161 | } |
| 162 | |
| 163 | OneSecond.QuadPart = (LONGLONG)-1*1000*1000*10; |
| 164 | KeSetTimer( &Context->Timer, |
| 165 | OneSecond, |
| 166 | &Context->Dpc ); |
| 167 | } |
| 168 | |
| 169 | BOOLEAN |
| 170 | Ext2ZeroData ( |
no test coverage detected