summaryrefslogtreecommitdiff
path: root/e2fsprogs/old_e2fsprogs/ext2fs/io_manager.c
diff options
context:
space:
mode:
authorDenys Vlasenko2015-07-19 23:12:51 +0200
committerDenys Vlasenko2015-07-19 23:12:51 +0200
commitce193f809b32368796a3aacf2ac8ba277f4c102a (patch)
tree6528caca18ddaf19d1326329ee4ab83dcd46f1ee /e2fsprogs/old_e2fsprogs/ext2fs/io_manager.c
parentd840c5d139cfa50fbe4f6f67c178b0edf0c690c8 (diff)
downloadbusybox-ce193f809b32368796a3aacf2ac8ba277f4c102a.zip
busybox-ce193f809b32368796a3aacf2ac8ba277f4c102a.tar.gz
Remove old_e2fsprogs/*
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'e2fsprogs/old_e2fsprogs/ext2fs/io_manager.c')
-rw-r--r--e2fsprogs/old_e2fsprogs/ext2fs/io_manager.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/e2fsprogs/old_e2fsprogs/ext2fs/io_manager.c b/e2fsprogs/old_e2fsprogs/ext2fs/io_manager.c
deleted file mode 100644
index b470386..0000000
--- a/e2fsprogs/old_e2fsprogs/ext2fs/io_manager.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * io_manager.c --- the I/O manager abstraction
- */
-
-#include <stdio.h>
-#include <string.h>
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <fcntl.h>
-#include <time.h>
-#if HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#include "ext2_fs.h"
-#include "ext2fs.h"
-
-errcode_t io_channel_set_options(io_channel channel, const char *opts)
-{
- errcode_t retval = 0;
- char *next, *ptr, *options, *arg;
-
- EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
-
- if (!opts)
- return 0;
-
- if (!channel->manager->set_option)
- return EXT2_ET_INVALID_ARGUMENT;
-
- options = malloc(strlen(opts)+1);
- if (!options)
- return EXT2_ET_NO_MEMORY;
- strcpy(options, opts);
- ptr = options;
-
- while (ptr && *ptr) {
- next = strchr(ptr, '&');
- if (next)
- *next++ = 0;
-
- arg = strchr(ptr, '=');
- if (arg)
- *arg++ = 0;
-
- retval = (channel->manager->set_option)(channel, ptr, arg);
- if (retval)
- break;
- ptr = next;
- }
- free(options);
- return retval;
-}
-
-errcode_t io_channel_write_byte(io_channel channel, unsigned long offset,
- int count, const void *data)
-{
- EXT2_CHECK_MAGIC(channel, EXT2_ET_MAGIC_IO_CHANNEL);
-
- if (channel->manager->write_byte)
- return channel->manager->write_byte(channel, offset,
- count, data);
-
- return EXT2_ET_UNIMPLEMENTED;
-}