projects
/
lwext4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
dc8bef5
)
Name refactiring inside file_windows module
author
gkostka
<kostka.grzegorz@gmail.com>
Wed, 5 Apr 2017 17:47:04 +0000
(19:47 +0200)
committer
gkostka
<kostka.grzegorz@gmail.com>
Wed, 5 Apr 2017 17:50:41 +0000
(19:50 +0200)
blockdev/windows/file_windows.c
patch
|
blob
|
history
fs_test/lwext4_generic.c
patch
|
blob
|
history
fs_test/lwext4_mbr.c
patch
|
blob
|
history
fs_test/lwext4_mkfs.c
patch
|
blob
|
history
fs_test/lwext4_server.c
patch
|
blob
|
history
diff --git
a/blockdev/windows/file_windows.c
b/blockdev/windows/file_windows.c
index 9178243134c1a618bc9c6ec76bd7d54cd6f6351d..91421320e445425c1366ce721ce52d6eaba59f62 100644
(file)
--- a/
blockdev/windows/file_windows.c
+++ b/
blockdev/windows/file_windows.c
@@
-47,19
+47,19
@@
static const char *fname = "ext2";
static HANDLE dev_file;
/**********************BLOCKDEV INTERFACE**************************************/
static HANDLE dev_file;
/**********************BLOCKDEV INTERFACE**************************************/
-static int
io_raw
_open(struct ext4_blockdev *bdev);
-static int
io_raw
_bread(struct ext4_blockdev *bdev, void *buf, uint64_t blk_id,
+static int
file
_open(struct ext4_blockdev *bdev);
+static int
file
_bread(struct ext4_blockdev *bdev, void *buf, uint64_t blk_id,
uint32_t blk_cnt);
uint32_t blk_cnt);
-static int
io_raw
_bwrite(struct ext4_blockdev *bdev, const void *buf,
+static int
file
_bwrite(struct ext4_blockdev *bdev, const void *buf,
uint64_t blk_id, uint32_t blk_cnt);
uint64_t blk_id, uint32_t blk_cnt);
-static int
io_raw
_close(struct ext4_blockdev *bdev);
+static int
file
_close(struct ext4_blockdev *bdev);
/******************************************************************************/
/******************************************************************************/
-EXT4_BLOCKDEV_STATIC_INSTANCE(_filedev, EXT4_IORAW_BSIZE, 0,
io_raw
_open,
-
io_raw_bread, io_raw_bwrite, io_raw
_close, 0, 0);
+EXT4_BLOCKDEV_STATIC_INSTANCE(_filedev, EXT4_IORAW_BSIZE, 0,
file
_open,
+
file_bread, file_bwrite, file
_close, 0, 0);
/******************************************************************************/
/******************************************************************************/
-static int
io_raw
_open(struct ext4_blockdev *bdev)
+static int
file
_open(struct ext4_blockdev *bdev)
{
char path[64];
DISK_GEOMETRY pdg;
{
char path[64];
DISK_GEOMETRY pdg;
@@
-101,7
+101,7
@@
static int io_raw_open(struct ext4_blockdev *bdev)
/******************************************************************************/
/******************************************************************************/
-static int
io_raw
_bread(struct ext4_blockdev *bdev, void *buf, uint64_t blk_id,
+static int
file
_bread(struct ext4_blockdev *bdev, void *buf, uint64_t blk_id,
uint32_t blk_cnt)
{
long hipart = blk_id >> (32 - 9);
uint32_t blk_cnt)
{
long hipart = blk_id >> (32 - 9);
@@
-125,7
+125,7
@@
static int io_raw_bread(struct ext4_blockdev *bdev, void *buf, uint64_t blk_id,
}
/******************************************************************************/
}
/******************************************************************************/
-static int
io_raw
_bwrite(struct ext4_blockdev *bdev, const void *buf,
+static int
file
_bwrite(struct ext4_blockdev *bdev, const void *buf,
uint64_t blk_id, uint32_t blk_cnt)
{
long hipart = blk_id >> (32 - 9);
uint64_t blk_id, uint32_t blk_cnt)
{
long hipart = blk_id >> (32 - 9);
@@
-149,16
+149,22
@@
static int io_raw_bwrite(struct ext4_blockdev *bdev, const void *buf,
}
/******************************************************************************/
}
/******************************************************************************/
-static int
io_raw
_close(struct ext4_blockdev *bdev)
+static int
file
_close(struct ext4_blockdev *bdev)
{
CloseHandle(dev_file);
return EOK;
}
/******************************************************************************/
{
CloseHandle(dev_file);
return EOK;
}
/******************************************************************************/
-struct ext4_blockdev *ext4_io_raw_dev_get(void) { return &_filedev; }
+struct ext4_blockdev *file_windows_dev_get(void)
+{
+ return &_filedev;
+}
/******************************************************************************/
/******************************************************************************/
-void ext4_io_raw_filename(const char *n) { fname = n; }
+void file_windows_name_set(const char *n)
+{
+ fname = n;
+}
/******************************************************************************/
#endif
/******************************************************************************/
#endif
diff --git
a/fs_test/lwext4_generic.c
b/fs_test/lwext4_generic.c
index cae40bd5299531c79ecdc115433bf7cd21c1de1a..a9bfb1b097246490951d0d17c5136703620a9b7d 100644
(file)
--- a/
fs_test/lwext4_generic.c
+++ b/
fs_test/lwext4_generic.c
@@
-130,8
+130,8
@@
static bool open_linux(void)
static bool open_windows(void)
{
#ifdef WIN32
static bool open_windows(void)
{
#ifdef WIN32
-
ext4_io_raw_filename
(input_name);
- bd =
ext4_io_raw
_dev_get();
+
file_windows_name_set
(input_name);
+ bd =
file_windows
_dev_get();
if (!bd) {
printf("open_winpartition: fail\n");
return false;
if (!bd) {
printf("open_winpartition: fail\n");
return false;
diff --git
a/fs_test/lwext4_mbr.c
b/fs_test/lwext4_mbr.c
index b84b6970c37929fb6e48e30fb9485d1b0be2f61a..9bb19b867d34d84fb81a60422020109cdbff8003 100644
(file)
--- a/
fs_test/lwext4_mbr.c
+++ b/
fs_test/lwext4_mbr.c
@@
-77,8
+77,8
@@
static bool open_linux(void)
static bool open_windows(void)
{
#ifdef WIN32
static bool open_windows(void)
{
#ifdef WIN32
-
ext4_io_raw_filename
(input_name);
- bd =
ext4_io_raw
_dev_get();
+
file_windows_name_set
(input_name);
+ bd =
file_windows
_dev_get();
if (!bd) {
printf("open_winpartition: fail\n");
return false;
if (!bd) {
printf("open_winpartition: fail\n");
return false;
diff --git
a/fs_test/lwext4_mkfs.c
b/fs_test/lwext4_mkfs.c
index be37ff06034bf0e137ceb80ae5301ec86019bde1..781e8dcd340471d168a15877d13e69584fa6315c 100644
(file)
--- a/
fs_test/lwext4_mkfs.c
+++ b/
fs_test/lwext4_mkfs.c
@@
-87,8
+87,8
@@
static bool open_linux(void)
static bool open_windows(void)
{
#ifdef WIN32
static bool open_windows(void)
{
#ifdef WIN32
-
ext4_io_raw_filename
(input_name);
- bd =
ext4_io_raw
_dev_get();
+
file_windows_name_set
(input_name);
+ bd =
file_windows
_dev_get();
if (!bd) {
printf("open_winpartition: fail\n");
return false;
if (!bd) {
printf("open_winpartition: fail\n");
return false;
diff --git
a/fs_test/lwext4_server.c
b/fs_test/lwext4_server.c
index fadeaaaaa91941b0962c00a17a7c1191422c4aba..2c923baef9285e7dd15111b30a22417e3ba13d13 100644
(file)
--- a/
fs_test/lwext4_server.c
+++ b/
fs_test/lwext4_server.c
@@
-393,8
+393,8
@@
static int device_register(const char *p)
#ifdef WIN32
if (winpart) {
#ifdef WIN32
if (winpart) {
-
ext4_io_raw_filename
(ext4_fname);
- bd =
ext4_io_raw
_dev_get();
+
file_windows_name_set
(ext4_fname);
+ bd =
file_windows
_dev_get();
} else
#endif
} else
#endif