Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libext2fs: add gnu.translator support
[tools/e2fsprogs.git]
/
lib
/
ext2fs
/
nt_io.c
diff --git
a/lib/ext2fs/nt_io.c
b/lib/ext2fs/nt_io.c
index
4ef9541
..
234f6b1
100644
(file)
--- a/
lib/ext2fs/nt_io.c
+++ b/
lib/ext2fs/nt_io.c
@@
-1,15
+1,14
@@
/*
/*
-/*
* nt_io.c --- This is the Nt I/O interface to the I/O manager.
*
* Implements a one-block write-through cache.
*
* Copyright (C) 1993, 1994, 1995 Theodore Ts'o.
* nt_io.c --- This is the Nt I/O interface to the I/O manager.
*
* Implements a one-block write-through cache.
*
* Copyright (C) 1993, 1994, 1995 Theodore Ts'o.
- * Copyright (C) 1998 Andrey Shedel
+ * Copyright (C) 1998 Andrey Shedel
(andreys@ns.cr.cyco.com)
*
* %Begin-Header%
*
* %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%
*/
* %End-Header%
*/
@@
-179,7
+178,7
@@
NtDelayExecution(
#include <malloc.h>
#include <linux/types.h>
#include <malloc.h>
#include <linux/types.h>
-#include
<linux/ext2_fs.h>
+#include
"ext2_fs.h"
#include <errno.h>
#include "et/com_err.h"
#include <errno.h>
#include "et/com_err.h"
@@
-231,18
+230,16
@@
static errcode_t nt_write_blk(io_channel channel, unsigned long block,
static errcode_t nt_flush(io_channel channel);
static struct struct_io_manager struct_nt_manager = {
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
//
//
// function to get API
//
@@
-381,7
+378,7
@@
_MapNtStatus(
//
//
-// Helper functions to make things eas
y
er
+// Helper functions to make things eas
i
er
//
static
//
static
@@
-401,7
+398,7
@@
_OpenNtName(
IO_STATUS_BLOCK IoStatusBlock;
//
IO_STATUS_BLOCK IoStatusBlock;
//
- // Make Unicode name from in
l
ut string
+ // Make Unicode name from in
p
ut string
//
UnicodeString.Buffer = &Buffer[0];
//
UnicodeString.Buffer = &Buffer[0];
@@
-414,7
+411,7
@@
_OpenNtName(
if(!NT_SUCCESS(Status))
{
if(!NT_SUCCESS(Status))
{
- return Status; // Un
p
appable character?
+ return Status; // Un
m
appable character?
}
//
}
//
@@
-676,7
+673,7
@@
_NormalizeDeviceName(
else if('f' == *Device)
{
//
else if('f' == *Device)
{
//
- // 3-d lette
d
should be a digit.
+ // 3-d lette
r
should be a digit.
//
if((*(Device + 3) != '\0') ||
//
if((*(Device + 3) != '\0') ||
@@
-1192,11
+1189,7
@@
nt_open(const char *name, int flags, io_channel *channel)
if (NULL != io)
{
if (NULL != io)
{
- if(NULL != io->name)
- {
- free(io->name);
- }
-
+ free(io->name);
free(io);
}
free(io);
}
@@
-1208,11
+1201,7
@@
nt_open(const char *name, int flags, io_channel *channel)
_CloseDisk(NtData->Handle);
}
_CloseDisk(NtData->Handle);
}
- if(NULL != NtData->Buffer)
- {
- free(NtData->Buffer);
- }
-
+ free(NtData->Buffer);
free(NtData);
}
}
free(NtData);
}
}
@@
-1246,12
+1235,7
@@
nt_close(io_channel channel)
return 0;
}
return 0;
}
- if(NULL != channel->name)
- {
- free(channel->name);
- }
-
-
+ free(channel->name);
free(channel);
if (NULL != NtData)
free(channel);
if (NULL != NtData)
@@
-1263,11
+1247,7
@@
nt_close(io_channel channel)
_CloseDisk(NtData->Handle);
}
_CloseDisk(NtData->Handle);
}
- if(NULL != NtData->Buffer)
- {
- free(NtData->Buffer);
- }
-
+ free(NtData->Buffer);
free(NtData);
}
free(NtData);
}