From f77eb379fd2994c78e3bb38de68ed0c5893338be Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 11 Mar 2012 18:49:11 +0000 Subject: Remove mksparse, it's almost entirely useless --- mksparse | 25 ------------------------- mksparse.1 | 31 ------------------------------- 2 files changed, 56 deletions(-) delete mode 100755 mksparse delete mode 100644 mksparse.1 diff --git a/mksparse b/mksparse deleted file mode 100755 index bc5e28f..0000000 --- a/mksparse +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/python - -import cliapp - - -class MakeSparseFile(cliapp.Application): - - def add_settings(self): - self.settings.bytesize(['size'], 'size of whole to append to file') - - def process_args(self, filenames): - if self.settings['size'] > 0: - for filename in filenames: - self.append_hole(filename, self.settings['size']) - - def append_hole(self, filename, size): - f = open(filename, 'r+b') - f.seek(size - 1, 2) - print 'pos:', f.tell() - f.write('\0') - f.close() - - -if __name__ == '__main__': - MakeSparseFile().run() diff --git a/mksparse.1 b/mksparse.1 deleted file mode 100644 index e7b54e4..0000000 --- a/mksparse.1 +++ /dev/null @@ -1,31 +0,0 @@ -.\" Copyright 2011 Lars Wirzenius -.\" -.\" This program is free software: you can redistribute it and/or modify -.\" it under the terms of the GNU General Public License as published by -.\" the Free Software Foundation, either version 3 of the License, or -.\" (at your option) any later version. -.\" -.\" This program is distributed in the hope that it will be useful, -.\" but WITHOUT ANY WARRANTY; without even the implied warranty of -.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -.\" GNU General Public License for more details. -.\" -.\" You should have received a copy of the GNU General Public License -.\" along with this program. If not, see . -.\" -.TH MKSPARSE 1 -.SH NAME -mksparse \- add a hole to the end of a file -.SH SYNOPSIS -.B mksparse -.RB [ \-\-size =\fISIZE\fR] -.SH DESCRIPTION -.B mksparse -appends a "whole" to the end of an existing file. -It appends one real NUL byte at the end of the whole. -.SH OPTIONS -.TP -.BR \-\-size "=\fISIZE" -Size of the whole to append. -The actual size is one byte less. - -- cgit v1.2.1