aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils/src/ubinfo.c
AgeCommit message (Collapse)Author
2011-06-27rewrite build system to avoid recursionMike Frysinger
The ubi-utils/src/ subdir is tossed as it just complicates things for no real gain. The dictionary.h header is relocated to the ubi-utils/include/ since other headers in there need it. The top level clean is replaced with a `find -delete` on objects, so it might prune more than necessary, but many projects now do this sort of thing and no one complained there. A "mkdep" helper generates the actual rule, and the variables are used with "foreach" to expand these automatically. The tests subdir is updated only to reflect the ubi-utils source move. Otherwise, it is left untouched as making that non-recursive isn't really worth the effort. While we're gutting things, also through in kbuild style output while building to make things more legible. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
2011-06-08ubi-utils: send help/version info to stdoutMike Frysinger
Usage/version information should go to stdout when it is expected behavior (i.e. the user requested it explicitly). This info should go to stderr only when the usage info is being shown as a result of incorrect options. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2011-04-09mtd-utils: switch ubi and ubifs tools to use common strtoX funcsArtem Bityutskiy
Instead of using strtol and Co directly, use our share simple_strtoX() helpers. This is just a cleanup. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2010-09-27ubi-utils: tweak const strings declsMike Frysinger
Shrink the data size a little by declaring addresses of constant strings instead of pointers to it. Also slip in static & const on long_options missing them. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2010-09-27mtd-utils: standardize PROGRAM_NAMEMike Frysinger
Make sure all the utils define PROGRAM_NAME and do so at the start of the file so that sub-headers may assume it exists. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2010-07-17libs: remove ubiutils-specific stuff from common.hArtem Bityutskiy
Now include/common.h contains things that really everyone can use. And all the stuff specific to ubi-utils is in ubi-utils/include/ubiutils-common.h Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2010-04-08ubinfo: document the new -N optionArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2010-04-08ubinfo: add -N option to get info by name of ubi volumeJon Ringle
Signed-off-by: Jon Ringle <jon@ringle.org> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-05-11ubi-utils: add sysfs interface support and new toolArtem Bityutskiy
This large commit makes several things. 1. Switches libmtd to use the new sysfs interface 2. Implements new handy 'mtdinfo' utility 3. Does minore amendmends in libubi and some ubi-tools. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-22libubi: improve errors handlingArtem Bityutskiy
Improve comments about what is returned if UBI device or node does not exist. Better check for ENODEV error code. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-22libubi: improve libubi_open interfaceArtem Bityutskiy
Remove the not very nice @required parameter, and add a possibility to distinguish between real errors and a situation when UBI is not present. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-20ubi-utils: rename ubi_node_typeArtem Bityutskiy
Re-name the 'ubi_node_type()' function to a more meaningful name: 'ubi_probe_node()'. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-04-20ubinfo: handle -d correctlyArtem Bityutskiy
Fix ubinfo utility and make it handle -d parameter correctly. Without this patch it simple refuses working with -d. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2009-03-17ubi-utils: re-arrange directory layoutArtem Bityutskiy
Move new-utils to ubi-utils and old ones to ubi-utils/old-utils. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-02-19Revert ubi-tools changesArtem Bityutskiy
Restore ubi tools to their "original" state, which means to the state they were before I stareted cleaning them up. Instead, create a "new-utils" subdirectory and move my work there. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-02-06ubi-tools: improve printing macrosArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-18ubi-utils: minor amendmentsArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2008-01-16ubi-utils: fix bytes outputArtem Bityutskiy
Fix incorrect output of ubinfo like "Amount of available logical eraseblocks: 00 bytes)" which should look like "Amount of available logical eraseblocks: 0 (0 bytes)" Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-26ubi-utils: add ubiattach and ubidetachArtem Bityutskiy
Add 2 new utilities to attach and detach UBI devices. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-23ubi-utils: few mor fixes and cleanupsArtem Bityutskiy
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-23ubi-utils: be backward-compatibleArtem Bityutskiy
Since control device is not supported by UBI in mainline kernels, we should not panic if it is absent. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-22ubi-utils: some renamesArtem Bityutskiy
Since there is often confusion what "eb" is - physical or logical eraseblock. Fix libubi and change "eb" to "leb". Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-22ubi-utils: fixes and cleanupsArtem Bityutskiy
This patch fixes a libubi bug and does some random minor cleanups. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
2007-12-22ubi-utils: introduce ubinfo utilityArtem Bityutskiy
Add new handy UBI utility which prints various type of UBI information. This commit also includes a lot of fixes and cleanups in libubi, and other utilities. It was quite complex to separate this all out and I figured that nobody anyway would really need this, and decided to save my time for more useful things. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>