Rename bmap to bmaptool
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Thu, 8 Nov 2012 14:06:15 +0000 (16:06 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Thu, 8 Nov 2012 17:01:22 +0000 (19:01 +0200)
The word 'bmap' is already reserved for the bmap file, it is bad idea to use
it for the tool. Let's call the tool 'bmaptool' instead.

Change-Id: I0c6fb70bdf3bbdcba11985c0b646f9e5a538c872
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
bmaptool [moved from bmap with 94% similarity]
debian/bmap-tools.install
setup.py

diff --git a/bmap b/bmaptool
similarity index 94%
rename from bmap
rename to bmaptool
index 1af2d4d..92b1f98 100755 (executable)
--- a/bmap
+++ b/bmaptool
@@ -95,12 +95,12 @@ def copy_command(args, log):
 
 def create_command(args, log):
     """ Generate block map (AKA bmap) for an image. The idea is that while
-    images may be very large (e.g., 4GiB), they may nevertheless contain only
-    little real data, e.g., 512MiB. This data are files, directories,
-    file-system meta-data, partition table, etc. When copying the image to the
-    target device, you do not have to copy all the 4GiB of data, you can copy
-    only 512MiB of it, which is 4 times less, so copying should presumably be 4
-    times faster.
+    images files may generally be very large (e.g., 4GiB), they may
+    nevertheless contain only little real data, e.g., 512MiB. This data are
+    files, directories, file-system meta-data, partition table, etc. When
+    copying the image to the target device, you do not have to copy all the
+    4GiB of data, you can copy only 512MiB of it, which is 4 times less, so
+    copying should presumably be 4 times faster.
 
     The block map file is an XML file which contains a list of blocks which
     have to be copied to the target device. The other blocks are not used and
@@ -142,7 +142,7 @@ def create_command(args, log):
 def parse_arguments():
     """ A helper function which parses the input arguments. """
 
-    parser = argparse.ArgumentParser(description = __doc__, prog = 'bmap')
+    parser = argparse.ArgumentParser(description = __doc__, prog = 'bmaptool')
 
     # The --version option
     parser.add_argument("--version", action = "version", \
@@ -213,7 +213,7 @@ def setup_logger(loglevel):
 
     log = logging.getLogger('bmap-logger')
     log.setLevel(loglevel)
-    formatter = logging.Formatter("bmap: %(levelname)s: %(message)s")
+    formatter = logging.Formatter("bmaptool: %(levelname)s: %(message)s")
     where = logging.StreamHandler(sys.stderr)
     where.setFormatter(formatter)
     log.addHandler(where)
index 3ebbd3a..9d7cdaa 100644 (file)
@@ -1 +1 @@
-bmap usr/bin
+bmaptool usr/bin
index 4204672..1c676a6 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -8,7 +8,7 @@ setup(
     author = "Artem Bityutskiy",
     author_email = "artem.bityutskiy@linux.intel.com",
     version = "0.1.0",
-    scripts = ['bmap'],
+    scripts = ['bmaptool'],
     packages = find_packages(),
     license='GPLv2',
     long_description="Tools to generate block map (AKA bmap) and copy " \