Skip to contentSkip to conversation

debugfs: silence build warning and remove incorrect error message

PATCH Applied Eric Whitney 2 participants 2 messages Dec 23, 2013 – Dec 24, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 debugfs: silence build warning and remove incorrect error message

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.

---
 debugfs/debugfs.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
debugfs/debugfs.c +1 -3
index 6982ff6..095741f 100644
@@ -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;
Signature · 1 line
1.8.3.2
#1 lore raw
Quoted 10 lines · Eric Whitney

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.

Thanks, applied.

- Ted