]> www.infradead.org Git - mtd-utils.git/commit
mtdinfo: provide info when used without arguments
authorBrian Norris <computersforpeace@gmail.com>
Wed, 16 Nov 2011 20:03:57 +0000 (12:03 -0800)
committerArtem Bityutskiy <Artem.Bityutskiy@intel.com>
Thu, 17 Nov 2011 22:22:11 +0000 (00:22 +0200)
commit97bb4aa681f4df5e784c1f8a8db049a95a0d65c6
tree2aa2c8f9323f9fc764b1222be2c6303d65977d77
parentdad673ef6b39bab29c939cd70d8317107e56ef12
mtdinfo: provide info when used without arguments

If the user specifies neither a MTD argument nor the `-a' flag, we print
a cryptic message; i.e.,

    # mtdinfo
    libmtd: error!: cannot get information about "(null)"
            error 14 (Bad address)
    mtdinfo: error!: cannot get information about MTD device "(null)"
             error 14 (Bad address)

This is a regression; previously, mtdinfo would give some short info
about number of devices, etc. when used without arguments. To fix this,
we revert commit d53c03b0989f8354a7e4dbb947a150fc7fe3f6d1 and call
print_general_info() when no device is specified.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@intel.com>
ubi-utils/mtdinfo.c