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:
Jeff Mahoney committed 2016-06-06 14:05:36 -04:00
1 parent 59dc067e79
commit 3c0f2812b0
12 files changed
+100 -52

No files matched your search

+4 -1
View File
@@ -576,6 +576,7 @@ int main(int argc, char **argv)
__u64 fs_size = 0;
int c;
static int flag;
long error;
program_name = strrchr(argv[0], '/');
@@ -751,9 +752,11 @@ int main(int argc, char **argv)
return 1;
fs = reiserfs_create(device_name, select_format(), fs_size, Block_size,
Create_default_journal, 1);
Create_default_journal, 1, &error);
if (!fs) {
reiserfs_warning(stderr, "reiserfs_create failed: %s %ld\n",
error_message(error), error);
return 1;
}