Skip to content

Commit e97166f

Browse files
committed
Remove unused functions
Signed-off-by: Jo-Philipp Wich <[email protected]>
1 parent d8400e1 commit e97166f

File tree

5 files changed

+0
-79
lines changed

5 files changed

+0
-79
lines changed

contents.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#define XATTR_CAPS_SUFFIX "capability"
2525

2626
#include "ext4_utils.h"
27-
#include "make_ext4fs.h"
2827
#include "allocate.h"
2928
#include "contents.h"
3029
#include "extent.h"

ext4fixup.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*/
1616
#include "ext4_utils.h"
17-
#include "make_ext4fs.h"
1817
#include "ext4_extents.h"
1918
#include "allocate.h"
2019
#include "ext4fixup.h"

make_ext4fs.c

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* limitations under the License.
1515
*/
1616

17-
#include "make_ext4fs.h"
1817
#include "ext4_utils.h"
1918
#include "allocate.h"
2019
#include "contents.h"
@@ -312,48 +311,6 @@ static u32 compute_bg_desc_reserve_blocks()
312311
return bg_desc_reserve_blocks;
313312
}
314313

315-
void reset_ext4fs_info() {
316-
// Reset all the global data structures used by make_ext4fs so it
317-
// can be called again.
318-
memset(&info, 0, sizeof(info));
319-
memset(&aux_info, 0, sizeof(aux_info));
320-
321-
if (ext4_sparse_file) {
322-
sparse_file_destroy(ext4_sparse_file);
323-
ext4_sparse_file = NULL;
324-
}
325-
}
326-
327-
int make_ext4fs_sparse_fd(int fd, long long len,
328-
const char *mountpoint)
329-
{
330-
reset_ext4fs_info();
331-
info.len = len;
332-
333-
return make_ext4fs_internal(fd, NULL, mountpoint, NULL, 0, 1, 0, 0, 0, -1, NULL);
334-
}
335-
336-
int make_ext4fs(const char *filename, long long len,
337-
const char *mountpoint)
338-
{
339-
int fd;
340-
int status;
341-
342-
reset_ext4fs_info();
343-
info.len = len;
344-
345-
fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC, 0644);
346-
if (fd < 0) {
347-
error_errno("open");
348-
return EXIT_FAILURE;
349-
}
350-
351-
status = make_ext4fs_internal(fd, NULL, mountpoint, NULL, 0, 0, 0, 1, 0, -1, NULL);
352-
close(fd);
353-
354-
return status;
355-
}
356-
357314
/* return a newly-malloc'd string that is a copy of str. The new string
358315
is guaranteed to have a trailing slash. If absolute is true, the new string
359316
is also guaranteed to have a leading slash.

make_ext4fs.h

Lines changed: 0 additions & 33 deletions
This file was deleted.

make_ext4fs_main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#include <sys/disk.h>
2626
#endif
2727

28-
#include "make_ext4fs.h"
2928
#include "ext4_utils.h"
3029
#include "canned_fs_config.h"
3130

0 commit comments

Comments
 (0)