reiserfsprogs: use com_err in reiserfs_open
We dump failure messages to the terminal regardless of whether the caller wants them or not. This can be annoying when used as part of a general tool that tests to see which file system is on a device by calling its open routine. Signed-off-by: Jeff Mahoney <jeffm@suse.com>
This commit is contained in:
1 parent
59dc067e79
commit
3c0f2812b0
12 files changed
+100
-52
No files matched your search
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include "debugreiserfs.h"
|
||||
#include <com_err.h>
|
||||
|
||||
reiserfs_filsys_t fs;
|
||||
|
||||
@@ -683,7 +684,7 @@ static void debugreiserfs_zero_reiserfs(reiserfs_filsys_t fs)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char *file_name;
|
||||
int error;
|
||||
long error;
|
||||
struct debugreiserfs_data *data;
|
||||
FILE *log;
|
||||
|
||||
@@ -701,7 +702,7 @@ int main(int argc, char *argv[])
|
||||
if (no_reiserfs_found(fs)) {
|
||||
reiserfs_exit(1, "\n\ndebugreiserfs: can not open reiserfs on "
|
||||
"\"%s\": %s\n\n", file_name,
|
||||
error ? strerror(error)
|
||||
error ? error_message(error)
|
||||
: "no filesystem found");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user