diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-06-03 11:32:21 +0300 |
---|---|---|
committer | Artem Bityutskiy <dedekind1@gmail.com> | 2011-07-04 10:54:32 +0300 |
commit | 891a54a153646f9b16bffe5df6cb74cb3f1e9dc6 (patch) | |
tree | e61849c41a6301e6bfb757ec043b9debc5160963 /fs/ubifs/debug.c | |
parent | e7717060ddd509e6c305ad7bf5a090a95e91c8cf (diff) | |
download | lwn-891a54a153646f9b16bffe5df6cb74cb3f1e9dc6.tar.gz lwn-891a54a153646f9b16bffe5df6cb74cb3f1e9dc6.zip |
UBIFS: remove unused and unneeded debugging function
This patch contains several minor clean-up and preparational cahnges.
1. Remove 'dbg_read()', 'dbg_write()', 'dbg_change()', and 'dbg_leb_erase()'
functions as they are not used.
2. Remove 'dbg_leb_read()' and 'dbg_is_mapped()' as they are not really needed,
it is fine to let reads go through in failure mode.
3. Rename 'offset' argument to 'offs' to be consistent with the rest of UBIFS
code.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/debug.c')
-rw-r--r-- | fs/ubifs/debug.c | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index 15bec635bf3e..059c586b5ef8 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c @@ -2718,16 +2718,8 @@ static void cut_data(const void *buf, int len) p[i] = 0xff; } -int dbg_leb_read(struct ubi_volume_desc *desc, int lnum, char *buf, int offset, - int len, int check) -{ - if (in_failure_mode(desc)) - return -EROFS; - return ubi_leb_read(desc, lnum, buf, offset, len, check); -} - int dbg_leb_write(struct ubi_volume_desc *desc, int lnum, const void *buf, - int offset, int len, int dtype) + int offs, int len, int dtype) { int err, failing; @@ -2736,7 +2728,7 @@ int dbg_leb_write(struct ubi_volume_desc *desc, int lnum, const void *buf, failing = do_fail(desc, lnum, 1); if (failing) cut_data(buf, len); - err = ubi_leb_write(desc, lnum, buf, offset, len, dtype); + err = ubi_leb_write(desc, lnum, buf, offs, len, dtype); if (err) return err; if (failing) @@ -2759,20 +2751,6 @@ int dbg_leb_change(struct ubi_volume_desc *desc, int lnum, const void *buf, return 0; } -int dbg_leb_erase(struct ubi_volume_desc *desc, int lnum) -{ - int err; - - if (do_fail(desc, lnum, 0)) - return -EROFS; - err = ubi_leb_erase(desc, lnum); - if (err) - return err; - if (do_fail(desc, lnum, 0)) - return -EROFS; - return 0; -} - int dbg_leb_unmap(struct ubi_volume_desc *desc, int lnum) { int err; @@ -2787,13 +2765,6 @@ int dbg_leb_unmap(struct ubi_volume_desc *desc, int lnum) return 0; } -int dbg_is_mapped(struct ubi_volume_desc *desc, int lnum) -{ - if (in_failure_mode(desc)) - return -EROFS; - return ubi_is_mapped(desc, lnum); -} - int dbg_leb_map(struct ubi_volume_desc *desc, int lnum, int dtype) { int err; |