OSDN Git Service

debugfs: silence build warning and remove incorrect error message
authorEric Whitney <enwlinux@gmail.com>
Tue, 24 Dec 2013 16:04:42 +0000 (11:04 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 25 Dec 2013 03:50:23 +0000 (22:50 -0500)
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>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
debugfs/debugfs.c

index 6982ff6..095741f 100644 (file)
@@ -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;