* Copyright (C) 1998 Andrey Shedel (andreys@ns.cr.cyco.com)
*
* %Begin-Header%
- * This file may be redistributed under the terms of the GNU Public
- * License.
+ * This file may be redistributed under the terms of the GNU Library
+ * General Public License, version 2.
* %End-Header%
*/
#include <malloc.h>
#include <linux/types.h>
-#include <linux/ext2_fs.h>
+#include "ext2_fs.h"
#include <errno.h>
#include "et/com_err.h"
static errcode_t nt_flush(io_channel channel);
static struct struct_io_manager struct_nt_manager = {
- EXT2_ET_MAGIC_IO_MANAGER,
- "NT I/O Manager",
- nt_open,
- nt_close,
- nt_set_blksize,
- nt_read_blk,
- nt_write_blk,
- nt_flush
+ .magic = EXT2_ET_MAGIC_IO_MANAGER,
+ .name = "NT I/O Manager",
+ .open = nt_open,
+ .close = nt_close,
+ .set_blksize = nt_set_blksize,
+ .read_blk = nt_read_blk,
+ .write_blk = nt_write_blk,
+ .flush = nt_flush
};
-
-
//
// function to get API
//
//
-// Helper functions to make things easyer
+// Helper functions to make things easier
//
static
IO_STATUS_BLOCK IoStatusBlock;
//
- // Make Unicode name from inlut string
+ // Make Unicode name from input string
//
UnicodeString.Buffer = &Buffer[0];
if(!NT_SUCCESS(Status))
{
- return Status; // Unpappable character?
+ return Status; // Unmappable character?
}
//
else if('f' == *Device)
{
//
- // 3-d letted should be a digit.
+ // 3-d letter should be a digit.
//
if((*(Device + 3) != '\0') ||
if (NULL != io)
{
- if(NULL != io->name)
- {
- free(io->name);
- }
-
+ free(io->name);
free(io);
}
_CloseDisk(NtData->Handle);
}
- if(NULL != NtData->Buffer)
- {
- free(NtData->Buffer);
- }
-
+ free(NtData->Buffer);
free(NtData);
}
}
return 0;
}
- if(NULL != channel->name)
- {
- free(channel->name);
- }
-
-
+ free(channel->name);
free(channel);
if (NULL != NtData)
_CloseDisk(NtData->Handle);
}
- if(NULL != NtData->Buffer)
- {
- free(NtData->Buffer);
- }
-
+ free(NtData->Buffer);
free(NtData);
}