mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-25 15:42:23 +00:00
btrfs-progs: drop permission arg from non-creating open
The permissions do not make sense without O_CREATE mode. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
51d41fac76
commit
df96f8244d
@ -511,7 +511,7 @@ int cmd_inspect_dump_super(int argc, char **argv)
|
||||
|
||||
for (i = optind; i < argc; i++) {
|
||||
filename = argv[i];
|
||||
fd = open(filename, O_RDONLY, 0666);
|
||||
fd = open(filename, O_RDONLY);
|
||||
if (fd < 0) {
|
||||
error("cannot open %s: %s", filename, strerror(errno));
|
||||
ret = 1;
|
||||
|
@ -138,7 +138,7 @@ read_dev_supers(char *filename, struct btrfs_recover_superblock *recover)
|
||||
|
||||
struct btrfs_super_block *sb = (struct btrfs_super_block *)buf;
|
||||
|
||||
fd = open(filename, O_RDONLY, 0666);
|
||||
fd = open(filename, O_RDONLY);
|
||||
if (fd < 0)
|
||||
return -errno;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user