* [PATCH] debugfs: silence build warning and remove incorrect error message
@ 2013-12-23 2:30 Eric Whitney
2013-12-24 16:05 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Eric Whitney @ 2013-12-23 2:30 UTC (permalink / raw)
To: linux-ext4; +Cc: tytso
Commit fe56188b07 modified the code used to check the block number
argument to the command line -s switch, adding a call to com_err().
This causes a compile time warning because the third argument to
com_err() isn't a string. Also, when the block number argument is
bad it outputs an incorrect error message - "Operation not permitted".
Fix these minor problems by removing the call to com_err(). Other
code provides enough error reporting information in this case.
Signed-off-by: Eric Whitney <enwlinux@gmail.com>
---
debugfs/debugfs.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c
index 6982ff6..095741f 100644
--- a/debugfs/debugfs.c
+++ b/debugfs/debugfs.c
@@ -2458,10 +2458,8 @@ int main(int argc, char **argv)
break;
case 's':
retval = strtoblk(argv[0], optarg, &superblock);
- if (retval) {
- com_err(argv[0], retval, 0, debug_prog_name);
+ if (retval)
return 1;
- }
break;
case 'c':
catastrophic = 1;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] debugfs: silence build warning and remove incorrect error message
2013-12-23 2:30 [PATCH] debugfs: silence build warning and remove incorrect error message Eric Whitney
@ 2013-12-24 16:05 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2013-12-24 16:05 UTC (permalink / raw)
To: Eric Whitney; +Cc: linux-ext4
On Sun, Dec 22, 2013 at 09:30:35PM -0500, Eric Whitney wrote:
> Commit fe56188b07 modified the code used to check the block number
> argument to the command line -s switch, adding a call to com_err().
> This causes a compile time warning because the third argument to
> com_err() isn't a string. Also, when the block number argument is
> bad it outputs an incorrect error message - "Operation not permitted".
>
> Fix these minor problems by removing the call to com_err(). Other
> code provides enough error reporting information in this case.
>
> Signed-off-by: Eric Whitney <enwlinux@gmail.com>
Thanks, applied.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-24 16:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-23 2:30 [PATCH] debugfs: silence build warning and remove incorrect error message Eric Whitney
2013-12-24 16:05 ` Theodore Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).