Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build: update version for Lustre build
[tools/e2fsprogs.git]
/
misc
/
util.c
diff --git
a/misc/util.c
b/misc/util.c
index
1fcae1d
..
2898830
100644
(file)
--- a/
misc/util.c
+++ b/
misc/util.c
@@
-198,6
+198,11
@@
int check_plausibility(const char *device, int flags, int *ret_is_dev)
char *fs_label = NULL;
fd = ext2fs_open_file(device, fl, 0666);
char *fs_label = NULL;
fd = ext2fs_open_file(device, fl, 0666);
+ if ((fd < 0) && (errno == ENOENT) && (flags & NO_SIZE)) {
+ fprintf(stderr, _("The file %s does not exist and no "
+ "size was specified.\n"), device);
+ exit(1);
+ }
if ((fd < 0) && (errno == ENOENT) && (flags & CREATE_FILE)) {
fl |= O_CREAT;
fd = ext2fs_open_file(device, fl, 0666);
if ((fd < 0) && (errno == ENOENT) && (flags & CREATE_FILE)) {
fl |= O_CREAT;
fd = ext2fs_open_file(device, fl, 0666);