Remove unused functions
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 8 Apr 2015 04:54:15 +0000 (06:54 +0200)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 8 Apr 2015 05:51:39 +0000 (07:51 +0200)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
contents.c
ext4fixup.c
make_ext4fs.c
make_ext4fs.h [deleted file]
make_ext4fs_main.c

index 1cde871..1e5361e 100644 (file)
@@ -24,7 +24,6 @@
 #define XATTR_CAPS_SUFFIX "capability"
 
 #include "ext4_utils.h"
 #define XATTR_CAPS_SUFFIX "capability"
 
 #include "ext4_utils.h"
-#include "make_ext4fs.h"
 #include "allocate.h"
 #include "contents.h"
 #include "extent.h"
 #include "allocate.h"
 #include "contents.h"
 #include "extent.h"
index 7d11b5d..c919176 100644 (file)
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 #include "ext4_utils.h"
  * limitations under the License.
  */
 #include "ext4_utils.h"
-#include "make_ext4fs.h"
 #include "ext4_extents.h"
 #include "allocate.h"
 #include "ext4fixup.h"
 #include "ext4_extents.h"
 #include "allocate.h"
 #include "ext4fixup.h"
index 5087811..553b066 100644 (file)
@@ -14,7 +14,6 @@
  * limitations under the License.
  */
 
  * limitations under the License.
  */
 
-#include "make_ext4fs.h"
 #include "ext4_utils.h"
 #include "allocate.h"
 #include "contents.h"
 #include "ext4_utils.h"
 #include "allocate.h"
 #include "contents.h"
@@ -312,48 +311,6 @@ static u32 compute_bg_desc_reserve_blocks()
        return bg_desc_reserve_blocks;
 }
 
        return bg_desc_reserve_blocks;
 }
 
-void reset_ext4fs_info() {
-       // Reset all the global data structures used by make_ext4fs so it
-       // can be called again.
-       memset(&info, 0, sizeof(info));
-       memset(&aux_info, 0, sizeof(aux_info));
-
-       if (ext4_sparse_file) {
-               sparse_file_destroy(ext4_sparse_file);
-               ext4_sparse_file = NULL;
-       }
-}
-
-int make_ext4fs_sparse_fd(int fd, long long len,
-                               const char *mountpoint)
-{
-       reset_ext4fs_info();
-       info.len = len;
-
-       return make_ext4fs_internal(fd, NULL, mountpoint, NULL, 0, 1, 0, 0, 0, -1, NULL);
-}
-
-int make_ext4fs(const char *filename, long long len,
-                               const char *mountpoint)
-{
-       int fd;
-       int status;
-
-       reset_ext4fs_info();
-       info.len = len;
-
-       fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
-       if (fd < 0) {
-               error_errno("open");
-               return EXIT_FAILURE;
-       }
-
-       status = make_ext4fs_internal(fd, NULL, mountpoint, NULL, 0, 0, 0, 1, 0, -1, NULL);
-       close(fd);
-
-       return status;
-}
-
 /* return a newly-malloc'd string that is a copy of str.  The new string
    is guaranteed to have a trailing slash.  If absolute is true, the new string
    is also guaranteed to have a leading slash.
 /* return a newly-malloc'd string that is a copy of str.  The new string
    is guaranteed to have a trailing slash.  If absolute is true, the new string
    is also guaranteed to have a leading slash.
diff --git a/make_ext4fs.h b/make_ext4fs.h
deleted file mode 100644 (file)
index 31de460..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2010 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef _MAKE_EXT4FS_H_
-#define _MAKE_EXT4FS_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int make_ext4fs(const char *filename, long long len,
-                const char *mountpoint);
-int make_ext4fs_sparse_fd(int fd, long long len,
-                const char *mountpoint);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
index ebfe813..e22167f 100644 (file)
@@ -25,7 +25,6 @@
 #include <sys/disk.h>
 #endif
 
 #include <sys/disk.h>
 #endif
 
-#include "make_ext4fs.h"
 #include "ext4_utils.h"
 #include "canned_fs_config.h"
 
 #include "ext4_utils.h"
 #include "canned_fs_config.h"